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

Re: Re; Preseving xhtml tags during a transform

Subject: Re: Re; Preseving xhtml tags during a transform
From: "Tracey Zellmann" <tracey.zellmann@xxxxxxxxxxx>
Date: Fri, 22 Sep 2006 14:39:10 -0400
Re:  Re; Preseving xhtml tags during a transform
Thank you very much! Works fine

I think there is a love-hate relationship with the T-word.
Without T's, there wouldn't be anything to transform!
Enough to make me chuckle.

No more mention of the dreaded T-word.

----- Original Message ----- From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, September 22, 2006 2:21 PM
Subject: Re: Re; Preseving xhtml tags during a transform




My desired outcome is that the <span class=it> and </span> tags are
preserved.

don't mention the T-word on this list! xslt has no access to the tags in the document (they are not reported by the xml parser) so can not preserve them. What it can do is (if the result tree is serialised) produce some tags that generate equivalent elementswhen parsed.

<xsl:value-of select="text"/>

value-of produces the string value of a node (ie it removes all
elements, and just returns the character data) you want apply-templates
not value of, if you don't apply templates to the nodes, your template
that copies them won't be applied.

something like
<xsl:template match="popup">
<li>
<a href="../popups/{link}"><xsl:apply-templates mode="xh" select="text/node()"/></a>
</li>
</xsl:template>


David

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.