- Timestamp:
- 04/13/08 00:22:49 (4 years ago)
- Location:
- trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages
- Files:
-
- 2 edited
-
WordprocessingMLPackage.java (modified) (1 diff)
-
filter.xslt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java
r322 r323 182 182 // The JAXB object org.docx4j.wml.Package is 183 183 // custom built for this purpose. 184 185 // TODO - this method currently only puts the main document 186 // part and the styles part into the pkg. 187 // Extend it so that it can optionally do the others as well. 188 // Likewise, the converse. 184 189 185 190 // Create a org.docx4j.wml.Package object -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/filter.xslt
r321 r323 19 19 <!-- One line for each of the things in FilterSettings --> 20 20 <xsl:param name="removeProofErrors"/> <!-- select="'passed in'"--> 21 <xsl:param name="removeContentControls"/> 22 <xsl:param name="removeRsids"/> 21 23 24 22 25 <xsl:template match="@*|node()"> 23 26 <xsl:copy> … … 26 29 </xsl:template> 27 30 31 <xsl:template match="w:proofErr"> 32 33 <xsl:choose> 34 <xsl:when test="$removeProofErrors=true()"> 35 <!-- ignore it --> 36 </xsl:when> 37 <xsl:otherwise> 38 <xsl:copy> 39 <xsl:apply-templates select="@*|node()"/> 40 </xsl:copy> 41 </xsl:otherwise> 42 </xsl:choose> 43 44 </xsl:template> 45 46 <xsl:template match="w:sdt"> 47 48 <xsl:choose> 49 <xsl:when test="$removeContentControls=true()"> 50 <xsl:apply-templates select="w:sdtContent/*"/> 51 </xsl:when> 52 <xsl:otherwise> 53 <xsl:copy> 54 <xsl:apply-templates select="@*|node()"/> 55 </xsl:copy> 56 </xsl:otherwise> 57 </xsl:choose> 58 59 </xsl:template> 60 61 62 <xsl:template match="@w:rsidRPr | @w:rsidDel | @w:rsidR | @w:rsidSect | @w:rsidTr | @w:rsidP | @w:rsidRDefault | w:rsids | w:rsidRoot | w:rsid "> 63 <!-- rsids contains rsidRoot and rsid --> 64 65 <xsl:choose> 66 <xsl:when test="$removeRsids=true()"> 67 <!-- ignore it --> 68 </xsl:when> 69 <xsl:otherwise> 70 <xsl:copy> 71 <xsl:apply-templates select="@*|node()"/> 72 </xsl:copy> 73 </xsl:otherwise> 74 </xsl:choose> 75 76 </xsl:template> 77 78 79 80 81 <!-- 28 82 <xsl:template match="pkg:part[pkg:xmlData/w:document]"> 29 83 <pkg:part> … … 57 111 </pkg:part> 58 112 </xsl:template> 59 60 <!--61 <xsl:variable name="targetFont"62 select="java:org.docx4j.fonts.Substituter.getSubstituteFontXsltExtension($substituterInstance,63 string($documentFont), 'BoldItalic', boolean($fontFamilyStack))" />64 font-family:'<xsl:value-of select="$targetFont"/>';65 113 --> 66 114
Note: See TracChangeset
for help on using the changeset viewer.
