Subject: Re: [xsl] Naming styles From: xptm@xxxxxxx Date: Fri, 20 Aug 2004 16:12:47 +0100 |
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. I even thought that they are interchangeble without problems in most of the cases (altought that make me wonder why there are two elements to do the same thing...) So if i understand correctly, if i have several equal definitions of vars or templates in several xsl, using import only one of the definitions is "valid" while if i use include that will lead to conflict problems? Regards. Quoting David Carlisle <davidc@xxxxxxxxx>: > > > I have several imports, like this > > > actually you showed xsl:include for which the "best practices" need to > be slightly different than for xsl:import. > > If I'm using xsl:import (which I do, mostly) I usually try to make sure > that any variables are defined in each stylesheet, either by having an > explicit xsl:variable... or xsl:importing some stylesheet that defines > the variable. > > > when pulling together a complete stylesheet by importing all the > components, the import precedence rules will mean that all but one of > the variable definitions will be ignored so you just have to make sure > that the one you want is the one with highest precedence. > > If you use xsl:include however, multiple definitions of the same variable > would lead to redfinition errors and so there you need to make sure that > your component stylesheets _don_t (re)define the variables. > > 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 > ________________________________________________________________________ > > O SAPO ja esta livre de vmrus com a Panda Software, fique vocj tambim! Clique em: http://antivirus.sapo.pt
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Naming styles, David Carlisle | Thread | Re: [xsl] Naming styles, David Carlisle |
Re: [xsl] Naming styles, David Carlisle | Date | RE: [xsl] Naming styles, xptm |
Month |