Re: [xsl] recreating elements with attributes

Subject: Re: [xsl] recreating elements with attributes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 11 Feb 2004 00:01:04 GMT
> this code loops through all attributes for the TOLL_CDR node.  The
> problem is when I try and put "<TOLL_CDR" in there, because the parser
> yells about the "<" sign in front of it.  Any thoughts? 

XML does not allow a literal < in attribute values, so no XML system
will allow such an attribute (so this isn't really an xslt issue)
and xslt in its xml output method will always output a well formed
value, so quoting the <.

as mentioned in a parallel thread, you don't need/want the // here:
   <xsl:template match="//CDRS/TOLL_CDR">

The code posted clearly isn't xml at all so would not have got as far
as the xslt system


You can't have an xsl:text (or any element) element inside the start tag
of an element. An XSL stylesheet has to be well formed XML.

You appear to be trying to generate XML markup x="y" as text, but XSLT
does not directly manipulate the markup at all, you need to construct a
node tree, if the markup is generated at all t happens after the
transformation when the result is serialised.

I would guess that you want to copy teh attribute nodes so that is
  <xsl:copy-of select="@*"/>



 XSL-List info and archive:

Current Thread