Remove @type warnings from map validations using batch validate
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 7
- Joined: Wed Sep 21, 2022 12:24 am
Remove @type warnings from map validations using batch validate
Post by Mauricio Marten »
Hello,
We want to remove the @type warnings when using the batch validation option in the DITA Map Completeness Check feature. An example of the warning is:
W [REF] Reference is made with inherited @type "concept" to a DITA resource with class "- topic/topic reference/reference ".
Is this something that can be done through the oxygen API or it has to be done on your end?
Thanks,
Mauricio
We want to remove the @type warnings when using the batch validation option in the DITA Map Completeness Check feature. An example of the warning is:
W [REF] Reference is made with inherited @type "concept" to a DITA resource with class "- topic/topic reference/reference ".
Is this something that can be done through the oxygen API or it has to be done on your end?
Thanks,
Mauricio
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Remove @type warnings from map validations using batch validate
Hi Mauricio,
I'm afraid we do not have a checkbox for this in the "Validate and check for completeness" settings dialog.
An Oxygen plugin can for example filter certain validation problems from being displayed:
https://github.com/oxygenxml/wsaccess-j ... lemsFilter
But my advice to you is to simply remove all "type" attributes from your DITA Maps as they are automatically inferred by the publishing engine when publishing.
Regards,
Radu
I'm afraid we do not have a checkbox for this in the "Validate and check for completeness" settings dialog.
An Oxygen plugin can for example filter certain validation problems from being displayed:
https://github.com/oxygenxml/wsaccess-j ... lemsFilter
But my advice to you is to simply remove all "type" attributes from your DITA Maps as they are automatically inferred by the publishing engine when publishing.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Remove @type warnings from map validations using batch validate
Post by chrispitude »
Hi Mauricio,
Are these @type attributes on <topicref> elements in a map, or on <xref>/<link> elements in a topic?
Are these @type attributes on <topicref> elements in a map, or on <xref>/<link> elements in a topic?
-
- Posts: 7
- Joined: Wed Sep 21, 2022 12:24 am
Re: Remove @type warnings from map validations using batch validate
Post by Mauricio Marten »
Hi Radu,
Ok thanks I will look into that. We are currently using Oxygen 20.1 which has that option available:
Thanks,
Mauricio
Ok thanks I will look into that. We are currently using Oxygen 20.1 which has that option available:
batch-validate.PNG
Thanks,
Mauricio
You do not have the required permissions to view the files attached to this post.
-
- Posts: 7
- Joined: Wed Sep 21, 2022 12:24 am
Re: Remove @type warnings from map validations using batch validate
Post by Mauricio Marten »
Hi Chris,chrispitude wrote: ↑Wed Sep 21, 2022 1:48 pm Hi Mauricio,
Are these @type attributes on <topicref> elements in a map, or on <xref>/<link> elements in a topic?
Yes the @type attributes are on <topicref> elements in a map like this:
example.PNG
Thanks,
Mauricio
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Remove @type warnings from map validations using batch validate
Hi Mauricio,
The "Batch validate DITA resources" checkbox in the "Validate and check for completeness" settings dialog does not influence this warning you are receiving in any way. My initial answer still stands, I recommend you remove the @type attributes from all of your DITA Maps.
Regards,
Radu
The "Batch validate DITA resources" checkbox in the "Validate and check for completeness" settings dialog does not influence this warning you are receiving in any way. My initial answer still stands, I recommend you remove the @type attributes from all of your DITA Maps.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Sep 21, 2022 12:24 am
Re: Remove @type warnings from map validations using batch validate
Post by Mauricio Marten »
Hi Radu,Radu wrote: ↑Thu Sep 22, 2022 7:57 am Hi Mauricio,
The "Batch validate DITA resources" checkbox in the "Validate and check for completeness" settings dialog does not influence this warning you are receiving in any way. My initial answer still stands, I recommend you remove the @type attributes from all of your DITA Maps.
Regards,
Radu
Unfortunately it does not depend on me to remove those @type attributes. However thanks for the plugin code you provided which helped me remove those specific warnings during validation in this case.
Thanks,
Mauricio
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Remove @type warnings from map validations using batch validate
Hi Mauricio,
Usually in this case it's best to be consistent, either not use @type at all in the DITA Maps or use it in all places. To use it in all places, in the Oxygen Preferences->"DITA / Maps" page there is an "Always set values for the following attributes" section where you can check "Type".
Otherwise, coming back to the original error message:
So someone forgot to set the @type attribute on the "reference.xml" and the DITA standard says the type attribute cascades so the publishing engine will interpret the type of the "reference.xml" to be "concept" which is incorrect.
So another way to avoid such error messages is to fix them, to go to that specific topicref which does not have a @type attribute and add the type attribute to it.
Because with the problems filter plugin you are just sweeping the problem under the rug and the final publishing may also report such problems.
Regards,
Radu
Usually in this case it's best to be consistent, either not use @type at all in the DITA Maps or use it in all places. To use it in all places, in the Oxygen Preferences->"DITA / Maps" page there is an "Always set values for the following attributes" section where you can check "Type".
Otherwise, coming back to the original error message:
it means that the DITA Map has some content like this:Reference is made with inherited @type "concept" to a DITA resource with class "- topic/topic reference/reference ".
Code: Select all
<topicref href="concept.xml" type="concept">
.....
<topicref href="reference.xml"/>
</topicref>
So another way to avoid such error messages is to fix them, to go to that specific topicref which does not have a @type attribute and add the type attribute to it.
Because with the problems filter plugin you are just sweeping the problem under the rug and the final publishing may also report such problems.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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