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

Preserve HTML formatting when apply-templates in varia

Subject: Preserve HTML formatting when apply-templates in variabl
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 5 Aug 2004 22:21:04 -0700
html preserve formatting
Hi there,
I am trying to get the result of a template match as preserved HTML in my
variable.  I'm not to sure what is happening to the HTML, but I think it is
just getting stripped.
The variable which should retrieve the HTML from the matched template is
"ui_review".  The template "review" is responsible for generating the HTML.

Here is what I have:

<xsl:template match="uireview">
   <xsl:variable name="ui_review">
    	<xsl:apply-templates select="review"/>
   </xsl:variable>

   <xsl:call-template name="ui_content">
     <xsl:with-param name="title">UI Review</xsl:with-param>
     <xsl:with-param name="content" select="$ui_review"/>
     <xsl:with-param name="height">300</xsl:with-param>
   </xsl:call-template>

</xsl:template>

<xsl:template match="review">
	<img src="/images/arrow_2.jpg" alt="{title}" class="padr"/>
	<h3 class="txt_1 inline bold"><xsl:value-of select="title"/></h3>
	<p class="txt_1"><xsl:value-of select="content"/></p>

    <!-- link for more content -->
    <div class="marginb">
    <a href="{link}">more <img src="images/arrow_2.jpg" alt="{title}"
width="13" height="7" border="0"/></a>
    </div>
    <!-- horizontal "dashed" div tag -->
    <xsl:if test="not(position()=last())">
    	<div class="hr_1px_dashed" />
    </xsl:if>

</xsl:template>


========= end example ==========

Thanks for the help!
Karl

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.