Random photo
Loading...
Domains for sale
|
November 18, 2003Don't think XQuery is like XSLTInteresting finding on XQuery from Elliotte Rusty Harold: In XSLT 1.0 all output is XML. A transformation creates a result tree, which can always be serialized as either an XML document or a well-formed document fragment. In XSLT 2.0 and XQuery the output is not a result tree. Rather, it is a sequence. This sequence may contain XML; but it can also contain atomic values such as ints, doubles, gYears, dates, hexBinaries, and more; and there's no obvious or unique serialization for these things. For instance, what exactly are you supposed to do with an XQuery that generates a sequence containing a date, a document node, an int, and a parentless attribute? How do you serialize this construct? That a sequence has no particular connection to an XML document was very troubling to many attendees.Hmmm, that's kinda confusing. Let's see. Formally speaking what XQuery produces is one( Serialization is the process of converting a set of nodes from the data model into a sequence of octets...and thus doesn't mention what happens with items in the resulting DM, which are not nodes, but atomic values. I believe that's a mistake in XQuery spec, because XSLT 2.0 and XQuery 1.0 Serialization handles that pretty well - it defines serialzation of DM including all it can contain, particularly, atomic values are converted to their string representations. November 18, 2003 6:10 PM
| #XML
Comments
Post a comment
|