This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Some general questions...
- From: "Ragulf Pickaxe" <jawxml at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 14 Feb 2002 13:48:41 +0000
- Subject: [xsl] Some general questions...
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello all,
I have some questions about things I am unsure of. I think all the questions
are in the easy catagory. Hope at least one of you will take the time to
answer the questions below :)
Q1:
I have "taken over" some xsl-stylesheets made by another. In this code there
is a good textbook example of recursion as follows:
<xsl:template name="Something">
<xsl:param name="sString"/>
..
<xsl:call-template name="Something"> <!-- without s in template -->
<xsl:with-param name="sString">
<xsl:value-of select="substring($sString, 2)"/>
</xsl:with-param>
</xsl:template>
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"> ..?
Q2:
Is it possible to load an XSL stylesheet using the command
LoadXML(string) the same way as with an XML document.
I have only seen examples of either
oXML=load(/file) or oXML=loadXML(string)
But only
oXSL=load(/file) not oXSL=loadXML(string)
I have been told that "of course" it is possible - XSL stylesheets are
written in XML. But I have not been able to do this despite being (pretty)
sure that the stylesheet is correct. I am using msxml3.0 working with VB, if
this information is neccesary for solution.
Q3:
I know that the following question should be easily obtained from books on
XSL, but what I have read does not seem to stick :(
Unsure of scope when applying/calling
<xsl:template match="This"> and
<xsl:template name="That">
when the variable has been declared in <xsl:template match="First">:
<xsl:template match="First">
<xsl:variable name="Question" select="'Range'"/>
<xsl:call template name="That"/>
<!-- Will "That" know about $Question ? -->
<xsl:apply-template match="This"/>
<!-- Will "This" know about $Question ? -->
</xsl:template>
<xsl:template match="This">
..
</xsl:template>
<xsl:template name="That">
..
</xsl:template>
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?
Thank you all
Ragulf Pickaxe :)
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list