Subject: Re: problem with Xpath in Variable filled by choose
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Wed, 16 Nov 2005 12:26:27 -0600
|
On 11/16/05, Dietmar Klotz <dklotz@xxxxxxxxxxx> wrote:
> I am not sure if i understand the concept fully. If I follow your advice my
> output of: <xsl:copy-of select="$CategoryPointer"/>
>
> Is than this:
> <news
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <HeadlineColor>#ff0000</HeadlineColor>
> <TeaserColor>#00ff00</TeaserColor>
> <TeaserColorSub>#0000ff</TeaserColorSub>
> </news>
>
> But if I do:
> <xsl:copy-of select="$CategoryPointer/HeadlineColor"/>
Looks like a namespace problem to me, but I'm battling a headcold so I
could be a bit flaky. Assuming you declare the namespace in the xslt
stylesheet element the xpath you are looking for is something like
this:
<xsl:copy-of select="$CategoryPointer/xsI:HeadlineColor"/>
The reason the other xpath till "grabbed" those in the variable
setting is because you're doing the name()=$catagory I would suspect.
Notice this still wouldn't get you
#ff0000 but something like:
<HeadlineColor>#ff0000</HeadlineColor> or
<HeadlineColor
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">#ff0000</HeadlineColor>
There's quite a bit about namespaces in the faq.
If I'm wrong I'm sure someone will correct me.
Jon Gorman
|