<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Gerrit,</p>
<p>I'm glad you are interested in this aspect. There are 6 types of
Oxygen track changes:</p>
<p><a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/doc/versions/22.1/ug-editor/topics/track-changes-format.html">https://www.oxygenxml.com/doc/versions/22.1/ug-editor/topics/track-changes-format.html</a></p>
<p>The insert track changes do not nest one in another, so you will
never have an insert track change inside another, same for the
combination of insert and delete track changes, they are not
hierarchical, they are intervals which do not intersect each
other. So your XSLT should cover most cases for insertions and
deletions as oxy_insert_start and oxy_insert_end processing
instructions would usually be siblings (surrounding wellformed XML
content).</p>
<p>The surround change for example does not surround well formed XML
content, it just surrounds the start tag. The attribute change is
just a processing instruction before the XML start tag.<br>
</p>
<p>The comment and color highlights on the other side can nest one
in another and can intersect in any way. So these are nasty, you
can create elements for a comment start and end but you cannot
create a wrapper element over the entire content spanned by a
comment or a color highlight. You need some kind of a stack of
processing instructions in the XSLT to know where a comment starts
and where it ends.<br>
</p>
<p>You can also reply to a change or to a comment in Oxygen and this
will generate extra comment changes which are threaded.</p>
<p>For DocBook 5 Oxygen ships with a bundled transformation scenario
for producing PDF with track changes, it's build file is located
in:</p>
<p>OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo-oxy-ct/build.xml<br>
</p>
<p>We also make available with an Apache 2.0 license the XSLT
stylesheets we use for DITA publishing, stylesheets which with
small changes should also work for DocBook HTML or PDF:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/oxygenxml/dita-classic-pdf-review/tree/master/com.oxygenxml.pdf.review/review">https://github.com/oxygenxml/dita-classic-pdf-review/tree/master/com.oxygenxml.pdf.review/review</a></p>
<p>From what I remember our way of handling this is to create from
each processing instruction start or end an equivalent XML element
in a custom Oxygen namespace, then to match all text() nodes, the
template is here:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/oxygenxml/dita-classic-pdf-review/blob/master/com.oxygenxml.pdf.review/review/review-pis-to-elements-core.xsl">https://github.com/oxygenxml/dita-classic-pdf-review/blob/master/com.oxygenxml.pdf.review/review/review-pis-to-elements-core.xsl</a></p>
<p>
<blockquote type="cite"><<span class="pl-ent">xsl</span><span
class="pl-ent">:</span><span class="pl-ent">template</span> <span
class="pl-e">match</span>=<span class="pl-s"><span
class="pl-pds">"</span>text()<span class="pl-pds">"</span></span>
<span class="pl-e">priority</span>=<span class="pl-s"><span
class="pl-pds">"</span>100<span class="pl-pds">"</span></span>></blockquote>
and if there are change elements which are around the text,
surround each text fragment in a highlight element. So we avoid
surrounding entire pieces of XML in annotation elements, we just
surround each individual piece of text.<br>
</p>
Regards,<br>
Radu<br>
<pre class="moz-signature" cols="72">Radu Coravu
Oxygen XML Editor</pre>
<div class="moz-cite-prefix">On 8/17/20 10:21 PM, Imsieke, Gerrit,
le-tex wrote:<br>
</div>
<blockquote type="cite"
cite="mid:4389f1df-e8df-b752-798d-cbc135086de0@le-tex.de">Apologies
for cross-posting. Please think about whether the answer is most
relevant to only one of both mailings lists before replying to
both.
<br>
<br>
I recently wanted to render a large book (DocBook 5.1) that was
copy-edited in oXygen author mode and that contained the
corresponding processing instructions, and I wanted to render it
with the Ant-based FO scenario that displays changes. But for some
reason that I could not really fathom, neither this FOP scenario
nor the default PDF rendering scenario produced results, with
different error messages. Increasing oXygen’s or Ant’s heap space
to insane amounts didn’t improve the situation.
<br>
<br>
Anyway, I didn’t need a PDF; HTML would be fine, too, so I decided
to add an oXygen change markup renderer to Norm’s brand new xslTNG
stylesheets, <a class="moz-txt-link-freetext" href="https://github.com/docbook/xslTNG">https://github.com/docbook/xslTNG</a>
<br>
<br>
There’s a pull request to xslTNG where I asked Norm to merge it
into xslTNG (<a class="moz-txt-link-freetext" href="https://github.com/docbook/xslTNG/pull/67">https://github.com/docbook/xslTNG/pull/67</a>). But since
it has been hardly tested on many documents, Norm is hesitant to
merge it, and I’d like to collect some user feedback first.
<br>
<br>
I’d like to ask you to test it on your DocBook files that have
been enhanced with change markup in oXygen’s author mode. The
patched renderer is at
<a class="moz-txt-link-freetext" href="https://github.com/gimsieke/xslTNG/tree/oxy-markup">https://github.com/gimsieke/xslTNG/tree/oxy-markup</a>. You probably
need Gradle or something to build it yourself, but you can use the
latest release (<a class="moz-txt-link-freetext" href="https://github.com/docbook/xslTNG/releases">https://github.com/docbook/xslTNG/releases</a>) and
replace the changed files
(<a class="moz-txt-link-freetext" href="https://github.com/docbook/xslTNG/pull/67/files">https://github.com/docbook/xslTNG/pull/67/files</a>).
<br>
<br>
Or you can just run the stylesheet
<a class="moz-txt-link-freetext" href="https://github.com/gimsieke/xslTNG/blob/oxy-markup/src/main/xslt/transforms/80-oxy-markup.xsl">https://github.com/gimsieke/xslTNG/blob/oxy-markup/src/main/xslt/transforms/80-oxy-markup.xsl</a>
standalone, render the resulting DocBook to HTML and define the
CSS classes .oxy_insert and .oxy_delete to naybe color:green and
color:red, respectively.
<br>
<br>
Please let me know whether it works in principle or whether there
are bugs or missing features. Also whether there’s already another
stylesheet somewhere in place that is supposed to render the
oXygen change markup PIs.
<br>
<br>
Gerrit
<br>
_______________________________________________
<br>
oXygen-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<br>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>