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

Re: create escaped(?) html of some nodes

Subject: Re: create escaped(?) html of some nodes
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Mon, 9 Oct 2006 09:25:42 +0530
Re:  create escaped(?) html of some nodes
This template

<xsl:template match="Para">
 <p><xsl:apply-templates /></p>
</xsl:template>

will change all
<Para>xx</Para> to
<p>xx</p>

I am sorry, I don't know the answer to your 2nd question. Just
curious, why do you want <p> to appear as &lt;p&gt; in the output?

On 10/9/06, Jan Limpens <jan@xxxxxxxxxxx> wrote:
Mukul,

thanks for the quick reply. Unfortunately this seems to change almost
nothing at all (only the document element's attributes order changed a bit).
While the idea seems good, the second template never matches better than
the first and thus does not seem to be called.

And then, how can I do the escaping part, so that a <p> becomes a
&lt;p&gt; ?

Jan

Mukul Gandhi schrieb:
> It seems a modified identity transform will work.
>
> <xsl:template match="node() | @*">
>   <xsl:copy>
>       <xsl:apply-templates select="node() | @*" />
>   </xsl:copy>
> </xsl:template>
>
> <xsl:template match="Para">
>   <p><xsl:apply-templates /></p>
> </xsl:template>



-- Regards, Mukul Gandhi

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.