[Home] [By Thread] [By Date] [Recent Entries]
> Answer: the XSLT processor first converts the two characters into an > integer: this may not be the case with XSLT2. If the element x is declared in a schema as type xs:integer then the schmema processor (may) handle the conversion of the literal string to a typed value and (may) hand over a tree (PSVI) containing typed values rather than (or as well as) string data to the XSLT processor, in which case the XSLT processor (may) use the typed value directly instead of infering a value from the character data. Sorry about all the (may) in the above denoting under-specified implementation specific behaviour. >This is not stating: > "The value of the element x in an XML instance document is an >integer." > >Rather, it is stating: > > "The value of the element x in an XML instance document may be >converted to an integer." It would be nice if that were the case and would mean that schema processors didn't rely on private channels to pass their PSVI result trees to applications, but as you see above it isn't really so, the schmema processor can really put integer values (and in general any typed value) into the PSVI properties. > 2. Is there such a thing as a document which contains both text and > integers? Not an XML document no, which is why PSVI/typed infoset is so alien to XML and one reason why Relax NG schema are often a better fit for traditional XML uses than XSD schema. > 3. Do different platforms represent, say, integers differently? Yes, historically lots of different ways, these days 64 and 32 bit differences are especialy noticable. > Is that why XML decided to be text-only? I wasn't there. 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] |

Cart



