Re: Finding element name of content node
At 10:59 AM 4/11/2006, you wrote:
I can't seem to find the answer to this question anywhere. Can someone help?
Yep. (Odd that you can't find the answer.)
How do I find out the name of the current content node?
If I understand what you mean by the "current content node", you want the XPath function "name()" (for the namespace-qualified name) or "local-name()" (the unqualified name). Use either one without an argument and retrieve the name of the context node by default.
The Mulberry XSLT Quick Reference, available for download at http://www.mulberrytech.com/quickref/index.html, lists all the XPath functions and operators (in addition to much else). While it doesn't explain what they are for, it does elucidate their syntax, and usually their names provide good hints (to English speakers anyway :-) as to their semantics. Once you know the name of a function you think might do the job, a search engine gives you all the help you need.
The "horse's mouth" in this case is the W3C spec itself: the XPath 1.0 Recommendation is at http://www.w3.org/TR/xpath).
Good luck, Wendell
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