RE: [xsl] How can I do a string substitution for turning entities into html tags

Subject: RE: [xsl] How can I do a string substitution for turning entities into html tags
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 16 Apr 2003 08:05:24 +0100
The process of converting markup to a tree structure is called parsing. 

You need to parse this data twice. The first parse will convert the
string "&lt;x/&gt;" to the string "<x/>", and the second will convert
the string "<x/>" to an element node.

It's better, of course, not to generate such files in the first place,
but because a lot of people get themselves into this mess, Saxon has a
saxon:parse extension function to help you get out of it.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Bill Chmura
> Sent: 15 April 2003 22:38
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] How can I do a string substitution for turning 
> entities into html tags
> 
> 
> 
> I am not sure if the subject line conveyed it, but I am not 
> really sure how to describe it at this point.
> 
> Here is an example of my xml data
> 
> <text>
>    &lt;p&gt;Sometext here. Followed by more text&lt;/p&gt;
>    &lt;p&gt;More text.&lt;/p&gt;
>    &lt;li&gt;For more info see &lt;/li&gt;
> </text>
> 
> Because of the way the program that generates it is handling 
> it, the html markup tags are converted to the entities for < 
> and >.  In my XSL I need to change them back to the specific 
> markup tags.
> 
> What is the best way to go about this?  
> 
> Any advice or examples would be fantastic and much appreciated
> 
> Bill
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread