🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.text.xml
Article #9458

Generer un namespace par defaut ds un XSL

#9458
From: Joel Fillon
Date: Wed, 11 Apr 2001 08:14
38 lines
1650 bytes
Bonjour,

j'aimerais generer un fichier XML avec un namespace par defaut
resultant d'une expression XPath.

Plus precisement :
j'ai en entree un fichier

<AAA>monnamespace</AAA>


je voudrais obtenir :

<xsd:schema
   xmlns="monnamespace"
   xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"/>


Pour l'instant dans le fichier XSLT, j'ecris :

<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">

   <xsl:template match="AAA">
      <xsl:element name="xsd:schema" namespace="{.}"/>
   </xsl:template>

</xsl:stylesheet>

et j'obtiens :

<ns0:schema
   xmlns:ns0="monnamespace"
   xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"/>

Merci d'avance pour vos reponses.
Joel
Technical Details
Message-ID: <3AD41263.DE156226@sophia.inria.fr>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!univ-lyon1.fr!news-rocq!news-sop.inria.fr!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII-7-bit
X-Google-Thread: 114f60,7291422bfd81e6bc,start
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-04-11 02:04:51 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!univ-lyon1.fr!news-rocq!news-sop.inria.fr!not-for-mail
From: Joel Fillon <jfillon@sophia.inria.fr>
Newsgroups: fr.comp.text.xml
Subject: Generer un namespace par defaut ds un XSL
Date: Wed, 11 Apr 2001 10:14:27 +0200
Organization: INRIA Sophia Antipolis
Lines: 38
Message-ID: <3AD41263.DE156226@sophia.inria.fr>
NNTP-Posting-Host: flambis.inria.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.6 [fr] (WinNT; I)
X-Accept-Language: fr-FR,en