xsl-list
[Top] [All Lists]

Re: Naming styles

2004-08-23 08:12:41
Oops, it appears that the light is dimming...

I did change the xsl:include's to xsl:import's but i've got a lot of

xsl:import is not allowed in this position in the stylesheet!

It seems that i can only have xsl:import as the very first instructions of the
stylesheet, right after my <xsl:transform ... >.

Is that so?

Thanks.

Quoting xptm(_at_)sapo(_dot_)pt:

Ah, now i see the light... :):)

Ok, per your explanation it seems i'll be better for me to use imports. The
question i've made about the bad practice will not stand with that aproach.

Thanks for your insight.


Quoting David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>:



Indeed i'm using only includes, not imports. However, i thought that the
two are
basicaly the same, the only diference being their precedence, concept
that
i
don't understand completly.


xsl:include is more or less the same as taking the body of the styleseet
you are including (ie everything inside xsl:stylesheet) and sticking it
at the point that the xsl:include appears.

so if you include two variable definitions for the same variable (or two
templates matching the same thing) that is an error, just as if those
clashing declarations had appeared directly in a single stylesheet.

xsl:import on the other hand has the import precedence feature, the
exact details of which are slightly baroque but the basic idea is
simple: any definitions in the importing styleseet are allowed to
conflict (and over-ride) definitions in the imported styleseet.

the idea being that if you want to import some common (or publicly
accessible) styleseet but make some changes you can import it then just
definie whatever variables or templates you want to define and your
definitions will win.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--









O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--









O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt


<Prev in Thread] Current Thread [Next in Thread>