theme.xsl: use of apply-templates instead of copy-of ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

theme.xsl: use of apply-templates instead of copy-of ?

Adrian Baker-2
Could I suggest that the following in theme.xsl

                <!-- Handle meta elements -->
                <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:meta"/>
                <!-- Copy user-defined links -->
                <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:link"/>
                <!-- Copy user-defined stylesheets -->
                <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:style"/>
                <!-- Copy user-defined scripts -->
                <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:script"/>

be changed to use <xsl:apply-templates ../> instead of the copy-of?
Copying is the default action anyway, and using apply-templates allows
scripts src paths in the incoming document to be rewritten using other
templates.

Adrian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: theme.xsl: use of apply-templates instead of copy-of ?

Alessandro  Vernet
Administrator
Adrian,

This makes sense. The change is checked in.

Alex

On 3/11/06, Adrian Baker <[hidden email]> wrote:

> Could I suggest that the following in theme.xsl
>
>                 <!-- Handle meta elements -->
>                 <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:meta"/>
>                 <!-- Copy user-defined links -->
>                 <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:link"/>
>                 <!-- Copy user-defined stylesheets -->
>                 <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:style"/>
>                 <!-- Copy user-defined scripts -->
>                 <xsl:copy-of select="/xhtml:html/xhtml:head/xhtml:script"/>
>
> be changed to use <xsl:apply-templates ../> instead of the copy-of?
> Copying is the default action anyway, and using apply-templates allows
> scripts src paths in the incoming document to be rewritten using other
> templates.
>
> Adrian
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet