- Timestamp:
- 05/02/08 07:35:53 (4 years ago)
- Location:
- trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages
- Files:
-
- 2 edited
-
WordprocessingMLPackage.java (modified) (2 diffs)
-
filter.xslt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java
r323 r356 616 616 } 617 617 618 Boolean tidyForDocx4all = Boolean.FALSE; 619 public void setTidyForDocx4all(boolean val) { 620 tidyForDocx4all = new Boolean(val); 621 } 622 623 618 624 Map<String, Object> getSettings() { 619 625 Map<String, Object> settings = new java.util.HashMap<String, Object>(); … … 622 628 settings.put("removeContentControls", removeContentControls); 623 629 settings.put("removeRsids", removeRsids); 624 625 630 settings.put("tidyForDocx4all", tidyForDocx4all); 626 631 627 632 return settings; -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/filter.xslt
r323 r356 10 10 xmlns:ext="http://www.xmllab.net/wordml2html/ext" 11 11 xmlns:java="http://xml.apache.org/xalan/java" 12 xmlns:xml="http://www.w3.org/XML/1998/namespace" 12 13 version="1.0" 13 exclude-result-prefixes="java msxsl ext wo v WX aml w10">14 exclude-result-prefixes="java msxsl ext o v WX aml w10"> 14 15 15 16 … … 21 22 <xsl:param name="removeContentControls"/> 22 23 <xsl:param name="removeRsids"/> 23 24 <xsl:param name="tidyForDocx4all"/> <!-- this cleans up stuff not specifically supported by docx4all --> 24 25 25 26 <xsl:template match="@*|node()"> … … 28 29 </xsl:copy> 29 30 </xsl:template> 31 32 33 <xsl:template match="w:hyperlink"> 34 35 <!-- <w:hyperlink ns2:id="rId4" w:history="true"> 36 <w:r> 37 <w:rPr> 38 <w:rStyle w:val="Hyperlink"/> 39 </w:rPr> 40 <w:t>http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:12002E081:EN:NOT</w:t> 41 </w:r> 42 </w:hyperlink> 43 --> 44 45 <xsl:choose> 46 <xsl:when test="$tidyForDocx4all=true()"> 47 <xsl:apply-templates select="node()"/> 48 </xsl:when> 49 <xsl:otherwise> 50 <xsl:copy> 51 <xsl:apply-templates select="@*|node()"/> 52 </xsl:copy> 53 </xsl:otherwise> 54 </xsl:choose> 55 56 </xsl:template> 57 58 <xsl:template match="w:lastRenderedPageBreak"> 59 60 <xsl:choose> 61 <xsl:when test="$tidyForDocx4all=true()"> 62 <!-- ignore it --> 63 </xsl:when> 64 <xsl:otherwise> 65 <xsl:copy> 66 <xsl:apply-templates select="@*|node()"/> 67 </xsl:copy> 68 </xsl:otherwise> 69 </xsl:choose> 70 71 </xsl:template> 72 73 <xsl:template match="w:tab"> 74 75 <xsl:choose> 76 <xsl:when test="$tidyForDocx4all=true()"> 77 <!-- ignore it, since replacing with w:t 78 or <w:t xml:space="preserve"> causes an exception. --> 79 </xsl:when> 80 <xsl:otherwise> 81 <xsl:copy> 82 <xsl:apply-templates select="@*|node()"/> 83 </xsl:copy> 84 </xsl:otherwise> 85 </xsl:choose> 86 87 </xsl:template> 30 88 31 89 <xsl:template match="w:proofErr">
Note: See TracChangeset
for help on using the changeset viewer.
