|
Subject: [xsl] problem with Xpath in Variable filled by choose From: "Dietmar Klotz" <dklotz@xxxxxxxxxxx> Date: Wed, 16 Nov 2005 16:47:14 +0100 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Transforming a small part, JBryant | Thread | Re: [xsl] problem with Xpath in Var, David Carlisle |
| Re: [xsl] Need to create a line gra, David Carlisle | Date | Re: [xsl] problem with Xpath in Var, David Carlisle |
| Month |