I don't have enough information to reproduce your problem.

string name(node-set?)

The XPath name() function returns the QName of the node in the argument
node-set that is first in document order.  If the argument node-set is
empty or has no local name, an empty string is returned.  If the argument
is omitted, it defaults to a node-set with the context node as its only
member.

The following stylesheet example will output all the element names in an
XML document.

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'>
 <xsl:template match='/'>
  <xsl:for-each select='.//*'>
   <xsl:text> ElementName = /</xsl:text>
   <xsl:value-of select='name()'/>
   <xsl:text>/</xsl:text>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

This works with the Xalan command-line utility.

Sincerely,
Steven J. Hathaway

===============================

Hi,
I'm using xalan-1_11 and I'm trying to extract the XML element node *name*
of a given \
XML. I searched the web and found several options - none are working with
Xalan.

Here is the XML I have:

<?xml version="1.0" encoding="utf-8"?>
<Envelope>
  <Body>
    <RetrieveWalletInformation>
      <Originator>string</Originator>
      <UserData>
        <UserID>1</UserID>
        <MVNOID>1</MVNOID>
        <LREId>1</LREId>
        <CountryCode>string</CountryCode>
      </UserData>
      <BodyData>
        <PortInReq>string</PortInReq>
        <MVNOID1>1</MVNOID1>
      </BodyData>
    </RetrieveWalletInformation>
  </Body>
</Envelope>

Reply via email to