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

Re: Caching XML document as a string...

Subject: Re: Caching XML document as a string...
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 18 Jan 2002 10:02:03 +0000
caching xml document
Hi Seema,

> In the XSL file I need to cache this entire XML in a hidden input field as a
> single string.
> <td><input type="hidden" value="The ENTIRE xml String" name="cache"</td>

To do that, you need to serialize the XML within your stylesheet.
Unfortunately, because you want this to work in Netscape as well, you
can't use MSXML to create a script to do it (which is the easiest
way).

Instead, you need something like Evan's xml-to-string.xsl stylesheet
(http://xmlportfolio.com/xml-to-string/) to serialize the XML into a
string. Follow the instructions there, but basically you want to
import the stylesheet and then call the xml-to-string template,
passing the root node of the XML as the value of the node-set
parameter, with something like:

  <input type="hidden" name="cache">
    <xsl:attribute name="value">
      <xsl:call-template name="xml-to-string">
        <xsl:with-param name="node-set" select="/" />
      </xsl:call-template>
    </xsl:attribute>
  </input>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.