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

RE: ***********Transformation of an XML document conta

Subject: RE: ***********Transformation of an XML document containing a default namespace ************
From: "florence amardeilh" <florence.amardeilh@xxxxxxxxxxxxx>
Date: Wed, 24 Oct 2001 11:45:22 +0200
e xmlmedia
Thanks guys for all your answers. I know that this would be a solution, I
tested it and it works. But the problem is that in my "result.xml" file I
won't obtain the default namespace in my element tag : <ELEMENT
xmlns="www.e-xmlmedia.com/test"> but the test namespace like this : <ELEMENT
xmlns:test="www.e-xmlmedia.com/test"> and I don't want this to occur, I want
to keep my default namespace !
How can I do ? Is this possible ?


-----Message d'origine-----
De : owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]De la part de Chris Bayes
Envoye : mercredi 24 octobre 2001 11:12
A : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet : RE:  ***********Transformation of an XML document
containing a default namespace ************



>I really don't understand this !

Neither do I. That stylesheet is not valid because you haven't declared
the test namespace. Try this.

<xsl:stylesheet version="1.0" xmlns="http://www.e-xmlmedia.com/test/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:test="http://www.e-xmlmedia.com/test/"
exclude-result-prefixes="test"
>

  <xsl:template match="test: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>

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 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.