Visagan S. wrote:
We have word document with some program codes written as shown below
The style of the paragraph is mapped to <programlisting> tag. I did
using the wizard as is use the desktop app. When I convert it the output
appears in xml as below
<para>Response 4</para>
<Programlisting>ZZZZZZZZ: PING Response Current Time: Thu
Oct 12 16:13:46 2006 Target Host Name: ZZZZZZZZ:
-------------------------------------------------------
XX.YYY.152.130 --> XX.YYY.242.21 Requests/Replies/%:
1/1/100 Errors: 0 Min/Avg/Max (ms) :
3/3/3 TIMESTAMP CCB115206: *17:59:35.848 ->
11:07:20.710 -> 11:07:20.710 -> ZZZZZZZZ: 11:07:20.710 ->
11:07:20.711 -> 11:07:20.712 -> ZZZZZZZZ: 11:07:20.712 ->
11:07:20.712 -> *17:59:35.850</Programlisting>
As you see all the spacing and newlines are lost. Please let me know if
anymore configuration is required. Your help would be highly appreciated.
I have attached the word document for your reference.
I've created docbook5_options.txt (with companion XSLT stylesheet
docbook5_options_scripts/custom_transform.xslt) using w2x-app setup
assistant.
This allowed me to successfully convert your "Response 4.docx" to
"Response 4.xml", a DocBook v5 document.
The key was to declare your custom paragraph style
p-Comptalk-NewExmplUncapt as being a PARAGRAPH_STYLE_1_TO_PRE (*NOT*
just plain PARAGRAPH_STYLE!) and to map it to programlisting. See
attached screenshots using_wizard5a.png and using_wizard5b.png.
---
PS: While at it, just for the fun, I also declared your custom paragraph
style p-Label as being a PARAGRAPH_STYLE and mapped it to bridgehead.
--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/w2x-support