[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] selecting HTML Options

Subject: RE: [xsl] selecting HTML Options
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 18 Jan 2005 09:52:20 -0000

It's quite tricky to handle markup properly when the document author has
gone to such extreme lengths to conceal the markup (by escaping it). It's
particularly confusing that in the <title> element, escaping has been used
properly (to escape a real ampersand character), while in <content> it has
been used improperly (to escape < and > characters that are really markup,
not text).

Because the markup has been disguised as text, you need to put the contents
of the <content> element through a second stage of XML parsing to turn it
into a tree structure. Saxon has an extension saxon:parse() specifically for
this purpose.

Michael Kay

> -----Original Message-----
> From: Mygrp [mailto:mdgroups@xxxxxxxxx] 
> Sent: 18 January 2005 05:50
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] selecting HTML Options
> I have an xml document like this.
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <page xmlns:xsp="http://apache.org/xsp">
> <news>
> <headline>
> <back>general_news.wml?sec=1</back>
> <title>help resolve B&amp;K issue</title>
> <content>&lt;b&gt;paris:&lt;/b&gt; President &lt;!--G:13544982--&gt;
> </content>
> </headline>
> </news>
> </page>
> I want to write an XSL that will produce an html page frm this xml.
> however i want to retrieve the text between &lt;b&gt;   and  
> :&lt;/b&gt;
> How is this possible thro XSL?

Current Thread