[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Keyword xsl:call-template may not be used here.

Subject: Re: Keyword xsl:call-template may not be used here.
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Fri, 12 Oct 2001 02:06:18 +0200
call keyword in xml
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.