Re: [xsl] How to use parse-xml-fragment with a string that contains a less-than symbol (and the less-than symbol is not part of a start- or end-tag)?

Subject: Re: [xsl] How to use parse-xml-fragment with a string that contains a less-than symbol (and the less-than symbol is not part of a start- or end-tag)?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2021 17:38:51 -0000
> Is there an elegant, simple solution to this problem, without manually
changing <![endif] to &lt;![endif]?
>

The elegant solution is to use a parser designed for the grammar of the
language you are trying to parse, not some other grammar of which that is a
bastardised version.

But a simple solution? No, you've got me there. TagSoup probably. Available in
Saxon as saxon:parse-html(). But I've no idea what it does with these
pseudo-tags.

Michael Kay
Saxonica

Current Thread