|
[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.
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








