j'ai un probleme avec le formatage de mon xml.
Voici une partie du fichier xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?xml version="1.0" encoding="ISO-8859-15"?>   
<itsm xmlns="urn:schemas-microsoft-com:office:spreadsheet"...> 
 <sheet name="ServicekatalogExcel">
    <Cell ss:StyleID="s62"><Data ss:Type="String"><B>Modul</B></Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Moduldescription</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Quantite</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Dure</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Prix Unitaire</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Rabais</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Prix Total</Data></Cell>
</sheet>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
  <Style ss:ID="s62">
   <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"
    ss:Bold="2"/>
  </Style>
 </Styles>
</itsm>
et suit le fichier xsl:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
 
<?xml version="1.0" encoding="ISO-8859-15"?>
<xsl:stylesheet version="1.0"...> 
<xsl:template match="/">
<xsl:processing-instruction name="mso-application">progid="Excel.Sheet"</xsl:processing-instruction>
  <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"...>
    <xsl:apply-templates/>
  </Workbook>
 <xsl:for-each select="sheet">
  <Worksheet ss:Name="{@name}">
  <Table>
  <xsl:apply-templates select="cell" mode="rows">
  <xsl:sort select="@row" data-type="number" /> 
  </xsl:apply-templates>
  </Table>
  </Worksheet>
 </xsl:for-each>
</xsl:template>
<xsl:template match="/*">
  <Worksheet>
  <xsl:attribute name="ss:Name">
  <xsl:value-of select="local-name(/*/*)"/>
  </xsl:attribute>
    <Table x:FullColumns="0" x:FullRows="0">
        <xsl:for-each select="*[position() = 0]/*">
          <Cell ss:StyleID="@ID"><Data ss:Type="String">
          <xsl:value-of select="local-name()"/>
          </Data></Cell>
        </xsl:for-each>
      <xsl:apply-templates/>
    </Table>
  </Worksheet>
</xsl:template>
<xsl:template match="/*/*">
  <Row>
    <xsl:apply-templates/>
  </Row>
</xsl:template>
<xsl:template match="Row">
<xsl:attribute name="style">
 <xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
<xsl:template match="/*/*/*">
  <Cell><Data ss:Type="String">
    <xsl:value-of select="."/>
  </Data></Cell>
</xsl:template>
  <xsl:template match="cell" mode="cols">
    <Cell ss:Index="{@col}">
      <xsl:if test="@formula">
        <xsl:attribute name="ss:Formula">
          <xsl:value-of select="@formula"/>
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="@style">
        <xsl:attribute name="ss:StyleID">
          <xsl:value-of select="@style"/>
        </xsl:attribute>
      </xsl:if>
      <Data ss:Type="{@type}">
        <xsl:value-of select="."/>
      </Data>
    </Cell>
  </xsl:template>
<xsl:template match="font">
 <Font ss:FontName="{@name}">
  <xsl:if test="10">
   <xsl:attribute name="ss:Size">
     <xsl:value-of select="@size"/>
   </xsl:attribute>
  </xsl:if>
  <xsl:if test="bold">
   <xsl:attribute name="ss:Bold">
     <xsl:value-of select="@bold"/>
   </xsl:attribute>
  </xsl:if>
 </Font>
</xsl:template>
</xsl:stylesheet>
Mon probleme c'est que je veux avoir la suite : Modul, Moduldescription etc... en bold mais ceci ne fontionne pas. Quelqu'un pourrais me donner un coup de mains.
Merci