[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Converting pseudo-tags in attribute to real tags
Hi Thomas,
Well, it's against my feeling of a good design to have interpreted (stringized, textized) XML or HTML in an attribute or element, but assuming you already have this situation and you want it fixed, here're a couple of ways to solve it: 1. use d-o-e (short for disable-output-escaping). Many experts on this list will vote against it because of its design flaws, amongst which that a processor is not required to implement it, and that, even if they do, it won't disable the escaping in all situations. Further more, you loose the guarantee of having well-formed XML (or HTML) in the output. 2. Use character-maps. But this only works with XSLT 2.0, so you'll have to use one of the three currently available XSLT 2.0 processors, of which Saxon is the one that is most complete and compliant currently. If you can go for this solution, I can explain you in a next post how that would look. 3. Use an extension function. This subject was the subject of many posters these days and it is also in the FAQ. In saxon you can use saxon:parse. In other implementations it may be something else. 4. Replace the < with a character in the private use area of unicode. Then in the post-process, replace this character with the '<' character. The most portable is solution nr 2, the most easy is nr 1. Nrs 3 and 4 require a specific processor or the ability to post-process. Cheers, -- Abel Braaksma Thomas Widmann wrote: Hi there,
|
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
|