[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: text nodes of document in XDM
On 11/01/2011 20:22, David Lee wrote: > When is a document node created implicitly ? > > If I run the xquery > 1,"hi",<foo/> > > I do NOT get a document node. > > step 7 of http://www.w3.org/TR/xslt-xquery-serialization/#serdm so if you use some API that gives direct access to the XD< sequences there is no implicit parent, but if (as is the specified default for xslt and not uncommon for xquery) the result is returned using the xml serialisation then an implict document node is produced. there is an xsl:document in xslt to generate a document node explicitly but it is almost never used (and xslt 1 didn't have such a construct at all) node copying in both xquery and xslt is designed to silently throw away these document node containers, if you copy a document node into another document element, it isn't an error you simply get the document nodes children. David
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|