|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] ***********Transformation of an XML document containin
Hi everyone,
it seems not possible to transform an XML document containing a default
namespace with XSLT in an other XML document containing the same default
namespace. Is it true or false ? When I try to transform this example
document :
"element.xml" -->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<element xmlns="http://www.e-xmlmedia.com/test/">
<titi>titi</titi>
<toto>toto</toto>
<tata>tata</tata>
</element>
in this one :
"result.xml"-->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ELEMENT xmlns="http://www.e-xmlmedia.com/test/">
<TITI>titi</TITI>
<TOTO>toto</TOTO>
<TATA>tata</TATA>
</ELEMENT>
via this stylesheet :
"element.xsl" -->
<xsl:stylesheet version="1.0" xmlns="http://www.e-xmlmedia.com/test/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/element">
<ELEMENT xmlns="http://www.e-xmlmedia.com/test/">
<xsl:apply-templates />
</ELEMENT>
</xsl:template>
<xsl:template match="test:titi">
<TITI>
<xsl:value-of select="." />
</TITI>
</xsl:template>
<xsl:template match="test:toto">
<TOTO>
<xsl:value-of select="." />
</TOTO>
</xsl:template>
<xsl:template match="test:tata">
<TATA>
<xsl:value-of select="." />
</TATA>
</xsl:template>
</xsl:stylesheet>
But it doesn't work. I want in both document the same default namespace to
be present in order to make the documents valid. But if I do like this, the
XSLT transformation find the information but doesn't put any of the tags in
uppercase and so my browser can't use it. In fact I obtain this file
"result.xml" :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
titi
toto
tata
What's wrong ? Isn't it possible to transform a document containing a
default namespace ???????????
Thanks for any help, I really don't understand this !
Florence Amardeilh.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








