[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] transformation: element tag-name to attribute value
Let's say I have a rule: <xsl:template match="section1|section2|section3|section4|section5|section6"> <div class="section1"><xsl:process-children/></div> </xsl:template> Now. Rather than creating an output document that contains div with every class equal to "section1", I want to create div with class "section?" dependant on the particular match alternative that is activated while running through the source document. 1. Is there a syntax, such as section? that acts as a single character 'wild-card' in the match statement? 2. What is the syntax for the right-hand side of the class= statement such that the matched element type name is inserted? I *have* looked at the draft but it doesn't pop out at me. I realize there are probably alternative and better design solutions for this specific instance of the problem, e.g., relying on source attribute values to carry the numeric (ordering) information, etc., but the more general problem of getting the tag name into the output document's attribute set is what I'm trying to understand. Thanks for your help. ...edN 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
|