|
From: Geoff C. <geo...@oz...> - 2004-05-28 04:09:08
|
Hi all,
First thanks for creating and maintaining XML:XSLT, it's great! My
apologies if posting attachments is frowned upon, please let me know the
correct procedures.
I have altered the module to implement the name() and local-name()
functions, though the name() implementation doesn't support a node-set
yet, the local-name() does, and it doesn't break any of your tests.
My question is related to the following (it may be that I lack enough
knowledge of XSLT and that my mistake is therefore in this rather than
the implementation of the function.):
If I have xml such as:
<structure>
<nucleus>
<protons>1</protons>
<neutrons>0</neutrons>
</nucleus>
</structure>
and an xsl template:
<xsl:template match="structure">
<xsl:value-of select="local-name(nucleus/*[0])"/>
</xsl:template>
it returns "neutrons" wheras if my template says:
<xsl:value-of select="local-name(nucleus/*)"/>
it will return "protons"
Is this an error in my understanding of xslt or just the way I have
implemented the function? Shouldn't /* and /*[0] both refer to the first
child in this context (the xpath spec says just act on the first child
for this function)
Also, if these additions are in accordance with the specs and useful,
are they in the right place? Should any changes be made to add them to
the module?
Cheers,
Geoff
|