|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: < to < while preserving &
In addition to what's already been said, you may think of one of the following two approaches of tackling this mess: 1. Using XSLT 2.0, you can replace any < and > that is inside a text using a template like this together with a copy idiom: <xsl:template match="text()[matches(., '>|<']" > <xsl:sequence select="translate(., '><', '&EF00;&EF01')" /> </xsl:template> and apply your character maps to the private use characters &EF00; and &EF01; respectively. 2. Using a little bit more sophisticated replace and a function, considering that only little tags (i.e., <b>, <i> <strong> etc) are wrongly escaped that way, you can create your own saxon:parse replacement with a regular expression + analyze-string (use both the matching and non-matching part). I.e., you matching regex could be something like this: regex="<([a-z]+)>(.*)</\1>" which will capture the tagname in the $1 and the content between the tags in $2. Cheers, -- Abel > Hello, > > <title>Me & You <i>together</i></title> > > I tried my best with character-maps to get from the above > XML the following HTML: > > <h3>Me & You <i>together</i></h3> > > Is this possible? And how could it be done? > > Gr|_e, > > Kai Weber
|
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
|

Cart








