Subject: Re: [xsl] Some general questions... From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Thu, 14 Feb 2002 14:21:53 +0000 |
Hi Ragulf, > Problem is, I can't find anywhere in the code where "Something" is > called (except in the template itself). I would guess that the > function/template will never be used in the stylesheet, but is there > perhaps another way of invoking a called template than <xsl:call > template name="Something"> ..? No - the only way that you can call a template by name is through xsl:call-template. Though you should make sure that the stylesheet is never imported or included into another stylesheet that *does* make use of the Something template before you get rid of it. > Is it possible to load an XSL stylesheet using the command > LoadXML(string) the same way as with an XML document. Yes, you should be able to do it without problems. Make sure that the DOM into which you're loading the stylesheet isn't trying to validate the stylesheet or do anything funny like that. After your attempt to load the XSLT stylesheet as a string, have a look at the parseError on the DOM object to see whether that tells you anything helpful about why the load is failing. > When do I have to pass what I want as parameters and when can I > refer to a variable that has been declared not globaly but within an > applied template? If a variable is defined within a template, it is only ever available within that template. It is never available within any other templates that you apply or call from the template in which you define the variable. Likewise, a variable is never available within the template that called or applied the template that defines the variable. So you *always* have to pass values as parameters into other templates (or define the variable as a global variable). And to 'pass' a value back to a calling template, you have to make the value the result of the template. I hope that clears things up, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Some general questions..., Ragulf Pickaxe | Thread | [xsl] a rather stupid question abou, 林 子芯 |
RE: [xsl] Elements with Mixed conte, Andrew Welch | Date | RE: [xsl] alternate row color in a , Sébastien Tisserant |
Month |