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

Re: AW: '<' and '>' in the value of a variable

Subject: Re: AW: '<' and '>' in the value of a variable
From: Américo Albuquerque <melinor@xxxxxxx>
Date: Fri, 01 Aug 2003 16:08:23 +0100 (WEST)
Re: AW:  '<' and '>' in the value of a variable
Hi.

Citando Ming Yu <myu@xxxxxxxx>:

} The reason I need to do this is because I have a template function like this:
} 
} <xsl:template name="printRawData">
}      <xsl:param name="field_label"/>
}      <xsl:param name="field"/>
}      <xsl:param name="html"/>
}      <xsl:param name="bold"/>
}      <xsl:param name="endbold"/>
}      <xsl:param name="return"/>
} 
}      <xsl:if test="string-length($field) &gt; 0">

you'll just need to check if bold is not empty and create the element

instead of this:
}          <xsl:value-of select="$bold"/>
}          <xsl:value-of select="$field_label"/>
}          <xsl:value-of select="$endbold"/>
}          <xsl:value-of select="xmlconf:convertLWWEntities($field)"/>

do:
           <xsl:choose>
             <xsl:when test="string($bold)">
               <xsl:element name="{$bold}">
                 <xsl:value-of select="$field_label"/>
               </xsl:element>
             </xsl:when>
             <xsl:otherwise>
               <xsl:value-of select="$field_label"/>
             </xsl:otherwise>
           </xsl:choose>
           <xsl:value-of select="xmlconf:convertLWWEntities($field)"/>

}      </xsl:if>
}      <xsl:value-of select="$return"/>
} 
} </xsl:template>
} 

(...)

Regards,
Americo Albuquerque

___________________________________________________________________

O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt


 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.