Re: xslt et xsltproc
Bonjour,
Edouard Boucher wrote:
bonjour,
j'ai un document xml qui resemble en gros a ca :
<top>
<bas id="foo"/>
<bas id="bar"/>
</top>
.../...
voici ce que dit la doc officile du w3 : (http://www.w3.org/TR/xslt11/#multiple-output) :
Attention! Il n'est pas inutile de lire le statut de cette spécification:
"Status of this Document
This document is a W3C Working Draft for review by W3C members and other
interested parties.
NOTICE:
As of 24 August 2001 no further work on this draft is expected. The work
on XSLT 2.0 identified a number of issues with the approaches being
pursued in this document; solutions to the requirements of XSLT 1.1 will
be considered in the development of XSLT 2.0 [XSLT20REQ]. Other than
this paragraph, the document is unchanged from the previous version."
En d'autres termes, il s'agit d'une version de travail "abandonnée" par
le W3C et libxslt (xsltproc) fait référence à (et implémente) XSLT 1.0:
http://www.w3.org/TR/xslt
dont la VF est disponible sur XMLfr:
http://xmlfr.org/w3c/TR/xslt/
La mauvaise nouvelle c'est que "xsl:document" est un ajout de XSLT 1.1
et qu'il n'y a pas de moyen standard et portable de faire la même chose
en XSLT 1.0.
La bonne nouvelle, c'est que libxslt supporte les extensions EXSLT:
http://www.exslt.org/
et que la feuille:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl">
<xsl:template match="bas">
<exsl:document href="{@id}.html" method="html">
<html/>
</exsl:document>
</xsl:template >
</xsl:stylesheet>
Fait ce que tu cherches.
Cordialement,
Eric van der Vlist
--
Rendez-vous à Paris pour le Forum XML.
http://www.technoforum.fr/Pages/forumXML01/index.html
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
http://xsltunit.org http://4xt.org http://examplotron.org
------------------------------------------------------------------------
Reply to: