Page 1 of 1

Simple DITA topic validation question

Posted: Wed Jul 23, 2014 6:07 pm
by tmakita
Hi,

Following DITA topic validation in oXygen XML Author reports 4 errors.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<topic id="topic_001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
<title>Topic title #1</title>
<body>
<p id="p_001">ABC</p>
<p id="p_002">DEF</p>
</body>
<topic id="topic_002">
<title>Topic title #2</title>
<body>
<p id="p_001">ABC</p>
<p id="p_002">DEF</p>
</body>
</topic>
</topic>
  • E [ISO Schematron] The id attribute value "p_001" is not unique within the topic that contains it.
    E [ISO Schematron] The id attribute value "p_002" is not unique within the topic that contains it.
    E [ISO Schematron] The id attribute value "p_001" is not unique within the topic that contains it.
    E [ISO Schematron] The id attribute value "p_002" is not unique within the topic that contains it.
However DITA specification says as following:

2.1.3.4.1 ID attribute
http://docs.oasis-open.org/dita/v1.2/os ... id.html#id
Note: Thus, within a single XML document containing multiple peer or nested topics, the IDs of the non-topic elements only need to be unique within each topic without regard to the IDs of elements within any ancestor or descendant topics.
So I think the id attributes must be unique only within the each topics. Is this a correct validation result?

Regards,

Toshihiko Makita

Re: Simple DITA topic validation question

Posted: Thu Jul 24, 2014 11:51 am
by tmakita
For your reference this error does not occur in the following DTD version.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_001">
<title>Topic title #1</title>
<body>
<p id="p_001">ABC</p>
<p id="p_002">DEF</p>
</body>
<topic id="topic_002">
<title>Topic title #2</title>
<body>
<p id="p_001">GHI</p>
<p id="p_002">JKL</p>
</body>
</topic>
</topic>
Toshihiko Makita

Re: Simple DITA topic validation question

Posted: Thu Jul 24, 2014 2:20 pm
by alex_jitianu
Hello,

The Schematron involved in examining the IDs needs access to the class attributes. Because when running a Schematron we are using Saxon 9 PE, the schema is not loaded and the class attribute values are unknown. To make it schema aware, please go to Preferences, page XML / XML Parser / Schematron and check Use Saxon EE (schema aware) for xslt2 query binding.


Best regards,
Alex

Re: Simple DITA topic validation question

Posted: Thu Jul 24, 2014 3:53 pm
by tmakita
Hi Alex,

Your suggestion solved this problem completely.
Thank you very much!

Best regards,

Toshihiko Makita

Re: Simple DITA topic validation question

Posted: Thu Aug 07, 2014 8:54 am
by Radu
Hi Toshihiko,

We'll try to improve the behavior in a future version of Oxygen so that such errors are not reported by default to our users (without users needing to change settings).

Regards,
Radu

Re: Simple DITA topic validation question

Posted: Wed Apr 01, 2015 9:42 am
by Radu
Hi,

Just to update this thread, Oxygen 16.1 should contain a fix for this.

Regards,
Radu

Re: Simple DITA topic validation question

Posted: Wed Apr 01, 2015 10:47 am
by tmakita
Hi,

I just confirmed that this problem has been fixed in oXygen 16.1.

Regards,

Toshihiko Makita