cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suzan Foster <suzan.fos...@nerocmediaware.nl>
Subject Re: Namespace: behaviour differences
Date Fri, 20 Jul 2007 12:49:58 GMT
Derek Hohls schreef:
> <xsl:template match="page">
>   <tr><td>found page</td></tr>
>   <xsl:apply-templates select="*[local-name()='rowset' and
> @name='program-view' and
> namespace-uri()='http://apache.org/cocoon/SQL/2.0']"/>
> </xsl:template>
>  
> <xsl:template match="sq2:rowset[@name='program-view']">
>   <tr><td>found rowset</td></tr>
> </xsl:template> 

The select in your apply-templates isn't necessarry. The matcher on the 
template already defines what will be output. The following should be 
sufficient:

<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sq2="http://apache.org/cocoon/SQL/2.0">

    <xsl:template match="page">
        <tr><td>found page</td></tr>
        <xsl:apply-templates/>
    </xsl:template>
 
    <xsl:template match="sq2:rowset[@name='program-view']">
        <tr><td>found rowset</td></tr>
    </xsl:template>

</xsl:stylesheet>


Regards,
Suzan Foster.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message