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

Re: find and replace in javascript with XMLDOM object

Subject: Re: find and replace in javascript with XMLDOM object
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 8 Jul 2002 21:39:25 +0100
javascript xmldom
Hi Bryan,

> Here's the problem... I am using two different XSL
> transformations on the same document... sequentially.
> The first one turns XML to HTML, the second one takes
> embedded comments in the HTML and displays them. The
> comments contain HTML code. 

Why are you creating comments in the HTML that you generate rather
than creating the HTML directly?

> I have both XSL sheets written, however, when I
> display the final output, I get the &lt; &gt; in the
> output for the comments. 
>
> The first transformation yields code like this:
>
> <!-- <br /> Copyright Information ... -->
>
> and after the second transformation (which is a simple
> "grab the value of the comment":
>
> &lt;br /&gt; Copyright Information

This is what disable-output-escaping is designed for (although if you
can fix the problem by not generating the HTML in comments, then that
would be much cleaner). Try using:

<xsl:template match="comment()">
  <xsl:value-of select="." disable-output-escaping="yes" />
</xsl:template>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.