I am new to the list and to XSLT. I want to transform a XML
file to another XML file. In the process I have a Applic tag
that I want to wrap in a comment.
Comments can't contain tags. If you look at XML more carefully, you will see
that any "<" and ">" characters are not treated as markup (or tags), they
are ordinary data characters. They might look like tags, but the appearance
is deceptive.
This is reflected in the XSLT/XPath data model: a comment node cannot have
element nodes as its children.
So to solve this, you need to serialize the elements as strings, and then
put the strings in the comment node. You can do the serialization by hand
(but be careful with special characters like "&"), or use something like
saxon:serialize().
Michael Kay
http://www.saxonica.com/
I cannot get anything to work with version 1 or 2. I have
played and learned a lot of things, but not how to get this to work.
sample, something like this.
<applic><assert></assert></
applic>
to
<!-- <applic><assert></assert></applic> -->
Any love, please, This seems that it would be so simple, but
I was not able to find how to do it.
d
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--