Skip to content

Commit d47b230

Browse files
Stefan EikeStefan Eike
authored andcommitted
Explain the two different XML structures for adding and modifying strings.
Signed-off-by: Stefan Eike Signed-off-by: Stefan Eike <stefan.eike@mailbox.org>
1 parent 2f2f167 commit d47b230

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

topics/plugin-addgeneratedtext.dita

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@
4444
<dd>Add new strings to generated text file. </dd>
4545
</dlentry>
4646
</dl>
47+
<note id="note_gff_13d_fqb">There are two different XML structures for adding new or modifying
48+
existing strings. Both can be used with the latest DITA-OT. The new structure (root element
49+
<xmlelement>vars</xmlelement>) has the benefit to add custom parameters to the string,
50+
such as the current page number, but the old structure (root element
51+
<xmlelement>strings</xmlelement>) is still valid. For example, the old structure is still
52+
used in the <b>org.dita.base</b> plugin and the new structure is used in
53+
<b>org.dita.pdf2</b>. The following code snippets represent the same information in the
54+
old and the new structure. If you are interested in the capabilities of the parameter
55+
mechanism, please have a look at the XML files stored in
56+
<filepath>org.dita.pdf2\cfg\common\vars</filepath>.<codeblock id="codeblock_hnb_h3d_fqb" outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;?xml version="1.0" encoding="utf-8"?>
57+
&lt;strings xml:lang="en-US">
58+
&lt;str name="String1">English generated text&lt;/str>
59+
&lt;/strings></codeblock><codeblock id="codeblock_lxd_k3d_fqb" outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;?xml version="1.0" encoding="UTF-8"?>
60+
&lt;vars xmlns="http://www.idiominc.com/opentopic/vars">
61+
&lt;variable id="String1">English generated text&lt;/variable>
62+
&lt;/vars></codeblock></note>
4763
</section>
4864
<example>
4965
<title>Example: adding new strings</title>

0 commit comments

Comments
 (0)