diff --git a/src/main/java/org/wordinator/xml2docx/MakeDocx.java b/src/main/java/org/wordinator/xml2docx/MakeDocx.java
index dc859b8..3f00743 100644
--- a/src/main/java/org/wordinator/xml2docx/MakeDocx.java
+++ b/src/main/java/org/wordinator/xml2docx/MakeDocx.java
@@ -15,6 +15,7 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
+import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
@@ -56,10 +57,25 @@ public class MakeDocx
public static void main( String[] args ) throws ParseException
{
- Options options = buildOptions();
-
- handleCommandLine(options, args, log);
+ boolean GOOD_OPTIONS = false;
+ Options options = null;
+ try {
+ options = buildOptions();
+ GOOD_OPTIONS = true;
+ } catch (Exception e) {
+ //
+ }
+ try {
+ handleCommandLine(options, args, log);
+ } catch (ParseException e) {
+ GOOD_OPTIONS = false;
+ }
+
+ if (!GOOD_OPTIONS) {
+ HelpFormatter formatter = new HelpFormatter();
+ formatter.printHelp( "wordinator", options, true );
+ }
}
/**
diff --git a/src/main/xsl/ditahtml2docx/ditahtml2docx.xsl b/src/main/xsl/ditahtml2docx/ditahtml2docx.xsl
new file mode 100644
index 0000000..8ab856c
--- /dev/null
+++ b/src/main/xsl/ditahtml2docx/ditahtml2docx.xsl
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + [INFO] inputdoc={document-uri(.)}
+ + [INFO] outdir={$outdir}
+
+
+ + [DEBUG] Applying templates to root element: {namespace-uri(/*)}:{name(/*)}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/xsl/ditahtml2docx/get-style-name.xsl b/src/main/xsl/ditahtml2docx/get-style-name.xsl
new file mode 100644
index 0000000..1d601b5
--- /dev/null
+++ b/src/main/xsl/ditahtml2docx/get-style-name.xsl
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + [DEBUG] get-style-name: section/header. Returning "{$result}".
+
+
+
+
+
+
+
+
+
+
+
+ + [DEBUG] get-style-name: {name(.)}. Returning "{$result}".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/xsl/html2docx/baseProcessing.xsl b/src/main/xsl/html2docx/baseProcessing.xsl
index 6ab2bce..113d4a7 100644
--- a/src/main/xsl/html2docx/baseProcessing.xsl
+++ b/src/main/xsl/html2docx/baseProcessing.xsl
@@ -17,7 +17,7 @@
-
+
@@ -31,14 +31,16 @@
-
-
+
@@ -85,20 +87,20 @@
-
+
+ [DEBUG] make-body-content: Handling {name(..)}/{name(.)}
-
+
-
+
@@ -110,7 +112,7 @@
-
+
@@ -123,7 +125,7 @@
-
+
@@ -132,12 +134,12 @@
-
+
-
+
@@ -149,12 +151,12 @@
-
+
-
+
@@ -167,12 +169,12 @@
-
+
-
+
@@ -181,7 +183,7 @@
-
+
@@ -195,7 +197,7 @@
-
+
@@ -210,7 +212,7 @@
================================== -->
-
+
@@ -233,7 +235,13 @@
xhtml:h3/text() |
xhtml:h4/text() |
xhtml:h5/text() |
- xhtml:h6/text()
+ xhtml:h6/text() |
+ h1/text() |
+ h2/text() |
+ h3/text() |
+ h4/text() |
+ h5/text() |
+ h6/text()
">
@@ -253,7 +261,7 @@
Figures and images
========================== -->
-
+
@@ -261,7 +269,7 @@
-
+
@@ -286,7 +294,7 @@
-
+
@@ -296,7 +304,7 @@
-
+
@@ -326,7 +334,7 @@
-
+
@@ -476,10 +484,10 @@
========================== -->
+ xhtml:p | p |
+ xhtml:dt | dt |
+ xhtml:dd[empty(xhtml:p)] | dd[empty(p)] |
+ xhtml:pre | pre">
@@ -499,7 +507,7 @@
@@ -528,8 +536,20 @@
xhtml:i/text() |
xhtml:b/text() |
xhtml:u/text() |
- xhtml:tt/text()
- ">
+ xhtml:tt/text() |
+ span/text() |
+ dfn/text() |
+ a//text() |
+ pre//text() |
+ li//text() |
+ dt//text() |
+ dd//text() |
+ code/text() |
+ i/text() |
+ b/text() |
+ u/text() |
+ tt/text()
+ ">
@@ -590,7 +610,7 @@
Lists
========================== -->
-
+
@@ -598,12 +618,12 @@
-
+
-
+
@@ -614,14 +634,14 @@
FIXME: Provide a more general way of handing a mix of text nodes and block nodes.
-->
-
+
-
+
-
+
@@ -631,7 +651,7 @@
Inline things
========================== -->
-
+
+ [DEBUG] xhtml:br: {name(../..)}/{name(..)}/{name(.)}
@@ -640,7 +660,7 @@
-
+
@@ -653,7 +673,7 @@
Fallback templates
========================== -->
-
+
@@ -737,7 +757,7 @@
modes
============================== -->
-
+
@@ -848,7 +868,9 @@
- [WARN] wp:p found in wp:p:
-
+
diff --git a/src/main/xsl/html2docx/set-format-attributes.xsl b/src/main/xsl/html2docx/set-format-attributes.xsl
index 68a4709..e72fcdb 100644
--- a/src/main/xsl/html2docx/set-format-attributes.xsl
+++ b/src/main/xsl/html2docx/set-format-attributes.xsl
@@ -65,8 +65,8 @@
@@ -76,8 +76,8 @@
@@ -91,7 +91,7 @@
@@ -103,7 +103,7 @@
-
+
@@ -137,7 +137,7 @@
-
+
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..d12cae7
--- /dev/null
+++ b/version.properties
@@ -0,0 +1 @@
+version=0.9.1
\ No newline at end of file