[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT2.0 compatibility
> "Error at xsl:copy-of on line 13 of > file:///C:/trex-dev/Trunk/Projects/BFW/bde.bfw.core/resources/ > trans3.xsl > t: > XTDE0410: An attribute node (name) cannot be created after > the children of the containing element > ** Transformation error" > > > If I remove xml:space="preserve", everything is fine. Can you > tell me what's wrong? > If you use xml:space="preserve" (either in the stylesheet or the source document) then it's very easy unwittingly to copy a whitespace text node to the result document before creating an attribute. For example <x xml:space="preserve"> <xsl:attribute name="x"/> </x> creates an element X with four nodes in its content sequence: an attribute called xml:space, a whitespace text node, an attribute called x, and another whitespace text node. I can't think of any good reason to use xml:space="preserve" in a stylesheet. Michael Kay http://www.saxonica.com/
|
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
|