[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problem with Xpath in Variable filled by choose
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|