|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: preserving comments in xml through xslt
> How do I refer to the comments in the first XML to be sure
> that they appear
> in the finished XML? They seem to be dissappearing.
You can generate comments using <xsl:comment>, or using <xsl:copy> on a
comment node. Try
<xsl:template match="comment()"><xsl:copy/></xsl:template>
> Additionally the root node of the input xml has an xmlns
> attribute which doesn't want to show up in the finished xml.
Namespace nodes from the source document will be copied if you use
<xsl:copy> on the element node (which you aren't doing) or a literal result
element (which you aren't using). You are using <xsl:element name="{ --
string-expression -- }", if this expression returns a name containing a
prefix, the prefix must be declared by a namespace declaration _in the
stylesheet_.
Mike Kay
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








