[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] what is the most straight forward way to construct and element na me for output ??


Subject: Re: [xsl] what is the most straight forward way to construct and element na me for output ??
From: Simon Bretin <simon@xxxxxxxxxxxxxxxx>
Date: Thu, 21 Aug 2003 17:53:49 +0200

You are missing the <xsl:element> functionality ...

The following should do the trick:

   <xsl:if test="$element='House'">
      <xsl:element name="$element">
            <cost>100000.00</cost>
      </xsl:element>
   </xsl:if>




Bill Riegel wrote:


Have a need to build the element name and export it.

<xsl:template name="OutputElement">
<xsl:param name="elementName" /> <xsl:variable name="element" select="normalize-space($elementName)" />



If element == "House" how do I export an element name called House



Desired Output:


 <House>
	<cost>100000.00</cost>
 </House>


Bill Riegel LandMark Graphics 713-839-3388



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list





XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread