aspose file tools
The moose likes XML and Related Technologies and the fly likes XSLT: How to show the Tag NAME? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "XSLT: How to show the Tag NAME?" Watch "XSLT: How to show the Tag NAME?" New topic
Author

XSLT: How to show the Tag NAME?

Gabriel Cane
Ranch Hand

Joined: Mar 27, 2001
Posts: 39
I'm writing an XSL file to transform an XML file into HTML. What I would like to know is how would I output the NAME of the tag I'm dealing with.
For example:
For an XML file (elements.xml)
<PERIODIC_TABLE>
<ATOM>Hydrogen</ATOM>
<MOLLECULE>H20</MOLLECULE>
</PERIODIC TABLE>
What would I need in my XSL to output the following HTML:
<p>ATOM</p>
<p>MOLLECULE</p>
I know how to output the text within the tags (Hydrogen or H20) and the attributes. It's getting the name of the tags I haven't been able to figure out.
Thanks.


Sun Certified Programmer for the Java 2 Platform
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
There is name() function right for it!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSLT: How to show the Tag NAME?
 
Similar Threads
problem in xsl
XML Tranformation using XSLT
trapping html tags in xml element values
JSP+XSL -> WML ??
question on apply-templates