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
 
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
      <xsl:param name="i"/>
 
    <xsl:template match="/|node() | @*">
        <xsl:copy>
            <xsl:apply-templates select="node()|@*"/> 
        </xsl:copy>
    </xsl:template>
        <xsl:template match="w:binData/@w:name">
        <xsl:attribute name="{name()}" namespace="{namespace-uri()}">
                       <xsl:for-each select="//w:binData">
                        <xsl:for-each select="ancestor::w:r">
                <xsl:for-each select="parent::w:p">
                    <xsl:for-each select="preceding-sibling::w:p[1]">
                        <xsl:for-each select="child::w:r">
                            <xsl:for-each select="w:t">
                                <p>
                    <xsl:value-of select="translate(.,':','_')"></xsl:value-of>
                                </p>
 
                            </xsl:for-each>
                        </xsl:for-each>
                </xsl:for-each>
            </xsl:for-each>
               </xsl:for-each>
              </xsl:for-each>
 
        </xsl:attribute>
        </xsl:template>
 
    </xsl:stylesheet>l
ce code xslt me renvoit le resultat suivant
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
<w:binData w:name="Figure 1_ Electronic Document Management SystemFigure 2_ Statuses of CAT 1 and CAT 2 documentsFigure 3_ Statuses of CAT 3 documentsFigure 4_ Standard lifecycle for CAT 1 &amp; CAT 2 documentsFigure 5_ Standard lifecycle for CAT 3 documentsFigure 6_ Legacy / Scanned lifecycleFigure 7_ Review workflow for all categories documentFigure 8_ Approval workflow, parallel with final approverFigure 9_ Periodic Review workflow">
il me renvoit tous les noeuds
kk& sait comment faire pour qu'il rebnvoit un seul noeud??
merci davance