[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Is there a way to utilise disable-output-escaping in

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)
xsl output nbsp
Thanks for the reply mike. Upon testing, i noticed that
disable-output-escaping works on like &#160; &#nbsp; while failing
with likes of &#x2019; And I got more confused looking at the html
output and view source.

see &#x2018;abnormality&#x2019; 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' &#x2018;abnormality&#x2019; -
&#160; - &amp;#nbsp; forms part of an =&#160;= &amp;#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; -
&amp;#nbsp; forms part of an =&nbsp;= &amp;#160; space
      </p>
<p>Esc Yes: This publication  'ab' abnormality - &nbsp; -
&amp;#nbsp; forms part of an =&nbsp;= &amp;#160; space
      </p>      
<p>Esc No: This publication  'ab' abnormality -   - &#nbsp; forms
part of an = = &#160; 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 - &#x2018;abnormality&#x2019; 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.