XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] [Summary] XML is text-only ... why?



> by viewing the binary that underlies the XML file, 

you don't say which numbers you mean here, do you mean the unicode code
points or do you mean the byte values which are used to encode those
code points in the (so far, unspecified) encoding? For the characters in
the example the byte values for utf-8 and the unicode values are the
same, so it's hard to tell from the context which you mean. It would be
clearer if you specified the encoding (say, utf-8) and included a
non-ascii character, then you'd have to decide whether your "underlying
binary" (by which I assume you mean underlying integer) was one integer
(the unicode code point) or two or three (the values of the bytes in the
utf-8 encoding).

> If the 23 in the XML file really was an integer then the underlying
> binary would have 00010111 (hex 17).

It may, or may not, especially if you mean those leading zeros to be
significant and imply the that the number is stored in exactly 8 bits,
then this may well not be the case. If you don't mean the leading zeros
to be significant then less confusing to write them as 10111 although
there is nothing to say that a computer system _has_ to store integers
that way, some use Binary Coded Decimal for example
(http://en.wikipedia.org/wiki/Binary-coded_decimal)

> This editor enables you to view the underlying binary (displayed in
> hex) of a text file: PSPad at http://www.snapfiles.com/get/spad.html 

ah so here (I assume) the editor is showing the bytes used in whatever
encoding the file is in, not the code points of the characters.

Best not to introduce an undefined term "underlying binary" I think.

> Answer: the two characters are first converted into an integer.

You haven't specified XSLT 1 or 2. In XSLT 1 there is no integer type
only the type "number" (which is IEEE double, mnore or less)

David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS