The former needs parsing if you want to process the escaped markup,
but if you do that with the latter you get an error
but if you just parsed with tagsoup (or probably the others as well0 it
would work in both cases, because in super-lax html parsing modes an &
not followed by some letters and a semicolon parses as itself rather
than an error.
Given this XML:
<root>
<title><a href="foo.html">Today</a></title>
<title>Hammersmith & City</title>
</root>
and the need to process the <title> element to strip out the markup
(or some other requirement) - how would you incorporate tagsoup?
Currently I'm calling saxon:parse on the contents of the title
element, wrapped in a root node (as there's no guarantee of a single
root element):
<xsl:variable name="parsed-content"
select="saxon:parse(concat('<root>', saxon:parse(title),
'</root>'))/root"/>
<xsl:value-of select="$parsed-content"/>
Do I parse the entire XML using tagsoup?
thanks
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--