#1040: Identity template in _common.xsl performs verbatim copies of elements
---------------------+------------------------------------------------------
Reporter: david | Owner: david
Type: defect | Status: new
Priority: normal | Milestone: 1.0
Component: routing | Version: 1.0.0beta9
Severity: normal | Keywords:
Has_patch: 0 |
---------------------+------------------------------------------------------
Example {{{routing.xml}}} snippet:
{{{
#!xml
<configurations xmlns="http://agavi.org/agavi/1.0/config">
<configuration>
<route name="foo" pattern="^/foo">
<boats:rofl xmlns="urn:boats">
<route name="bar" pattern="^/bar$" />
</boats:rofl>
</route>
</configuration>
</configuration>
}}}
Right now, route "bar" never gets copied, because once the XSLT processor
reaches {{{<boats:rofl>}}}, this template (the so-called ''identity
template'') in {{{_common.xsl}}} kicks in:
{{{
#!xml
<xsl:template match="*">
<xsl:copy-of select="." />
</xsl:template>
}}}
Needs to be changed, obviously, to:
{{{
#!xml
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
}}}
That way, the rules for {{{<route>}}} will also be applied to the "bar"
one again.
--
Ticket URL: <http://trac.agavi.org/ticket/1040>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets