On 02/12/2019 03:42 PM, Yasser Shohoud wrote:
I think I sent you the wrong file before. Attaching the one after all
changes have been accepted.

Are you sure? Because I cannot reproduce the problem here at XMLmind. See below.



I am still not getting the superscripts.
I am converting it with this command:

/Users/yassers929/tools/w2x-pro-1_2_1/bin/w2x -vv -f "./w2x.options" $1 $2

w2x.options:
-o xhtml1_1
-p transform.style-with-class 'yes'

Also attaching the output file (after indenting it) for your reference.


Sorry but I cannot reproduce the problem here at XMLmind by following these steps:

1) Created text file w2x.options containing:
---
-o xhtml1_1
-p transform.style-with-class 'yes'
---

2) Ran:

~/src/w2x/bin/w2x -vv -f w2x.options 18.docx 18.xhtml
---
ERBOSE: Converting "18.docx" to XHTML...
DEBUG: convert.xhtml-file=/home/hussein/tmp/18/18.xhtml
VERBOSE: Editing XHTML document using "/home/hussein/src/w2x/xed/main.xed"... DEBUG: edit.title.keep-title=yes edit.xed-url-or-file=file:/home/hussein/src/w2x/xed/main.xed
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/main.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/after-translate.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/metas.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/init-styles.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/prune.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/title.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/index.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/biblio.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/inlines.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/xrefs.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/footnotes.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/paragraphs.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/tables.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/captions.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/headings.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/lists.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/blocks.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/convert-tabs.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/sections.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/remove-styles.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/finish-styles.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/ids.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/finish.xed"...
DEBUG: Loading script "file:/home/hussein/src/w2x/xed/before-save.xed"...
VERBOSE: Transforming document using "/home/hussein/src/w2x/xslt/xhtml1_1.xslt" then saving it to "/home/hussein/tmp/18/18.xhtml"... DEBUG: transform.out-file=/home/hussein/tmp/18/18.xhtml transform.xslt-url-or-file=file:/home/hussein/src/w2x/xslt/xhtml1_1.xslt transform.style-with-class=yes DEBUG: Loading XSLT stylesheet "file:/home/hussein/src/w2x/xslt/xhtml1_1.xslt"...
---

where 18.docx is your last attachment (no tracked changes indeed).

Got attached 18.xhtml, which has all the superscripts found in 18.docx.

I used Java v1.8.0_202 on my Linux box and w2x v1.6.0 to run my test. However it is very unlikely that a different Java or w2x version or a different platform could be the cause of this issue, because the generation of superscripts in w2x has always been pretty solid.

You may have modified scripts in W2X_install_dir/xed/ or stylesheets W2X_install_dir/xslt/ in and thus broken the generation of superscripts.

For example, you should take a look at W2X_install_dir/xed/inlines.xed:
---
...
set-variable("supElementName", if(defined("inlines.sup-element"),
                                  $inlines.sup-element,
                                  "sup"));
...
for-each /html/body//span {
    if get-class() = "" {
...
        if get-style("vertical-align") = "sub" {
            set-element-name($subElementName);
            set-style("vertical-align");

            convertCommonTextStyles($generateBigSmall);
        } elseif get-style("vertical-align") = "super" {
            set-element-name($supElementName);
            set-style("vertical-align");

            convertCommonTextStyles($generateBigSmall);
...
---

Please double check what you exactly do to perform this conversion before sending us a new support request about this issue.

-o xhtml1_1
-p transform.style-with-class 'yes'

Attachment: 18.docx
Description: MS-Word 2007 document

Attachment: 18.xhtml
Description: application/xhtml

--
XMLmind Word To XML Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/w2x-support

Reply via email to