Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / tools / docx-templates-twiddling / fixdocprop.xsl @ 187

History | View | Annotate | Download (1.2 kB)

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet 
3
    version="2.0"
4
    xmlns:p="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" 
5
    xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"    
6
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7
    xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
8
    exclude-result-prefixes="w vt p">
9

    
10
  <xsl:output  encoding="UTF-8" standalone="yes" method="xml"/>
11

    
12
  <xsl:param name="template"/>
13
  <!-- identity transform -->
14
  
15
  <xsl:template match="@*|text()|comment()|processing-instruction()" >
16
    <xsl:copy-of select="."/>
17
  </xsl:template>
18
  
19
  <xsl:template match="*" >
20
    <xsl:copy>
21
      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()" />
22
    </xsl:copy>
23
  </xsl:template>
24

    
25
  <xsl:template match="p:Properties">
26
    <xsl:copy>
27
      <xsl:apply-templates select="@*"/>
28
      <property pid="1" name="Template">
29
	<xsl:attribute name="fmtid">
30
	  <xsl:text>{D5CDD505-2E9C-101B-9397-08002B2CF9AE}</xsl:text>
31
	</xsl:attribute>
32
	<vt:lpwstr>
33
	  <xsl:value-of select="$template"/>
34
	</vt:lpwstr>
35
      </property>
36
    </xsl:copy>
37
  </xsl:template>
38
</xsl:stylesheet>