Yasser S. wrote:
I tried generating styled HTML but it doesn't contain the break-page
processing instruction. I'm attaching the original docx file and the
resulting html file for you to reproduce this and tell me what I'm doing
wrong.

You did nothing wrong.

My answer below was incorrect. By default, all processing-instructions are deleted even when you generate styled HTML (that is, XHTML+CSS).

This is done in <W2X_install_dir>/xed/remove-pis.xed

Fortunately this remove-pis.xed script can be parametrized to keep some processing-instructions:

---
w2x -p edit.remove-pis.except break-page test.docx test.html
---

Reference:

Parameter "remove-pis.except" in "Table 2 Parameters which are specific to w2x:xed/main-styled.xed" in http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#edit_step



--> If you use desktop app w2x-app rather that command-line tool w2x,

1) Check "Convert to" and choose "Single-page styled (X)HTML".

2) Click the 'Clipboard+' button. This allows to copy to the clipboard some basic w2x options corresponding to "Single-page styled (X)HTML".

3) Now check "Use text file containing w2x options".

4) Use a text editor to create a new w2x option file.
Let's call it my_options.txt.

5) Paste the contents of the clipboard in my_options.txt. You'll get

---
-o xhtml_css
-p convert.charset UTF-8
---

6) Append this line to my_options.txt:

---
-p edit.remove-pis.except break-page
---

7) Click the "Choose w2x options file" button and select my_options.txt you have created.

This procedure is outlined here:

3.2.1. Creating a custom conversion specification
http://www.xmlmind.com/w2x/_distrib/doc/w2x_app_help/create_options_file.html




[email protected] wrote:
--> If you generate *styled* HTML (that is, XHTML+CSS), you'll get 
<?break-page?>


--> If you generate *semantic* XHTML, you'll *not* get "low-level" 
processing-instructions like <?break-page?>


Using a simple customization, you may instruct w2x NOT to remove <?break-page?> even 
in semantic XHTML. (This is done in <W2X_install_dir>/xed/finish.xed)




Note the "generates XHTML+CSS documents" in 
http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#limitations:


---

The Convert step generates XHTML+CSS documents having the following 
specificities:

...

* Page breaks are translated to <?break-page?>. Column breaks are translated to 
<?break-column?>. End of sections are signaled by <?end-of-section?>.

---



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

Reply via email to