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 |
Partager