Open eshanroxx opened 3 years ago
The error message says “title parent not expected: info” so you might need to move the title
from within info
to the element that contains info
.
Thanks for the update, please suggest where should I make the change.
In your DocBook/Hub XML
ok thanks for the update -> now I have removed the
Message: Mode: hub:default INFO : xproc-util/xslt-mode/xpl/xslt-mode.xpl:116:27:hub2docx root element: hub Message: hub2docx root element: hub Message: [FATAL ERROR]: XSLT mode 'hub:default' failed due to conversion errors. Recovering from errors and proceeding with original input. Message: Mode: hub:clean Message: Mode: hub:merge Message: An empty sequence is not allowed as the value of variable $document-xml-base-modified Message: [FATAL ERROR]: XSLT mode 'hub:merge' failed due to conversion errors. Recovering from errors and proceeding with original input. ERROR: err:XD0007:null ERROR: If sequence is not specified on p:output, or has the value false, then it is a dynamic error if the step does not produce exactly one document on the declared port.
I can’t tell without looking at the XML and/or the debugging output. You can specify debug=yes
and debug-dir-uri=file:///c:/temp/debug
and look for an *.error.xml
file. Or you can attach or send us the XML input (letexml at le-tex.de).
Below is the XML which I am using as input or please suggest how to attach the XML here?
This XML file does not appear to have any style information associated with it. The document tree is shown below. <?xml-model href="http://www.le-tex.de/resource/schema/hub/1.1/hub.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="http://www.le-tex.de/resource/schema/hub/1.1/hub.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
This is not XML. When I tried to attach an XML file using drag&drop, Github told me that they don’t support that file type. But they support zip. So you can zip the XML and attach it.
I have attached the table.xml in zip format, please have a look.
Hmm, the debug message was misleading. That’s due to a Calabash bug. It sometimes swallows Saxon’s real error messages and displays other XSLT messages that were emitted before the error occurred.
The issue with hub2docx.xpl is that it is not meant to be run standalone. It is evaluated by docx_modify.xpl.
In a current project where all three docx modules (hub2docx, docx2hub, and docx_modify) are available, an invocation looks like this (using a docx template that belongs to the project):
calabash/calabash.sh -i xslt=docxtools/hub2docx/xsl/hub2docx.xsl -i xpl=docxtools/hub2docx/xpl/hub2docx.xpl -i external-sources=../tmp/table.xml docxtools/docx_modify/xpl/docx_modify.xpl file=a9s/common/hub2docx/template/hobots.docx
I’ll attach the result for you.
Please note that apparently white space will be forwarded to the docx verbatim. This means it needs to be normalized in the input.
Thanks for sharing and update 👍
I am using window batch option .\calabash\calabash.bat so should I use the command in the same way as you did with calabash/calabash.sh
Also please share the template hobots.docx -> a9s/common/hub2docx/template/hobots.docx
You should be able to use any docx file as template.
If you use the .bat file, the other parameters should stay the same. You need to adapt the paths according to where you checked out the modules, for example omit docxtools/
.
Thanks for the response and update.
I have executed below .bat commands and normal.docx as a template. normal.docx Command seems executed successfully as the result table.docx - I am getting nothing means blank doc file as attached table.docx
.\calabash\calabash.bat -o result=table.docx xslt=.\hub2docx-lib\xsl\hub2docx.xsl xpl=.\hub2docx-lib\xpl\hub2docx.xpl -i external-sources=table.xml .\docx_modify-lib\xpl\docx_modify.xpl file=normal.docx debug=yes
Please suggest where I am missing. Attached is the huv2docx-Command_execution_result.txt huv2docx-Command_execution_result.txt
In the log, I see the line:
INFO : docx_modify-lib/xpl/docx_modify.xpl:482:81:docx_modify: modified docx will be stored in file:/E:/IFU_POC/Transpect_io_Setup/normal.mod.docx
Do you see the file normal.mod.docx?
Thanks now I am able to see the desired result on normal.mod.docx which I provided as a template.
How can I save the result as table.docx ?
bat command executed: .\calabash\calabash.bat -i xslt=./hub2docx-lib/xsl/hub2docx.xsl -i xpl=./hub2docx-lib/xpl/hub2docx.xpl -i external-sources=table.xml .\docx_modify-lib\xpl\docx_modify.xpl file=normal.docx debug=yes
You can add the parameter docx-target-uri=file:/E:/IFU_POC/Transpect_io_Setup/table.docx
Or you can rename the resulting file afterwards.
Can I directly convert any html to docx?
If yes please suggest the process.
You can’t feed HTML into hub2docx. You could first transform HTML to Hub and then feed it into hub2docx. But this pipeline needs to be set up; it needs configuration that corresponds to the HTML input and the desired docx style names. Setting this up for you is far beyond what we can do as support on Github. In principle we can do this as paid-for consulting, but at the moment we don’t have any capacity to accept additional projects.
Ok Thanks for information, Can you please help me in setup of transpect.io XML calabash in the form of java programming.
Currently it is in bat file or command line form but I want to convert hubxml to docx using java programming in any IDE or editors.
Hi Gimsieke,
Can you please let me know how to do setup of transpect.io XML calabash in the form of java programming?
I have setup transpect and trying to run the below command but getting issue
.\calabash\calabash.bat -i source=table.xml -o result=table.docx .\hub2docx\xpl\hub2docx.xpl file=normal.docx
E:\IFU_POC\Transpect_io_Setup>java -cp E:/IFU_POC/Transpect_io_Setup/calabash//../a9s/common/saxon/;E:/IFU_POC/Transpect_io_Setup/calabash//../saxon/saxon9ee.jar;E:/IFU_POC/Transpect_io_Setup/calabash//../saxon/saxon9pe.jar;E:/IFU_POC/Transpect_io_Setup/calabash//../saxon/saxon9he.jar;E:/IFU_POC/Transpect_io_Setup/calabash/saxon/saxon9he.jar;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/rng-extension;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/rng-extension/lib/;E:/IFU_POC/Transpect_io_Setup/calabash/distro/lib/;E:/IFU_POC/Transpect_io_Setup/calabash/distro/lib/xmlresolver-1.0.4.jar;E:/IFU_POC/Transpect_io_Setup/calabash/distro/lib/commons-fileupload-1.3.3.jar;E:/IFU_POC/Transpect_io_Setup/calabash/distro/lib/classindex-3.3.jar;E:/IFU_POC/Transpect_io_Setup/calabash/distro/lib/htmlparser-1.4.jar;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/calabash/lib/xmlcalabash1-sendmail-1.1.4.jar;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/calabash/lib/javax.mail.jar;E:/IFU_POC/Transpect_io_Setup/calabash/distro/xmlcalabash-1.2.1-99.jar;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/javascript-extension;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/javascript-extension/lib/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/epubcheck-extension/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/epubcheck-extension/lib/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/image-transform-extension;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/image-transform-extension/lib/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/image-props-extension;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/image-props-extension/lib/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/unzip-extension;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/mathtype-extension;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/mathtype-extension/lib/;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/mathtype-extension/ruby/bindata-2.3.5/lib;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/mathtype-extension/ruby/mathtype-0.0.7.5/lib;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/mathtype-extension/ruby/nokogiri-1.7.0.1-java/lib;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/mathtype-extension/ruby/ruby-ole-1.2.12.1/lib;E:/IFU_POC/Transpect_io_Setup/calabash//extensions/transpect/svn-extension;E:/IFU_POC/Transpect_io_Setup/calabash//lib/javax.activation.jar -Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF-8 -Dxml.catalog.files="file:///E:/IFU_POC/Transpect_io_Setup/calabash/xmlcatalog/catalog.xml" -Djdk.xml.entityExpansionLimit=2147483647 -Xmx1024m -Xss1024k com.xmlcalabash.drivers.Main -E org.xmlresolver.Resolver -U org.xmlresolver.Resolver -c E:/IFU_POC/Transpect_io_Setup/calabash/extensions/transpect/transpect-config.xml -i source=table.xml -o result=table.docx .\hub2docx\xpl\hub2docx.xpl file=normal.docx Message: Mode: hub:default INFO : xproc-util/xslt-mode/xpl/xslt-mode.xpl:116:27:hub2docx root element: hub INFO : xproc-util/xslt-mode/xpl/xslt-mode.xpl:116:27:ERROR: title parent not expected: info Message: hub2docx root element: hubERROR: title parent not expected: info Message: [FATAL ERROR]: XSLT mode 'hub:default' failed due to conversion errors. Recovering from errors and proceeding with original input. Message: Mode: hub:clean Message: Mode: hub:merge Message: An empty sequence is not allowed as the value of variable $document-xml-base-modified Message: [FATAL ERROR]: XSLT mode 'hub:merge' failed due to conversion errors. Recovering from errors and proceeding with original input. ERROR: err:XD0007:null ERROR: If sequence is not specified on p:output, or has the value false, then it is a dynamic error if the step does not produce exactly one document on the declared port.