[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
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) > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|