This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Keyword xsl:call-template may not be used here.
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Keyword xsl:call-template may not be used here.
- From: Jörg Heinicke <joerg dot heinicke at gmx dot de>
- Date: Fri, 12 Oct 2001 02:06:18 +0200
- References: <DF440285D780D311B60300902773A6264E8B75@HOLONET>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Jim,
<xsl:call-template> should cause no problems at that place. But the template
I think you want to call has no name. This is A problem and could cause THE
misleading error message. Which parser/transformer are you using?
And there is no need in your code for using <xsl:element> and
<xsl:attribute>:
<!-- this
> <xsl:element name="img">
> <xsl:attribute
> name="src">http://aiur/XML_Files/TreeView/open.gif</xsl:attribute>
> </xsl:element>
> <xsl:element name="A">
> <xsl:value-of select="name()" />
> </xsl:element>
can be changed to this: -->
<img src="http://aiur/XML_Files/TreeView/open.gif"/>
<a><xsl:value-of select="name()" /></a>
Even for dynamic values you don't need <xsl:attribute>, you can use the so
called "attribute value template":
<img src="{@href}"/>
This takes the value of the attribute href of the matched node to <img
src=".."/>
<xsl:element> is needed for dynamic naming of a new element, <xsl:attribute>
is used for more complex value of an attribute.
Joerg
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list