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

Re: paths starting with "//" are invariant?

Subject: Re: paths starting with "//" are invariant?
From: "Mark D. Anderson" <mda@xxxxxxxxxxxxxx>
Date: Sun, 19 Dec 1999 23:09:06 -0800
xmlns core
I just figured it out, i think.

in the second occurence, i was inside a template which was applied to the
result of a xt:node-set call. 
apparently such results have a different document root, so paths with
"//" don't match any more, usage of id() fails, and so on.

I can't say this is a bug, since this is a non-standard extension after all.
saxon has the same, er, feature.

I haven't figured out how to do the equivalent of xt:node-set() with
xalan/lotusxsl yet (suggestions anyone?), so i can't say what it does.

i can say that result tree fragments continue to ruin my life :).

-mda

--On Sunday, December 19, 1999 10:35 PM -0800 Ray Waldin <rwaldin@xxxxxxxxxxx> wrote:

> "Mark D. Anderson" wrote:
>> i've got a sizable template in which this:
>>    <xsl:value-of select="//core:type[@id='publisher_type']/@id"/>
>> 
>> works correctly when in my main template, but finds no nodes when in
>> a later template.
>> 
>> with my understanding, any path starting with "//" should produce
>> the same thing regardless of where it is located, at least as long
>> as it doesn't use any variables in it, and there is no use of xsl:document
>> above it.
> 
> I'm only guessing here, but could it be that the namespace prefix core: maps to
> different namespaces uris at these two points?  That's somewhat variable, isn't
> it?
> 
> For example:
> 
> <xsl:template match="main" xmlns:core="something">
>     <xsl:value-of select="//core:type[@id='publisher_type']/@id"/>
> </xsl:template>
> 
> vs...
> 
> <xsl:template match="later" xmlns:core="something-else">
>     <xsl:value-of select="//core:type[@id='publisher_type']/@id"/>
> </xsl:template>
> 
> or worse...
> 
> <xsl:template match="worse">
>     <xsl:value-of select="//core:type[@id='publisher_type']/@id"/>
> </xsl:template>
> 
> I know it's a stretch, but these three templates return different results for
> the same document.
> 
> -Ray




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.