[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Overrid items that are included

Subject: RE: Overrid items that are included
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 26 Sep 2004 12:01:46 -0700
karl fawcett
It makes sense to me, that the WORKING_TEMPLATE should be able to override
any included template rules by the BASE_TEMPLATE since the inclusion is not
happening directly by the WORKING_TEMPLATE.

I think of the included template as a means to modularize my templates.  The
template rules I intend to place into an include template will never be
overridden by my BASE_TEMPLATE since they are the BASE_TEMPLATE (if that
makes sense).  However, I will import the BASE_TEMPLATE and just want to
insure that I will be able to override those template rules which have been
included by the BASE_TEMPLATE.

Karl


-----Original Message-----
From: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx]
Sent: Sunday, September 26, 2004 11:41 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Overrid items that are included


----- Original Message -----
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Sunday, September 26, 2004 7:11 PM
Subject:  Overrid items that are included


> Hello,
>
> If I have a base template that I import into the current working template,
> if that base template file *includes* other templates, can those included
> templates be overridden just as if they were originally part of the base
> template file?
>
> Let me illustrate:
>
> incl_template_a.xsl
> incl_template_b.xsl
>
> BASE_TEMPLATE.xsl
>  INCLUDES-->  incl_template_a.xsl
>  INCLUDES-->  incl_template_a.xsl
>
> WORKING_TEMPLATE.xsl
>  IMPORTS--> BASE_TEMPLATE.xsl
>
>
> The question:  Is it possible to override template rules in
> incl_template_a
> & _b within WORKING_TEMPLATE.xsl?
>
> Karl
>
>
I may well be wrong but if you include files and then override a template,
by writing a new one with the same match and mode then the processor can
either use the latter one or error so it's not a reliable method. If you
xsl:import then the base stylesheet module has priority so you can now write
override templates in a similar fashion to your post.

--

Joe

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.