Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ditamap with Existing Topicmeta Child Elements Without Critdates Broken on Update #23

Open
reifsnid opened this issue Apr 4, 2023 · 5 comments

Comments

@reifsnid
Copy link

reifsnid commented Apr 4, 2023

Given the following DITA Prolog Updater options:

  • Enable automatic prolog update on save = true
    • Set original author = false
    • Set created date = true
    • Update additional authors = false
    • Update revised dates = true

Any ditamap that has existing topicmeta child elements except for <critdates> becomes broken when the DITA Prolog Updater adds the <critdates> element. This is because the DITA schema for ditamaps is restrictive about the order of topicmeta child elements, and the add-on places the <critdates> element after the existing topicmeta child elements.

For example, a ditamap with the following structure:

<map>
    <title>Getting Started</title>
    <topicmeta>
        <othermeta name="classification" value="getting-started"/>
    </topicmeta>
    ...
</map>

Would become broken when the DITA Prolog Updater automatically adds the critdates element to the topicmeta:

<map>
    <title>Getting Started</title>
    <topicmeta>
        <othermeta name="classification" value="getting-started"/>
        <critdates>
            <revised modified="2023-04-04"/>
        </critdates>
    </topicmeta>
    ...
</map>
@DunaMariusCosmin
Copy link
Collaborator

Hi,
Thank you for letting us know about the issue you encountered.
Unfortunately, I cannot reproduce the problem on my side. Could you please provide us with some additional information?

Firstly, what version of Oxygen are you using? This may help us determine whether the issue is related to the specific version of Oxygen you are using.

Additionally, could you please clarify where the map is being opened when you save it? Is it in the DITA Maps Manager or in the main editor?

Best regards,
Cosmin

@reifsnid
Copy link
Author

reifsnid commented Apr 11, 2023

Hi Cosmin,

Thank you for your reply.

I am using Oxygen XML Editor 25.0, build 2022121306.

I've encountered this issue only when editing the map from the DITA Maps Manager. When I edit the map in the main editor, the plugin does not update the map with the <critdates> elements (which might be a separate issue).

Please see the recording I made showing this issue:

dita-prolog-updater-invalid-ditamap-on-update.mp4

I hope this helps!

Daniel

@raducoravu
Copy link
Contributor

raducoravu commented Apr 12, 2023

Hi Daniel, I can reproduce the problem by having similar settings in the "Plugins / DITA Prolog Updater" preferences page.
I added an internal issue to find some time to look into fixing these two problems: (1) the map when saved in the main editor area does not update at all its topicmeta and (2) when saved in the DITA Maps Manager generates an invalid DITA Map.
With the default settings checked in the "Plugins / DITA Prolog Updater" I can reproduce neither problem.

@reifsnid
Copy link
Author

Hi @raducoravu, thanks for the update! I'll stay tuned to hear more updates about this. 😄

For what it's worth, our team is very interesting in using this plugin and think it could be a great addition to our content. However, with the possibility that it can create an invalid DITA Map, we're hesitate to start using it.

Thanks again!

@raducoravu
Copy link
Contributor

@reifsnid sure, we'll update this thread when we manage to fix this in a future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants