[XSLT] Problème ordre balisage
Bonjour à tous,
Voilà j'ai un petit problème que je n'arrive pas à résoudre... J'ai un fichier xml que je transforme via un filtre XSLT de façon à le simplifer. Hors j'ai un message d'erreur qui me dit
Citation:
<Tableau> est un élément de table incorrect ou n'apparaît pas dans le bon ordre.
Voici l'extrait correspondant de mon xslt qui me semble pourtant correct...
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:wne="http://schemas.microsoft.com/office/word/2002/8/wordml"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/">
....
<xsl:template match="w:tblGrid">
<xsl:element name="Tableau">
<xsl:variable name="nbColonne" select="count(w:gridCol)" />
<xsl:attribute name="aid:trows">
<xsl:value-of select="($nbColonne)"/>
</xsl:attribute>
<xsl:attribute name="aid:tcols">
<xsl:value-of select="($nbColonne)"/>
</xsl:attribute>
<xsl:attribute name="aid:table">
<xsl:text>table</xsl:text>
</xsl:attribute>
....
<xsl:apply-templates select="w:tc" />
</xsl:element>
</xsl:template>
<xsl:template match="w:tc">
<!-- Création d'un élément par défaut 'entry'-->
<xsl:element name="Cellule">
<xsl:attribute name="aid:ccolwidth">
<xsl:text>226.27165354321656</xsl:text>
</xsl:attribute>
<xsl:attribute name="aid:ccols">
<xsl:text>1</xsl:text>
</xsl:attribute>
<xsl:attribute name="aid:crows">
<xsl:text>1</xsl:text>
</xsl:attribute>
<xsl:attribute name="aid:table">
<xsl:text>cell</xsl:text>
</xsl:attribute>
</xsl:element>
</xsl:template>
....
</xsl:stylesheet> |
En fait j'ai remarqué que c'est mon attribut 'aid:table' de mon élément 'Cellule' qui pose problème car si je le mets en commentaire je n'ai pas d'erreur et le problème c'est qu'il me le faut absolument...:(
Est-ce que quelqu'un a une idée sur cette erreur ?
Merci d'avance pour vos réponses.