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

problem with Xpath in Variable filled by choose

Subject: problem with Xpath in Variable filled by choose
From: "Dietmar Klotz" <dklotz@xxxxxxxxxxx>
Date: Wed, 16 Nov 2005 16:47:14 +0100
xpath choose
I have written following Code:
 
I use XSL v 2.0 and transform it with a JavaScript transformer:
 
<xsl:variable name="CategoryPointer"> 
                 <xsl:choose> 
                      <xsl:when test="$category = 'main'"> 
                           <xsl:copy-of 
select="document('style.xml')/root/DeviceParameters/DesignMood/Category/main
"/>           
                      </xsl:when> 
                      <xsl:when test="$category = 'news'"> 
                           <xsl:value-of
select="document('style.xml')/root/DeviceParameters/DesignMood/Category/news
"/>                
                      </xsl:when> 
                 </xsl:choose> 
            </xsl:variable> 
            <xsl:value-of select="$CategoryPointer/HeadlineColor"/> 
            <xsl:value-of select="$CategoryPointer"/> 

   
 
My Problem is here:
 <xsl:value-of select="$CategoryPointer/HeadlineColor"/> 
This row should give me Output of a Node in my XML File there ->
('style.xml')/root/DeviceParameters/DesignMood/Category/main/HeadlineColor 
   
But it seems that here in this following part my Xpath that should be saved
in the variable CategoryPointer  is transformed into a String in this Lines:
<xsl:variable name="CategoryPointer"> 
       <xsl:choose> 
                      <xsl:when test="$category = 'main'"> 
                           <xsl:copy-of 
select="document('style.xml')/root/DeviceParameters/DesignMood/Category/main
"/>           
                      </xsl:when> 
   
So my question: How can I handover a Node to this Variable instead of a
String?
 
Thanks for you Help
 
Dietmar

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.