Re: [xsl] Finding element name of content node

Subject: Re: [xsl] Finding element name of content node
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 11 Apr 2006 11:10:50 -0400
Ed,

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


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread