Subject: Is there a way to utilise disable-output-escaping in apply-templates?
From: Karl <call14@xxxxxxxxx>
Date: Thu, 14 Sep 2006 13:45:46 +0100 (BST)
|
Thanks for the reply mike. Upon testing, i noticed that
disable-output-escaping works on like   &#nbsp; while failing
with likes of ’ And I got more confused looking at the html
output and view source.
see ‘abnormality’ text. (or Am i wrongly undertood its
usage?)
So, I have stripped down my xml, xsl to see what i get in html (see
below). I use Saxon B. Pls ignore any spell mistake or extra xslt
code if present, as it was a scaled down version.
My xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FrontMatter>
<CourseCode>B700</CourseCode>
<CourseTitle>Improving Performance</CourseTitle>
<ItemID>Session 7</ItemID>
<ItemTitle>Cross-functional perspective</ItemTitle>
<Imprint>
<Standard>
<GeneralInfo>
<Paragraph>This publication 'ab' ‘abnormality’ -
  - &#nbsp; forms part of an = = &#160;
space</Paragraph>
</GeneralInfo>
</Standard>
</Imprint>
</FrontMatter>
</Item>
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" name="html"/>
<xsl:template match="/">
<!-- Creating -->
<xsl:result-document href="unicode_output.html" format="html">
<html>
<body>
<p>
Normal: <xsl:value-of select="//Paragraph[1]"/>
</p>
<p>
Esc Yes: <xsl:value-of select="//Paragraph[1]"
disable-output-escaping="no"/>
</p>
<p>
Esc No: <xsl:value-of select="//Paragraph[1]"
disable-output-escaping="yes"/>
</p>
</body>
</html>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
Html source:
<html>
<body>
<p>Normal: This publication 'ab' abnormality - -
&#nbsp; forms part of an = = &#160; space
</p>
<p>Esc Yes: This publication 'ab' abnormality - -
&#nbsp; forms part of an = = &#160; space
</p>
<p>Esc No: This publication 'ab' abnormality - - &#nbsp; forms
part of an = =   space
</p>
</body>
</html>
My q's are:
1) I wish to know how to escape those 2019, 2018's etc without them
converting into single quotes ('s). In the sense, I am expecting to
get an output - ‘abnormality’ as in XML and not
abnormality
2) On the browser, This publication 'ab' abnormality is seen as
...publication 'ab' babnormalityb
Why is dipslayed as b?
Thanks in adv
karl
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
|