transpect / idml2xml-frontend

Converts InDesign IDML to XML
BSD 2-Clause "Simplified" License
15 stars 7 forks source link

Catalog related problem #1

Closed kosek closed 6 years ago

kosek commented 6 years ago

Hi, I'm trying to use transpect to convert IDML files into Hub format for future conversion.

However when I try to run the pipeline I'm getting the following error:

ERROR: http://transpect.github.io/../index.html:1:107:Not a pipeline or library: html

I noticed that the same issue has been discussed here https://github.com/transpect/pdf2fxl/issues/2 -- but it is not clear to me what is the fix that has to be applied. Any help more then appreciated. Thanks.

gimsieke commented 6 years ago

Hi Jirka,

your project needs to have an XML catalog located in {pdu}/xmlcatalog/catalog.xml. This is the location that {pdu}/calabash/xmlcatalog/catalog.xml will look for via nextCatalog. In the aforementioned catalog, you need to slurp in <nextCatalog catalog="../idml2xml/xmlcatalog/catalog.xml"/> (provided idml2xml is a git submodule or svn external that also resides below {pdu} (in the oXygen sense).

gimsieke commented 6 years ago

If the canonical URIs (that usually contain http://transpect.io) cannot be resolved, the request is redirected to http://transpect.github.io/, therefore the html-related error message. More about catalogs in transpect at http://transpect.github.io/tutorial.html#xmlcatalog

gimsieke commented 6 years ago

Sample catalog of some project that is in the open: https://subversion.le-tex.de/customers/gfn/transpect/xmlcatalog/catalog.xml

kosek commented 6 years ago

Thanks @gimsieke - I believe I have all catalogs in place (I have read documentation first ;-)). I have tried running conversion both using provided idml2xml.sh script and by directly invoking XProc pipeline. I'm invoking this from the command line. I will investigate more. Thanks.

gimsieke commented 6 years ago

The fix for https://github.com/transpect/pdf2fxl/issues/2 was a different one. There were already catalogs in place, but we expected loading potentially-but-not-actually-existing resources to fail to load via doc-available(). Github at some point changed their HTML to XHTML, therefore doc-available() suddenly returned true() for non-resolvable canonical URIs…

gimsieke commented 6 years ago

idml2xml.sh is definitely outdated. It needs to be updated to use more recent transpect libs that resolve canonical URIs to file: URIs first before trying to access them.

gimsieke commented 6 years ago

So if you recursively cloned that repo, you are still stuck with the old behaviour. Maybe we’ll find the time today to update that repo. Otherwise, you can try to update them to their respective HEAD revisions.

kosek commented 6 years ago

Probably it's something related to system environment (OS and Java version). When I have cloned individual modules on which idml2xml-frontend is depending (instead of using --recursive as suggested at https://github.com/transpect/idml2xml-frontend) then I was able to run idml2xml and idml2xml-frontend pipelines. I'm on Windows 7 -- I was able to run pipelines in cmd.exe but when I have tried Cygwin on bash (part of Git Bash) then I was getting above mentioned error message caused by the fact that Calabash has been ignoring XML catalogs.

kosek commented 6 years ago

Actually cygwin works once I have converted line endings to LF from CR LF in .sh files. Perhaps git client done this to files. Do we still cope with this in 2018 me asks? :-(