Subject: [xsl] Re: Efficiency, use param in key? From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Fri, 2 Aug 2002 22:58:38 -0700 (PDT) |
--- Christopher_Dant at jackmorton dot com wrote: > On working a stylesheet that processes a multimedia-course storyboard > and > returns text, CRLF-delimited, sorted, lowercase, no-duplicates > filenames I > have several questions: > > 1. is there anything I should do to improve it (make it more > efficient)? Not too much: 1. Avoid expressions like "//file_audio" whenever possible. Probably this is just "file_audio", or "$someFixedPath/file_audio" ? 2. <xsl:text disable-output-escaping="yes">
</xsl:text> ^^^^^^^^^^ This seems strange to me. > > 2. is it possible to use the param "ele" in key, apply-templates and > template? This would make it possible for a single stylesheet to look > for > file_audio, file_video or file_graphic tags. The "match" attribute of xsl:key and xsl:template cannot contain variable references -- this is said in order to prevent circular definitions, as global variables can be defined using the key() function or xsl:apply-templates. Due to the same reason the "use" attribute of xsl:key cannot contain variable references. Variable references can be used in the value of the "select" attribute of xsl:apply-templates. > > 3. Or perhaps I should actually ask, is there a way to rework my > approach > so I can parameterize it? One way to parameterise the usage of keys is to pass their ***name*** as parameter to a template. Hope this helped. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Efficiency, use param in , Robert S. Koberg | Thread | Re: [xsl] Re: Efficiency, use param, Christopher_Dant |
[xsl] Efficiency, use param in key?, Christopher_Dant | Date | Re: [xsl] Efficiency, use param in , Marrow |
Month |