This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes how do i get the name of a node as my element name in XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how do i get the name of a node as my element name in XSL" Watch "how do i get the name of a node as my element name in XSL" New topic
Author

how do i get the name of a node as my element name in XSL

shoeb sayyed
Ranch Hand

Joined: Mar 14, 2010
Posts: 48


In this example I want the element name to be same as the child node I get. Can you please tell me how is that possible using XSLT


Thanks,
Shoeb
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

The XPath function which gives you the name of the context node, if it's an element, is

You might find it easier to get a book about XSLT, rather than waiting for random people on the Internet to tell you things like this. Reserve your forum posts for programming problems.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how do i get the name of a node as my element name in XSL
 
Similar Threads
Viktors 141 Sample Test: Question 27
Can Not XSL-Transform Something so Simple.
xsl getNext to sort output
XSL problem
How to insert a structure into XML