[xquery-talk] Re: Attribute node whose parent is a document node

Howard Katz howardk at fatdog.com
Fri Jul 8 06:40:25 PDT 2005

 [ snip ... ]

 > > Mark Logic, tho operating under an older spec, says "XML 
 > Parsing Error:
 > > duplicate attribute", which seems to be in accord with the latest 
 > > version of the wd.
 > We may report an error. We have one for parentless attribute 
 > nodes as seen yesterday. It could make sense to have one for 
 > attribute nodes whose parent is not their original one (may 
 > we speak about "forced adoption" ?).
 > I'm also really surprised that an element's *content* may 
 > generate an attribute for this element. It should IMHO 
 > generate an error *except* if a construct similar to 
 > <xsl:attribute> is used.
 > What's your mind ?
I do view it as similar to <xsl:attribute>. I don't see it as an error, any
more than saying that what's inside <e> { doc( ... )//sub-e } </e> is an
error or a non-intuitive way of generating sub-elements inside content. It's
just a mechanism for moving existing attributes from one place to another,
which make take a bit of getting used to the first time it's encountered.


More information about the talk mailing list