Subject: [xsl] Re: Re: Comparing Node Text Content with a String Set From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Tue, 28 Oct 2003 19:26:54 +0100 |
Thanks to Wendell for answering this -- I see this message only now and do not have anything to add to Wendell's reply. Using global-scope elements in a user-defined namespace for defining any necessary program-data structure is a well-known XSLT design pattern. It is superior to and cleaner than using dummy named templates that shouldn't be called. There are many, many examples in this list of using this design pattern. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL "Passin, Tom" <tpassin@xxxxxxxxxxxx> wrote in message news:5D3C2276FD64424297729EB733ED1F7603B0EB49@xxxxxxxxxxxxxxxxxxxxxx > [ Dimitre Novatchev] > [ > > > You can actually also put the lookup table into a named > > template in the > > > stylesheet. You can access it via > > > document('')/xsl:stylesheet/xsl:template[name="..."], where > > "..." is the > > > name of the template. This way you do not need to coordinate and > > > maintain an extra external file. > > > > Yes, but if you happen to call this named template the > > lookup table has > > good chances to appear in the output... > > > > It is shorter and safer to have the table as a child of the > > xsl:stylesheet > > element. > > > > If you use a named template, it should not get invoked by mistake > because it will never match anything, and you would only call it where > you want the lookup to be done. On the other hand, the stylesheet > element is not allowed to have arbitrary elements as direct children, so > that route won't work. > > Cheers, > > Tom P > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Re: Comparing Node Text C, Wendell Piez | Thread | RE: [xsl] Re: Comparing Node Text C, Passin, Tom |
RE: [xsl] Re: Comparing Node Text C, Passin, Tom | Date | [xsl] logical operators in *test*, Aananth.S |
Month |