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

RE: variable rtf as querystring in document uri

Subject: RE: variable rtf as querystring in document uri
From: subscriptions <subscriptions@xxxxxxxxxxx>
Date: Thu, 30 Nov 2006 02:05:16 +0200
variables xsl querystring
Hi all,

Thanks Michael, but the variable has a tree fragment, how to process it
as the following:

<xsl:variable name="q1">%3Cquery+id%3D%221%22+%2F%3E</xsl:variable>
<xsl:variable name="q2"><request id="1" /></xsl:variable>

<xsl:variable  name="server">http://mydomain/q.php?query=</xsl:variable>
<xsl:variable name="url"><xsl:copy-of select="$server" /><xsl:copy-of
select="$q1" /></xsl:variable>
<xsl:apply-templates select="document($url)" /> 

With variable 'q1' it works, but with 'q2' it does not.
So how to convert q2 into a uri encoded string q1?

I do not seem to get it working.

Greetings Rob



On Wed, 2006-11-29 at 23:15 +0000, Michael Kay wrote:
> Variable "query" doesn't contain any tags. It's a tree containing a document
> node, an element node, and an attribute node. If you want tags, you either
> have to serialize the tree to lexical XML, or you have to write it as a
> string variable rather than a tree fragment.
> 
> Michael Kay
> http://www.saxonica.com/ 
> 
> > -----Original Message-----
> > From: subscriptions [mailto:subscriptions@xxxxxxxxxxx] 
> > Sent: 29 November 2006 22:55
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  variable rtf as querystring in document uri
> > 
> > Hi all,
> > 
> > I am pondering on the possibility of the following:
> > 
> > 
> > 
> > <xsl:variable 
> > name="server">http://mydomain/q.php?query=</xsl:variable>
> > <xsl:variable name="query">
> > 	<request id="1" />
> > </xsl:variable>
> > <xsl:variable name="url">
> > 	<xsl:copy-of select="$server" />
> > 	<xsl:copy-of select="$query" />
> > </xsl:variable>
> > <xsl:apply-templates select="document($url)" />
> > 
> > 
> > 
> > Without the variable $query it works (as it reacts properly 
> > on the responded xml by applying the templates), but combined 
> > I loose the 'tags' of variable 'query'.
> > 
> > How to do it properly?
> > 
> > I downloaded EXSLT uri-encode and tried, but with no changes 
> > in behaviour.
> > 
> > Greetings Rob

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.