[
Lists Home |
Date Index |
Thread Index
]
The XSLT 2.0 spec talks about "parentless elements". As far as I know,
there can only be one element in a source document that is parentless -
the document node. Yet, the XSLT 2.0 spec seems to suggest that there
may be other parentless element nodes. Can someone tell me what they
may be? /Roger
There can be _no_ elements in a document that is parentless.
Every element in a document has parent another element or the document
(root) node /. XPath 2 (like Xpath 1) actually allows more than 1
element to have parent /, as it models external parsed entities rarther
than documents.
In XQuery and XSLT2 though You can create element nodes without
putting them in a document
something like (from memory)
<xsl:element as="item()" name="foo"/>
in XSLT2 or just
<foo/>
in xquery will generate a free standing element node.
You can manipulate these nodes before finally copyting them to an output
document (at which point they'l aquire a parent) The systems may give
you API to directly output such thing s(as well as values such as
integers, which don't have any obvious XML serialisation, but I don't
think that's standardised in the current drafts. The main use anyway
will be as internal data manipulated within a query.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|