|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: strange behaviour in Xalan
> > <xsl:template match="boxes"> > > <xsl:copy-of select="*|@*"/> > > </xsl:template> > > > > , which in my eyes can cause problems, if the root-element > > has attributes. > > I don't understand why you should think this can cause problems. This definitely causes a problem, as there isn't an open (for which no children have been copied yet) element node being created in the output, to which this attribute node should belong. > > > 1. Why is the attribute test="1" not causing an error, but > > will be copied to the new root-element? > > You asked for it to be copied by specifying <copy-of select="@*"/> >From the XSLT 1.0 Spec: "The following are all errors: Adding an attribute to an element after children have been added to it; implementations may either signal the error or ignore the attribute. Adding an attribute to a node that is not an element; implementations may either signal the error or ignore the attribute. Creating nodes other than text nodes during the instantiation of the content of the xsl:attribute element; implementations may either signal the error or ignore the offending nodes." This concrete case is exactly what the first bullet above describes. Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








