My file base.css contains:
ol > li { color: red; }
I try to read it and render it into my HTML output using XSLT 2.0 unparsed-text (Saxon 9.1.0.2J) like this :
<style>
<xsl:sequence select="unparsed-text(fn:iri-to-uri($CSS-BASE-FILE))"/>
</style>
However, the unparsed-text() function is converting the '>' to '>' in the HTML, like this:
<style>
ol > li { color: red; }
</style>
...Which doesn't behave as "ol > li" does.
How can I use XSLT to render the '>' character into my element? I've tried using replace(..., '>', '>'), but that still renders '>' into the HTML.
Alternatively, is there another way I can specify the CSS child selector without having to embed a literal '>' character into my HTML?
Are you using output method XML, XHTML, or HTML?
The (3.0) specification says this:
The HTML output method MUST NOT perform escaping for any text node descendant, nor for any attribute of an element node descendant, of a script or style element.
So my suspicion is that you are not using the HTML output method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With