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

How to disable escaping of '<' characters

Subject: How to disable escaping of '<' characters
From: Satish Patil <Satish.Patil@xxxxxxx>
Date: Sun, 11 Mar 2001 12:05:05 -0500
createtextnode font size
Hi

I want to disable the escaping of '<' ,'>' characters in XML.

Ex:
I create a dom tree 

<PARENT>
	<CHILD>
<font size = '2'>XML</font>
	<CHILD>
<PARENT>

and apply xls sheet which prints the value CHILD element.

<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="yes"/>
	<xsl:template match="PARENT">	
			<xsl:apply-templates/>
	</xsl:template>	
	<xsl:template match="CHILD">
		<html>
		<xsl:value-of select="." />
		</html>
	</xsl:template>	
</xsl:stylesheet>


The o/p I want is
<html>
	<font size='2'>XML</font>
</html>

what I am getting is
<html>
	&lt;font size=&apos;2&apos;&gt;XML&lt;/font&gt;
<html>

Is there a solution for this.

The java program which creates the DOM is
           Document doc = new DocumentImpl();
            Element parent = doc.createElement("PARENT");
            
            Element child = doc.createElement("CHILD");
            child.appendChild(doc.createCDATASection("<font
size='2'>XML</font>"));            
            //child.appendChild(doc.createTextNode("<font
size='2'>XML</font>"));
            parent.appendChild(child);
            doc.appendChild(parent);
            
            DOMSource domSource = new DOMSource(doc);
            TransformerFactory tFactory = TransformerFactory.newInstance();
	
            Transformer transformer = tFactory.newTransformer(new
StreamSource("Temp.xsl"));

            transformer.transform(domSource, new StreamResult(new
FileOutputStream("Temp.html")));


Thank you in advance.
Satish


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.