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

Obtaining the element name

Subject: Obtaining the element name
From: Nigel Hutchison <nwoh@xxxxxxxxxxxxxx>
Date: Mon, 02 Nov 1998 19:20:12 +0100
div margin left 1
I am trying to translate the Microsoft XSL style sheet listed below into
XSL1.0

How do I get at the element type? Is there a functional equivalent to
"tagname" that I can use 
within a template like this to pick out the element type within a template
that matches as follows:

<xsl:template match="*|/"> </xsl:template>


****************************************************************************
*******************++
<xsl>
	<!-- Generic stylesheet for viewing XML -->
	<!-- Note that this stylesheet does not display attributes. -->
	
	<rule>
		<root/>
		<DIV font-family="Courier" font-size="10pt">
			<SPAN color="gray">&lt;<eval>tagName</eval>&gt;</SPAN>
				<children/>
			<SPAN color="gray">&lt;/<eval>tagName</eval>&gt;</SPAN>
		</DIV>
	</rule>

	<!-- Default Rule - matches any element -->
	<rule>
		<target-element/>
		<DIV margin-left="1em">
			<SPAN color="gray">&lt;<eval>tagName</eval>&gt;</SPAN><children/><SPAN
color="gray">&lt;/<eval>tagName</eval>&gt;</SPAN>
		</DIV>
	</rule>

</xsl>


Nigel W. O. Hutchison
Technical Consultant
Software AG Germany		                              
mailto:nwoh@xxxxxxxxxxxxxx
           
Tel +49 (0)6151 92 1207                   
                                                                   *


 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.