cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: XSLT and namespaces: two different planets
Date Fri, 25 Aug 2000 18:42:51 GMT
Ed Staub wrote:
> Stefano,
> I don't understand...
> clearly you didn't really move the page, just changed the namespace prefix
> in this context.
> Is the issue that the prefix in the stylesheet has to change if a matching
> _source_ prefix changes?  I don't believe this is true; namespaces are
> matched on the URI, not the prefix.  I haven't checked this to be positive
> that it's implemented correctly in Xalan, but I bet it is.  The XPath spec
> is pretty clear; in section 2.3: "A node test that is a QName is true if and
> only if the type of the node (see [5 Data Model]) is the principal node type
> and has an expanded-name equal to the expanded-name specified by the QName."
> ("Expanded name" is local part + URI.
> Is the issue that the prefix in the stylesheet has to change if a matching
> destination prefix changes?  This can be dodged with <xsl:namespace-alias>,
> assuming it works correctly.
> Or, in door #3... did I miss your point entirely?

No, no, it's me that I've been missing much of the namespace support in
XSLT, my fault.

You're right

 <xsl:template match="my:page">

works on the "real" name, not the prefix and uses the namespace
declaration that is available to that element to figure out what to do. 

I tried it in latest Xalan and it works.

Good, even better, I was afraid of our logicsheets been tight to a
particular prefix but I was wrong.

It feels good to be wrong when it saves you problems :)

Thanks to allo of you for your kind answers. I've read the XSLT spec 10
times now, but I think I have to read it again :)

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message