Sorry if this is the wrong email to send this question to, but didn’t see
anything directly related to XMLMind Word to XML.
The w2x-support@xmlmind.com public, moderated, mailing list is dedicated
to XMLMind Word to XML.
Is there any way to set the topic ID for the resulting .dita topic to a GUID
instead of based on the heading text for the topic?
The ID used for topics are by default those specified by MS-Word itself
(often the text of the heading) or by the MS-Word user (e.g. by the
means of bookmarks).
If an ID coming from MS-Word is not found, then an ID is automatically
generated in topic.xslt using standard XSLT 1.0 function generate-id()
(see http://www.w3.org/TR/xslt#misc-func).
Other than this, the ID of the root topic may be explicitly
specified/overridden by the means of XSLT stylesheet parameter
root-topic-id. Example:
w2x ... -p transform.root-topic-id MyRootTopicID ...
See "Table 7-D Parameters of w2x:xslt/topic.xslt, which is used to
convert input XHTML document to a DITA topic" in
http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#transform_step
Or where is the topic ID being set so I could add text to it? I thought it was
in the xhtml_strict_common.xslt, but not having much luck modifying it….
That's normal. xhtml_strict_common.xslt is used to convert XHTML 1.0
Transitional to XHTML 1.0 Strict or XHTML 1.1.
Please take a look at:
<W2X_install_dir>/xslt/topic.xslt
Please do not directly modify this file[*]. Instead please follow the
procedure described in "A custom XSLT stylesheet" --
http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#general_customize_semantic_xml
That is: something like MyCustomTopic.xslt:
---
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="h">
<xsl:import href="w2x:xslt/topic.xslt"/>
...YOUR CODE HERE...
</xsl:stylesheet>
---
and then:
w2x ... -t MyCustomTopic.xslt ...
---
[*] This will not work as a copy of stock topic.xslt is embedded in
w2x_all.jar.
If you prefer to directly modify the stock XED scripts (found in
<W2X_install_dir>/xed/) or the stock XSLT stylesheets (found in
<W2X_install_dir>/xslt/), please make sure to delete
<W2X_install_dir>/lib/w2x_all.jar
--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/w2x-support