Simple DITA topic validation question

Questions about XML that are not covered by the other forums should go here.
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Simple DITA topic validation question

Post 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
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Simple DITA topic validation question

Post 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
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Simple DITA topic validation question

Post 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
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Simple DITA topic validation question

Post by tmakita »

Hi Alex,

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

Best regards,

Toshihiko Makita
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Simple DITA topic validation question

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Simple DITA topic validation question

Post by Radu »

Hi,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Simple DITA topic validation question

Post by tmakita »

Hi,

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

Regards,

Toshihiko Makita
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Post Reply