ignore or filter DITA error messages

Post here questions and problems related to oXygen frameworks/document types.
vishwavaranasi
Posts: 14
Joined: Fri Feb 28, 2020 4:02 pm

ignore or filter DITA error messages

Post by vishwavaranasi » Wed Jun 17, 2020 9:35 am

Hi Team , we have a custom DITA doc types for the <topic> , so we have created a template file

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//COMPANY//DTD myCustom DITA Topic//EN" "myCustomTopic.dtd">
<topic id="${customUUID}" format="dita" type="topic">
    <title></title>
    <body></body>
</topic>
since my DITA custom type extends DITA , and when i create a topic using above template DITA validation is throwing error


Attribute "type" is not allowed to appear in element "topic".

Attribute "format" is not allowed to appear in element "topic".

We want to allow these 2 attributes to be included when we create a topic and don not show any error messages to the user.

would you please help us how to achieve this?

Thanks,
vishwa

Radu
Posts: 7024
Joined: Fri Jul 09, 2004 5:18 pm

Re: ignore or filter DITA error messages

Post by Radu » Wed Jun 17, 2020 9:44 am

Hi,

Your use case is quite strange because the format and type of a file are automatically determined by the publishing engine when it is referenced in the DITA Map.

There is a tutorial written by expert Eliot Kimber about how to create your own DITA specialization DTDs:

https://www.xiruss.org/tutorials/dita-specialization/

One of the chapters there is called "Attribute Specialization Tutorial" and can be used to add your own new global attributes, but the attributes will need to be defined on all DITA elements, with the DITA 1.3 specification all new attributes need to be defined as gobal attributes and thus they become available on all elements:

https://www.oxygenxml.com/dita/1.3/spec ... butes.html

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

wmaclean
Posts: 20
Joined: Sat Jan 04, 2020 1:17 am

Re: ignore or filter DITA error messages

Post by wmaclean » Fri Jun 19, 2020 4:41 pm

Hi Radu - thanks for your help!

Post Reply