DITA documentation subjectScheme maps validation issue

Post here questions and problems related to editing and publishing DITA content.
takesson
Posts: 5
Joined: Tue Jan 16, 2018 4:18 pm

DITA documentation subjectScheme maps validation issue

Post by takesson »

Hi,

When pasting sample subjectScheme maps from the DITA standard documentation, I am getting a validation issue in Oxygen 19.1.

E.g. this one:
https://www.oxygenxml.com/dita/1.3/spec ... arget.html

Gives validation issue:
Key definition 'deliveryTargetValues' not found in the DITA Map. There is no map opened in the DITA Maps Manager and no root map specified.


The sample subjectScheme shipped with Oxygen 19.1 has no keyref attribute on <subjectdef>. Neither approach has been successful in getting Oxygen Editor 19.1 to use the subjectScheme instead of the profiling configured in preferences.

Am I missing something?

Thanks!
Radu
Posts: 9461
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by Radu »

Hi,

Usually the Subject Scheme is referenced in the main DITA Map:

https://www.oxygenxml.com/doc/versions/ ... e-map.html

So you first create the Subject Scheme map and save it on disk.
Then you create the main DITA Map which has a topicref to the subject scheme map:

Code: Select all

<topicref href="test.ditamap" format="ditamap" type="subjectScheme"/>
and has topicrefs to all other DITA topics as well.
Then you open the main DITA Map in the DITA Maps Manager view and that warning when editing the subject scheme map should go away.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
takesson
Posts: 5
Joined: Tue Jan 16, 2018 4:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by takesson »

Hi,

In the Editor view, this validation issue is to be considered "normal"? It makes no sense since the key is defined just above.

I finally got the subject scheme to work. I had a correct topicref to the subjectScheme map but it would not use it until I had set the href attribute on a following topicref. After setting the href to a topic it suddenly started using the subjectScheme.

Thanks,
Thomas Å.
Radu
Posts: 9461
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by Radu »

Hi Thomas,
In the Editor view, this validation issue is to be considered "normal"? It makes no sense since the key is defined just above.
Oxygen has a global "keys context", a context from which it gathers all defined keys. If you open the DITA Maps Manager view, it has in it a "Root Map" combo box. That is the keys context, the DITA Map from which Oxygen starts to gather all keys.
As you did not have a root map opened, Oxygen gathered no keys so it started reporting those warnings on all keyrefs.
Indeed in cases like yours Oxygen should probably gather the keys directly from the opened subject scheme map and use those to validate the key references. We'll probably address this situation in a future release.
I finally got the subject scheme to work. I had a correct topicref to the subjectScheme map but it would not use it until I had set the href attribute on a following topicref. After setting the href to a topic it suddenly started using the subjectScheme.
Once you open a main DITA Map in the DITA Maps Manager, the root map combo box is usually set to the value <Current Map> so Oxygen will start gathering all keys from it and also looking for referenced subject scheme maps to use values in them for imposing attribute values in opened topics.
So from your description I'm not sure what went wrong, if you can reproduce again the problem please tell me how the main DITA Map contents looked like and what exactly you expected to happen, I'm assuming you had a topic opened and you expected validation to report attribute values which were rejected by the subject scheme map.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
takesson
Posts: 5
Joined: Tue Jan 16, 2018 4:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by takesson »

Hi Radu,

Thanks for the background information. Both issues seem related to the same aspect; the map must be open in DITA Maps Manager (not just in Editor).

When I have a map open only in Editor the subjectScheme processing is not active. See screenshot.

Image

This means that a map can not be validated (incl subjectScheme) in the Editor / Author view without also opening it in the DITA Maps Manager?

How does this work in Web Author? Does it open a map in Editor or DITA Maps Manager?

Thanks
Thomas Å.
Radu
Posts: 9461
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by Radu »

Hi Thomas,

Exactly, so in order for Oxygen to know from where to get the keys, it needs that root map information from the DITA Maps Manager. You can also force impose a Root Map there without actually needing to open it in the DITA Maps manager view (there is a "Browse" button next to the "Root Map combo box").

About these remarks:
This means that a map can not be validated (incl subjectScheme) in the Editor / Author view without also opening it in the DITA Maps Manager?
There are various layers of validation. The validation according to the Subject Scheme Map DTD is done successfully.
But we also have a DITA-specific validation layer which checks if keyrefs properly point to defined keys. And indeed this specific validation layer requires a Root Map set in the DITA Maps manager. For missing keyrefs yt gives warnings (and not errors) also because in cases like yours its reports might not be accurate.
How does this work in Web Author? Does it open a map in Editor or DITA Maps Manager?
For WebAuthor you can pass the reference to the root map as a GET parameter when opening a topic for editing. Or on the server side you can use our API to impose a root map. And there is also a "Root map" toolbar button which allows you to set a reference to a root map.
But the Web Author does not (yet) have a DITA Maps manager view. We'll probably work to add it in a future version.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
takesson
Posts: 5
Joined: Tue Jan 16, 2018 4:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by takesson »

Hi Radu,
There are various layers of validation. The validation according to the Subject Scheme Map DTD is done successfully.
Sorry, I was unclear. I meant to say:

This means that a map can not be validated (incl the attribute restrictions defined by a referenced subject scheme ) in the Editor / Author view without also opening it in the DITA Maps Manager?

Image

Image

I understand that validation of topics require that a parent map is open in the DITA Maps Manager. However, when a map is open in Editor, it is surprising that it is not fully validated. See screenshots.

Thanks,
Thomas Å.
Radu
Posts: 9461
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA documentation subjectScheme maps validation issue

Post by Radu »

Hi Thomas,
This means that a map can not be validated (incl the attribute restrictions defined by a referenced subject scheme ) in the Editor / Author view without also opening it in the DITA Maps Manager?
Right, you understood correctly. Either the "map1.ditamap" or a larger DITA Map which includes it (directly or indirectly) would need to be opened in the DITA Maps Manager (or explicitly set in the Root Map combo box).
But I also agree with your frustration, current opened DITA Maps should gather the keys from their own content if there is no Root Map set in the DITA Maps Manager and we'll probably do something about this in a future version.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply