On 03/30/2017 10:46 AM, Reilly, Aidan [TYCO GBS - Cork] wrote:

I hope you are well. Can you tell me if there is an easy way to allow
for shortdesc markup in the word file that gets converted correctly at
build time? The problem is, if I tag something as <shortdesc> it
produces an invalid xml file because the shortdesc is put inside the
</conbody> element, not before.


This can be done as follows:

1) Delete W2X_install_dir/lib/w2x_all.jar because this self-contained JAR file contains a copy of subdirectories xed/ and xslt/ and would get in the way.

2) Rename W2X_install_dir/xslt/topic.xslt to topic.xslt.ORI and copy attached topic.xslt to W2X_install_dir/xslt/

3) Edit your w2x options file using a text editor and add this line:
---
-p transform.shortdesc-class-name p-Shortdesc
---

This extra parameter is *really* *really* required by attached, modified topic.xslt for the feature you have requested to work.

As you have guessed it, this parameter is used to specify the class name of the XHTML <p> which acts as a short description of the section. Other example: "-p transform.shortdesc-class-name p-Abstract".

The default value of the parameter is the empty string, which disables the feature you have requested.

Now your w2x options file contains something like:
---
-o map
-p transform.topic-type concept
-p transform.shortdesc-class-name p-Shortdesc
-p transform2.section-depth 4
-p transform2.topic-path %{~nO}/
-p edit.blocks.convert "p-Note p class='p-Note' ! p-Shortdesc p class='p-Shortdesc'"
-t custom_map_options_scripts/custom_transform.xslt
---



--> Note that we are not yet 100% sure to keep this feature in the next version of W2X. We don't think that your use case is that common. I mean, authors using MS-Word rarely bother writing short descriptions of the document sections they create.

Anyway, we wanted to help you and also we wanted to see if the feature you have requested (which certainly makes sense) was technically possible. It was possible, but somewhat technically challenging to implement.


Attachment: topic.xslt
Description: application/xslt

--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/w2x-support

Reply via email to