[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: can XML-XSL do what Lisp and s-expressions do?
> what is the easiest way to strip ampersands from xml code using xsl ? it depends what you mean. If you mean ampersand characters in the character data of a text node, then you just need to use select="translate(.,'&','')" where . in the first argument means the text of the current node, could be any xpath expression. If you mean stripping off ampersands in the concrete markup in an xml file then basically you can't as & is th eentity reference start character and the XML parser will expand the entities before passing the input to the XSL system. So if you have <test> this & that </test> the first will give you " this that" if you want this amp; that then in this case you could do it as you just need to replace all ampersands by `amp;' but in general you can't as there is no record that there was an entity reference in the input tree, so except for entities pointing at single characters you are stuck. David 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
|