tags:

views:

67

answers:

2

Hi,

I've got an xml which shoule be transformed using XSLT but there are "." in the Tag and in cause of that it doesn't work. But the . is allowed in XML-Tags. Can anybody give me a hint on transforming such a file: XML:

<root.element>
   <test.element>Hello World</test.element>
</root.element>

XSLT:

<xsl:template match="/">
   <test><xsl:value-of select="root.element/test.element"/></test>
</xsl:template>

Thanks for your help.

marc

A: 

xsltproc (libxslt) transforms it properly. But you may try to push it in predicate:

<xsl:value-of select="node()[name()='test.element']"/>
mikesub
A: 

It should work. Tried it with the MS XSLT parser and it works okay.

I did wonder if the problem is in the XPath expression as the dot character has special meaning in XPath, but seems okay.

What is the exact error?

tjmoore