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

RE: variable assignment and disable-output-escaping

Subject: RE: variable assignment and disable-output-escaping
From: "OHalloran, Martin" <Martin.OHalloran@xxxxxxxxx>
Date: Sun, 10 Apr 2011 21:05:39 -0600
 RE: variable assignment and disable-output-escaping
Hi thanks for reading .
I have the following xml which is passed as a parameter to my xsl file for
transformation from a jsp .
tradingPartnerXML =
      "<select>"+
      "<option value='711'>711: Compression Disabled</option>"+
      " <option value='729'>729: Compression Enable</option>"+
      "</select>";
when I receive it the tags <  > are replaced with &lt; and &gt .
I then do the following and it looks good  .
<xsl:message>Trading partner xml is:<xsl:value-of select="$tradingPartnerXML"
disable-output-escaping="yes"/></xsl:message>
I then want to create another variable from the contents of the
tradingPartnerXML so I do the following .
<xsl:variable name="tradingPartner">
      <xsl:text disable-output-escaping="yes">

          <xsl:copy-of select="$tradingPartnerXML"/>

      </xsl:text>
    </xsl:variable>
I have also tried other variations of this
<xsl:variable name="tp">

     <xsl:value-of select="$tradingPartnerXML"/>

  </xsl:variable>
When I create the other variable "tp" it contains the &gt; &lt; instead of <
and > which I would have expected .
I am using the xalan processor .
I have looked all over to try and find a soulution to this problem .
Ultimately I want to be able to extract the contents of the xml .
<xsl:for-each select="exsl:node-set($tp)//select/option">

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

  </xsl:for-each>

Thanks again for you help .If there is another soulution I would like to hear
it .



________________________________
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

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.