[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

***********Transformation of an XML document containin

Subject: ***********Transformation of an XML document containing a default namespace ************
From: "florence amardeilh" <florence.amardeilh@xxxxxxxxxxxxx>
Date: Wed, 24 Oct 2001 10:50:24 +0200
transform default namespace
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.