xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Ende <mli...@e-beyond.de>
Subject xml with dots in tags
Date Tue, 01 Dec 2009 09:39:20 GMT

since yesterday I've got a project on xslt transformation from one xml 
to another schema.
But within the source-xml they've got '.' in the tags. For example:

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

If I try to access the value with such xslt I got nothing:

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

It I try it without dot's:
<test>Hello World</test>
<xsl:template match="/">
   <test><xsl:value-of select="root/test"/></test>

Everything works fine. I tried to escape the dots in the select with 
'\.' but that doesn't
work. In XPath there was the . mentioned as a replacement for a 
character. So it should
also work on '.' I think.

Does anybody has an idea?

By the way. Is there any way to 'copy' parts of one xml in the other xml 
within the transformation?
It would be helpful if there are parts which doesn't need to transformed 
(just copied).

Thanks for your help!


View raw message