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

Re: Defining a variable for configuration file

Subject: Re: Defining a variable for configuration file
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Thu, 13 Oct 2005 14:32:44 -0500
defining a variable in xsl
On 10/13/05, Challa, Harsha <hchalla@xxxxxxxxxxxx> wrote:
> Hi
>
> Could someone help me with this. I am defining the variable in a template
> but looks like the $Config is not being recognized.
> I am getting error  'XSL transformation failed due to following error:
> Invalid variable referenceErrror in XPath expression, invalid variable
> reference"
>
> thanks
> Harsha

Looks like a scoping issue to me.

> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>         <xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"
> doctype-system="urn:/ShipmentOrderCreate.dtd"/>
>
>
>           <xsl:template match="/">
>
>
>                 <xsl:if test="//storerkey = '1011'">
>
>                         <xsl:variable name="Config" select=
> "document('1011CustomerConfig.xml')"/>


>
>                 </xsl:if>
>
>
>                         <xsl:element name="ShipmentOrderCreate">
>
>                                 <xsl:element
> name="CustomerCode"><xsl:value-of
> select="$Config/ConfigurationFile/CustomerCode">
> </xsl:value-of> </xsl:element>
>
>                         </xsl:element>
>
>         </xsl:template>

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.