Bonjour,

je veux découper, suivant certaines balises,un seul fichier XML
pour créer plusieurs fichiers XML en utilisant xsltproc.
Bonjour,

Très bon choix XSLTProc, monsieur/madame à du goût (bon, faut que j’arrête le thé moi, je bois trop de thé vert)

Bon, sérieusement, c’est une colle, parce que je ne l’avais jamais fait; et pas beaucoup d’information claire à ce sujet sur le web, si ce n’est dans le contexte d’une chaîne DocBook.

J’ai trouvé ça : Re: [ xslt ] xsltproc and multiple file output.
On Sun, May 27, 2001 at 12:08:02AM +1000, Robert Collins wrote:
> Hi!
>     I'm trying to process docbook xsl-stylesheet's with xsltproc. I see
> from  http://xmlsoft.org/XSLT/#News  that as of 0.4.0 multiple file output
> should be present... I cannot seem to find any doco on the xsl elements
> needed to use this..

  Hi, first make sure you have a recent version like 0.10.0 and also 
a recent version of libxml2 (2.3.9).

> Obviously I will need to customise the docbook stylesheet once I know
> how to to multi-file output with xsltproc, and if successful I'll send
> in such customisations to docbook, so that xsltproc can be supported
> ootb.

  Multiple file output are extensions to the standard XSLT-1.0 . libxslt
implements 4 syntaxes, the Xalan, XT, and Saxon's processors ones. But
the one I recommend, is  the 4th one, from the XSLT-1.1 working draft.
    http://www.w3.org/TR/xslt11/#multiple-output
 

  there is an example in the distribution in the tests/multiple directory,

Daniel


Qui renvoie à une fonctionnalité XSLT 1.1 : XSLT 1.1 / 16.5 Multiple Output Documents

J’utilise personnellement XSLTProc pour XSLT 1.0, alors je ne pourrai pas t’en dire plus. Je sais seulement que XSLTProc supporte quelques extensions à XSLT (comme les XPath contenant des variables), mais ça, c’est à essayer.

Mauvais signe, ça n’apparait plus dans la spécification XSLT 2.0 : XSL Transformations (XSLT) Version 2.0. Une proposition qui aurait été abandonné. La méthode serait alors spécifique à chaque processeur XSLT ?

Essaie ça (la solution basée sur XSLT 1.1) et ensuite on avisera en fonction du résultat.
Modifié par hibou57 (16 Jan 2011 - 07:44)