Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Serialize parentless Text nodes

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Wolfgang Hoschek'" <whoschek AT lbl.gov>, "'Elliotte Harold'" <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Serialize parentless Text nodes
  • Date: Sat, 9 Jul 2005 08:04:16 +0100

> For the W3C XQuery Serialization spec, all result sequence nodes to
> be serialized may be parentless, except attributes and namespaces.
> Should be easy to fix as far as I can see...

Actually, the restriction on serializing attribute nodes and namespace nodes
in that spec applies whether or not they have a parent.

Essentially the spec says that if you want to serialize anything other than
a document, you wrap a document node around it, as in
<xsl:document><xsl:copy-of select="$seq"/></xsl:document>; and this throws
an error if $seq contains attribute or namespace nodes.

Michael Kay
http://www.saxonica.com/






Archive powered by MHonArc 2.6.24.

Top of Page