Let's recap.  The following two statements are equivalent and are both
prefix-independent:

<xsl:apply-templates select="sq2:[EMAIL PROTECTED] = 'program-view']"/>

<xsl:apply-templates select="*[local-name() = 'rowset'
        and namespace-uri() = 'http://apache.org/cocoon/SQL/2.0'
        and @name = 'program-view']"/>

The only way to make an XPath expression prefix-dependant (which is
usually bad) is to use the name() function.  Thus the name() function
should be avoided whenever possible, using local-name() in its stead,
or better yet direct expressions such as self::sq2:rowset.

The two statements above should apply to both XML files (which are two
equivalent forms of the same XML data) yielding the same results.

The former statement is preferable, since it's shorter, it's more easily
optimizable (as somebody else pointed out) and you are defining the SQL2
namespace only once, but they should both work on both XML files.

Indeed they do: I just tested all four combinations with xsltproc and
the result is always the same, with both "found page" and "found rowset"


It looks like something is broken in your server installation.


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to