Git Product home page Git Product logo

idml2xml's Introduction

idml2xml

Library to convert IDML to Hub XML or to extract tagging from an IDML file.

This is just a library, for a ready-to-use project please checkout the idml2xml-frontend project.

idml2xml's People

Contributors

arualmeyer avatar aschmalfuss avatar fr4nze avatar gimsieke avatar mkraetke avatar pglatza avatar polypunkt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

idml2xml's Issues

support rotated items

Recangles with ItemTransform="0 -1 1 0 -10270.29114161777 -472.53182401247494" for example, as reported in https://redmine.le-tex.de/issues/15526

This support should be feasible since we can now use XPath 3.1 trigonometric functions. We will require XSLT 3 support (available in https://github.com/transpect/calabash-frontend/tree/saxon98, its mirror https://subversion.le-tex.de/common/github-mirror/calabash_saxon_9.8/ or in more recent branches like https://github.com/transpect/calabash-frontend/tree/saxon10 or https://subversion.le-tex.de/common/github-mirror/calabash_saxon_10/) anyway because of an impending re-implementation of nested style handling that uses xsl:accumulator.

dropped content

Hi Gerrit,
attached are two idml test cases and the two corresponding hub.xml (conversion made with the latest git pull).
In the file test_no_mml.hub.xml everything is ok.
In the file test_with_mml.hub.xml the content of the para before the table is missing.

It seems that the issue arise only when you have mml and a Content and a Table in the same CharacterStyleRange, but not always, as I have files where only some paras gets dropped.

I have solved the problem by editing the source indd and making sure all tables are in their CharacterStyleRange with no other Content elements, but I think this should be investigated further.
test-case.zip

conversion fails on dup stylenames

When the src idml has dup style names (eg a para style and a char style)
idml2xml/xsl/modes/GenerateHubformat.xsl
fails with the following error at line 792:
A sequence of more than one item is not allowed as the value of variable $lang-by-style (@xml:lang, @xml:lang)

mathtools support broken for v3?

When exporting to idml with mathtools v3 and the mathml string goes in a MathToolsML attribute, not in an element as implied by the <p:viewport match="MathToolsML"> in idml2hub.xpl.

To get the hub.xml I have to move the MathToolsML attribute as an element under CharacterStyleRange/Properties, but then there are paragraph splitting issues in SeparateParagraphs.xsl.

Attached is a simple idml test case exported from mathtools
test.idml.zip
v3.

dropped content in idml2xml:XML-Hubformat-extract-frames mode

Hello,
when converting the attached idml the sidebar content get lost and only anchors are present:



The content is ok in output from previous step in idml2xml.HUB.07a.idml2xml_XML-Hubformat-properties2atts.xml

I think the problem is in mode idml2xml:XML-Hubformat-extract-frames templates in GenerateHubformat.xsl

Tested with latest 2beb2b8..b6ce1ad
Attaches the idml test doc and the generated hub.

Thanks
test.zip

edge case with mathtools v3

Hi,
I have encountered an edge case when converting from mathtools to mml (see attached idml).

Mathtool sometimes (I do not understand when|why) emit an empty @MathToolsML on a charrange containing text content and this content get lost due to the <p:delete name="remove-MathTools-Markup"... line in idml2hub.xpl.

Solution is to modyfy above line from
<p:delete name="remove-MathTools-Markup" match="*[@MTMathZone][not(descendant::mml:math or descendant::Rectangle)] |CharacterStyleRange[descendant::mml:math]/Content[not(normalize-space())]"/>
to
<p:delete name="remove-MathTools-Markup" match="*[@MTMathZone][not(descendant::mml:math or descendant::Rectangle)][not(MathToolsML='')] |CharacterStyleRange[descendant::mml:math]/Content[not(normalize-space())]"/>

I think this should be pretty safe and (hopefully) should not introduce any regression.

test.idml.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.