RE: Newbie question, commenting out an element
> 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
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