[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Fw:
Subject: Fw:
From: "mohamed" <mohamed@xxxxxxxxx>
Date: Tue, 1 Feb 2000 15:35:31 -0500
|
I'm trying to call templates based on attribute
names:
<?xml version="1.0"?> <testText
> <text bold="yes">WITH BOLD</text>
<text bold="yes" italic="yes"> WITH BOLD AND
ITALIC</text> </testText>
so I declared templates that are called
and match bold and italics,
<xsl:template match="bold"
name="bold"> <b>
<xsl:apply-templates/>
</b> </xsl:template>
<xsl:template match="italics"
name="italics"> <i>
<xsl:apply-templates/> </i> </xsl:template>
and I want to get an output as
follows:
<b>WITH BOLD</b>
<b><i>WITH BOLD AND
ITALIC</i></b>
but because the
<xsl:apply-templates match=""> and the
<xsl:call-template name=""> don't evaluate
expressions (like a variable $att whose value is bold, or the name() function
that returns the name of the attribute) within the match and the name attributes
I couldn't call the templates!
I don't know how many attributes I'll have (bold,
italics, small, .... etc) so I want to make it flexible enough so adding one
more attribute requires just adding a new template that matches it.
any suggestions?!
thanks ........
----------------------------------
Mohamed Abdelrahman
|
Current Thread |
- Fw:
- mohamed - Tue, 1 Feb 2000 15:35:31 -0500 <=
|
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|