ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
[xsl] applying templates to an attribute
by Eric Smith other posts by this author
Dec 18 2001 10:40PM messages near this date
[xsl] Re: RE: Converting attributes to elements and preserving the hierarchy | Re: [xsl] applying templates to an attribute - and adding markup
I find the following very useful and simple.
( BTW $output is a parameter)

xml:

John <alt executive="is creating" other="has created" another="will create"/> 
a new product.

xsl:

   <xsl:template match="alt"> 
     <xsl:value-of select="@*[name()=$output]"/> 
   </xsl:template> 

But I cannot put any markup in the content, like if I want
John <i> will</i> create a new product.

Any suggestions?

-- 
Eric Smith - currently using xalan and xsltproc - what a difference speed makes - and fop on
 linux

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
Thread:
Eric Smith
Joerg Heinicke
Joerg Heinicke
Eric Smith
David Carlisle
Michael Kay
Wendell Piez

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved