Subject: RE: 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
http://www.saxonica.com/
> -----Original Message-----
> From: Mygrp [mailto:mdgroups@xxxxxxxxx]
> Sent: 18 January 2005 05:50
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: 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&K issue</title>
> <content><b>paris:</b> President <!--G:13544982-->
> </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 <b> and
> :</b>
>
> How is this possible thro XSL?
|