Article View: fr.comp.text.xml
Article #9317Re: [XSL] Generation de namespace
From: Joel Fillon
Date: Fri, 27 Apr 2001 12:06
Date: Fri, 27 Apr 2001 12:06
66 lines
2911 bytes
2911 bytes
> > j'obtiens :
> > <ns0:stylesheet xmlns:ns0="http://www.w3.org/1999/XSL/Transform"/>
> > J'utilise xalan, je voudrais obtenir :
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
> Note que c'est bien la meme chose.
C'est vrai mais si je repete l'attribut namespace a chaque creation
d'element, sur le fichier :
<root>
<rule/>
<rule/>
</root>
avec le xsl :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:element name="xsl:stylesheet"
namespace="http://www.w3.org/1999/XSL/Transform">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="rule">
<xsl:element name="xsl:template"
namespace="http://www.w3.org/1999/XSL/Transform">
</xsl:element>
</xsl:template>
</xsl:stylesheet>
j'obtiens :
<ns0:stylesheet xmlns:ns0="http://www.w3.org/1999/XSL/Transform">
<ns1:template xmlns:ns1="http://www.w3.org/1999/XSL/Transform"/>
<ns1:template/>
</ns0:stylesheet>
> Sinon il y a un exemle dans la rec., sec 7.1.1, a
> http://www.w3.org/TR/xslt#literal-result-element
Oui, j'ai deja essaye d'utiliser les namespace-aliases mais xalan
ne genere pas les prefixes resultats :
Avec :
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
xmlns:alias = "monAlias">
<xsl:namespace-alias stylesheet-prefix = "alias" result-prefix = "xsl" />
<xsl:template match = "/" >
<alias:stylesheet>
<alias:template match = "/" >
<alias:text >Hello, world!</alias:text>
</alias:template>
</alias:stylesheet>
</xsl:template>
</xsl:stylesheet>
j'obtiens :
<alias:stylesheet xmlns:alias="http://www.w3.org/1999/XSL/Transform">
<alias:template match="/">
<alias:text>Hello, world!</alias:text>
</alias:template>
</alias:stylesheet>
J'oublie peut-etre de configurer un parametre de xalan ?
En tout cas, merci de t'interesser a mon pb.
Technical Details
Message-ID:
<3AE960CC.A31ADF97@sophia.inria.fr>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!ciril.fr!ema.fr!bego.cma.fr!news-sop.inria.fr!not-for-mailReferences:
<3AE9342B.A6FE1E29@sophia.inria.fr> <wyitjqu1df.fsf@polya.u-strasbg.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII-7-bit X-Google-Thread: 114f60,c8d04928927d5d5f X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-04-27 05:20:13 PST Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!ciril.fr!ema.fr!bego.cma.fr!news-sop.inria.fr!not-for-mail From: Joel Fillon <jfillon@sophia.inria.fr> Newsgroups: fr.comp.text.xml Subject: Re: [XSL] Generation de namespace Date: Fri, 27 Apr 2001 14:06:36 +0200 Organization: INRIA Sophia Antipolis Lines: 66 Message-ID: <3AE960CC.A31ADF97@sophia.inria.fr> References: <3AE9342B.A6FE1E29@sophia.inria.fr> <wyitjqu1df.fsf@polya.u-strasbg.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