File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,13 @@ Paragraphs not having a defined outline level are not recognized as headings.**
19
19
Build the package using ` ant ` on ` build.xml ` . You can upload docx files via a web form or by POSTing them to cnvert2.xql
20
20
21
21
### CLI
22
- To convert a docx, apply ` docx.xsl ` to ` word-empty.xml ` (or any XML file) and pass the parameter ` filename ` with a full
23
- URL to the docx to be converted.
22
+ ! The older ` zip:xml-entry ` function is available in Saxon ⩽ 9.5.1.1 while ` file:read-binary ` and ` archive:extract-text `
23
+ require Saxon * PE or EE* ⩾ 9.6. If you do not have Saxon PE or EE, you currently have to use a different XSLT processor,
24
+ use oXygen (as it includes a recent version ofSaxon PE and EE), or use the web service implementation from within
25
+ eXist-DB or baseX as these implement the ExPath modules independently.
26
+
27
+ To convert a docx, apply ` docx.xsl ` to ` word-empty.xml ` (or any XML file) and pass the parameter ` filename ` with a path
28
+ to the docx to be converted.
24
29
25
30
## How to use (XML to TEI)
26
31
apply basic transformation scenario to docx or apply wt0.xsl and wt1.xsl to any flat Word XML
Original file line number Diff line number Diff line change 11
11
<xsl : param name =" filename" />
12
12
13
13
<xsl : variable name =" zip" >
14
- <xsl : choose >
15
- <xsl : when test =" function-available('archive:extract-text')" >
16
- <xsl : sequence select =" file:read-binary($filename)" />
17
- </xsl : when >
18
- <xsl : when test =" function-available('zip:xml-entry')" >
19
- <xsl : value-of select =" xs:anyURI($filename)" />
20
- </xsl : when >
21
- </xsl : choose >
22
- </xsl : variable >
14
+ <xsl : sequence select =" file:read-binary($filename)" use-when =" function-available('archive:extract-text')" />
15
+ <xsl : value-of select =" xs:anyURI($filename)" use-when =" function-available('zip:xml-entry')" />
16
+ </xsl : variable >
23
17
24
18
<xsl : template match =" /" >
19
+ <xsl : if test =" not(function-available('file:read-binary')) and not(function-available('zip:xml-entry'))" >
20
+ <xsl : message terminate =" yes" >!!
21
+ Neither file:read-binary nor zip:xml-entry functions are available. Word document
22
+ cannot be extracted with this XSLT processor. zip:xml-entry is available in Saxon
23
+ ⩽ 9.5.1.1, file:read-binary requires Saxon PE or EE ⩾ 9.6.
24
+ </xsl : message >
25
+ </xsl : if >
25
26
<pkg : package
26
27
xmlns : pkg =" http://schemas.microsoft.com/office/2006/xmlPackage" >
27
28
<xsl : variable name =" parts" select =" ('word/document.xml', 'word/comments.xml', 'word/endnotes.xml',
You can’t perform that action at this time.
0 commit comments