Author Mode Comments (created PI)
Are you missing a feature? Request its implementation here.
-
- Posts: 1
- Joined: Mon Jun 25, 2018 4:40 pm
Author Mode Comments (created PI)
Hi folks,
we are using the Author Mode and its "comment" functionality to overcome some issues with overlapping encoding. The created PIs are a kind of a workaround for encoding semantics spanning over several elements. While front end side everything looks fine, and this solution offers everything we need, we are facing some troubles processing the result when multiple of theses comments are set.
see this example (fragment):
It represents the result of a valid "comment" annotation prepared with the author mode. For the encoder, in this case it is impossible to set end point before of after a certain end tag, since these are not displayed (what is a valid set up and should not interfere with our workflow). But there is no chance to determine the corresponding start-PI for both end-PIs w/o the "mid-attribute".
possible solution:
set a unique ID for the start and the end PI in an appropriate "attribute". Alternatively this can be done with the timestamp for example. When the timestamp will be added to the we can navigate to the start PI without any troubles.
for TEI folks: yes, the comments we are creating behave like tei:milestone, but for convenience we want to use the comment functionality of the author mode here.
thank you very much and kind regards,
mathias
edit: here is a more unpleasant example.
we are using the Author Mode and its "comment" functionality to overcome some issues with overlapping encoding. The created PIs
Code: Select all
<?oxy_comment_(start|end)?>
see this example (fragment):
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<root>
<ab>
<seg xml:lang="ara">١٣܆</seg>
<?oxy_comment_start author="name" timestamp="20200827T181711+0200" comment="wise_fool_sinful"?>
<?oxy_comment_start author="name" timestamp="20210319T180034+0100" comment="adherence_wisdom"?>
<?oxy_comment_start author="name" timestamp="20210319T180048+0100" comment="social_contacts_no_family" mid="30"?>
<quote next="#say14.sprN4">ܒܪܝ ܐܬܕܰܒܩ ܠܐܢܼܫ̈ܐ ܚܟܝܡ̈ܐ ܕܬܗܘܐ ܚܟܝܡ ܐܟܘܵܬܗܘܢ܂ ܘܠܐ</quote>
</ab>
<ab><quote xml:id="say14.sprN4">ܬܬܢܰܩܰܦ ܠܐܢܫ̈ܐ ܣܟ̈ܠܐ ܕܕܰܠܡܐ ܬܐܠܦ ܡܼܢ
ܐܘܪ̈ܚܵܬܗܘܢ܀<?oxy_comment_end?><?oxy_comment_end mid="30"?></quote><?oxy_comment_end?></ab>
</root>
possible solution:
set a unique ID for the start and the end PI in an appropriate "attribute". Alternatively this can be done with the timestamp for example. When the timestamp will be added to the
Code: Select all
<?oxy_comment_end?>
for TEI folks: yes, the comments we are creating behave like tei:milestone, but for convenience we want to use the comment functionality of the author mode here.
thank you very much and kind regards,
mathias
edit: here is a more unpleasant example.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- starting comments above -->
<ab>
<cit type="paraphrase" xml:id="say12x">
<quote xml:id="say12.1">ܠܓܲܒܼܪܵܐ ܦܲܟܵܢܵܐ <choice>
<sic>ܘܠܸܫܵܢܵܢܵܐ</sic>
<corr resp="#SB">ܘܠܸܫܵܢܵܐ</corr>
</choice> ܕܠܵܐ ܬܵܬܼܡ̱ܢܹܐ ܥܲܡܹܗ܀</quote>
<note type="original-phrase">ܕܡܗܠܟ ܥܡ ܚܟܝܡܐ ܢܗܘܐ ܚܟܝܡ܂ ܘܕܡܗܠܟ ܥܡ ܣܟܠܐ ܢܒܐܫ ܠܗ܂</note>
<bibl type="provided-by-editor" source="#Peshitta_Prov_Eccl_etc">Prov 13,20.</bibl>
</cit><?oxy_comment_end?><?oxy_comment_end mid="29"?><?oxy_comment_end mid="30"?>
<?oxy_comment_start author="name" timestamp="20201103T163428+0100" comment="richness_poverty"?>
<?oxy_comment_start author="name" timestamp="20210317T150448+0100" comment="disciplining_of_sons"?>
<quote next="#say13"> ܒܹܪܝ ܥܲܕ ܐܝܼܬܼ</quote>
</ab>
<ab>
<quote xml:id="say13">ܡܣܵܢܹ̈ܐ ܒܪܸ̈ܓܠܲܝܟ ܕܘܼܫ ܕܲܪܕܪ̈ܐܹ܉ ܘܲܥܒܸܕ ܐܘܼܪܚܵܐ ܠܲܒܼ̈ܢܲܝܟ
ܘܠܲܒܼ̈ܢܿܝ</quote>
</ab>
<ab>
<quote xml:id="say13.1">ܒ̈ܢܲܝܟ܀<?oxy_comment_end?></quote>
<quote next="#say14"> ܒܹܪܝ ܒܲܪ ܥܲܬܿܝܼܪܹ̈ܐ ܐܸܟܲܠ ܚܸܘܝܵܐ܉ ܘܐܵܡܪܝܼܢ ܠܐܵܣܝܘܼܬܼܵܐ
ܐܲܟܼܠܹܗ܂</quote>
</ab>
<ab>
<quote xml:id="say14">ܘܐܲܟܼܠܹܗ ܒܲܪ ܡܸܣ̈ܟܹܿܢܹܐ܉ ܘܐܵܡܪܝܼܢ ܕܲܠܟܲܦܢܹܗ ܐܲܟܼܠܹܗ܀</quote><?oxy_comment_end?>
<?oxy_comment_start author="name" timestamp="20201103T172943+0100" comment="social_contacts_no_family"?>
<quote next="#say15"> ܒܹܪܝ ܐܲܟܼܘܿܠ</quote>
</ab>
<!-- ending comments below -->
</root>
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Author Mode Comments (created PI)
Post by alex_jitianu »
Hello,
When comments overlap we use the @mid attribute to distinguish among them.
A possible workflow over the current PIs structure is like this:
- you first analyze the PIs that have the @mid attribute set. After you do what you must do, you remove the corresponding oxy_comment_start and oxy_comment_end markers.
- all the comments that remain are no longer overlapping. To identify the end marker, you can put the caret on a start marker and run an XPath like this one. Because the overlapping comments are gone, we don't need to exclude them from the XPath, but I imagine one could refine an XPath expression that ignores them.
I agree that it would be a lot easier to process these PIs if the @mid attribute would always be present.
Best regards,
Alex
When comments overlap we use the @mid attribute to distinguish among them.
The encoder is a person that looks over the document and needs to transform these PIs into TEI markup?For the encoder, in this case it is impossible to set end point before of after a certain end tag, since these are not displayed (what is a valid set up and should not interfere with our workflow)
A possible workflow over the current PIs structure is like this:
- you first analyze the PIs that have the @mid attribute set. After you do what you must do, you remove the corresponding oxy_comment_start and oxy_comment_end markers.
- all the comments that remain are no longer overlapping. To identify the end marker, you can put the caret on a start marker and run an XPath like this one. Because the overlapping comments are gone, we don't need to exclude them from the XPath, but I imagine one could refine an XPath expression that ignores them.
Code: Select all
for $x in count(following::processing-instruction('oxy_comment_start')[not(preceding::processing-instruction('oxy_comment_end'))])
return following::processing-instruction('oxy_comment_end') [$x + 1]
Best regards,
Alex
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Author Mode Comments (created PI)
Hi,
Adding here also a link to a project we have which uses XSLT to handle Oxygen review processing instructions for HTML and PDF publishing: https://github.com/oxygenxml/dita-class ... iew/review
Regards,
Radu
Adding here also a link to a project we have which uses XSLT to handle Oxygen review processing instructions for HTML and PDF publishing: https://github.com/oxygenxml/dita-class ... iew/review
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service