I have tried the
following:
<?xml
version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template
match="*">
<xsl:element name="local-name()" />
</xsl:template>
<xsl:element name="local-name()" />
</xsl:template>
</xsl:stylesheet>
I was expecting to
get a single element with a name of the top element. Unfortunately I got
<?xml
version="1.0" encoding="UTF-8"?>
file:///C:/WINDOWS/jbproject/XMLTransformation/calls.xsl; Line 4; Column 38; Illegal value used for attribute name: local-name()
file:///C:/WINDOWS/jbproject/XMLTransformation/calls.xsl; Line 4; Column 38; Illegal value used for attribute name: local-name()
When I replace the
offending xsl:element line with <xsl:value-of select="local-name()"
/> I get:
<?xml
version="1.0" encoding="UTF-8"?>
PHONE_RECORDS
PHONE_RECORDS
As I understand the
specification:
"The
xsl:element
instruction allows an element to be created with a computed name. The expanded
QName of the element to be created is specified by a
required name attribute and an
optional namespace
attribute."I am probably
being naive, but I would appreciate any help
Phil
Rice
