Hello,
J'essaie de copier une partie seulement d'un fichier dans un autre avec xsl:copy-of. Ca marche bien, mais seulement pour le fichier complet...
Voici mon code, fichier à copier:
1 2 3 4 5 6 7
|
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:def="www.ploxien.com/ns/def" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:pr="http://www.arcaciel.com/profil/ns/system" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<body>
Le contenu à copier !!
</body>
</html> |
Et le fichier dans lequel je veux copier:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:def="www.ploxien.com/ns/def" xmlns:pr="http://www.arcaciel.com/profil/ns/system">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="xs:schema">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:def="www.ploxien.com/ns/def" xmlns:pr="http://www.arcaciel.com/profil/ns/system">
<head>
...
</head>
<body>
<xsl:copy-of select="document('body.xhtml')"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet> |
Je voudrais copier uniquement ce qu'il y a dans la balise body:
J'ai pensé mettre
<xsl:copy-of select="document('body.xhtml')/html"/>
Ou
<xsl:copy-of select="document('body.xhtml')/body"/>
Ou encore
<xsl:copy-of select="document('body.xhtml')/html/body"/>
Mais rien à faire
Une idée?
Merci d'avance
Partager