Simple DITA topic validation question

Questions about XML that are not covered by the other forums should go here.
tmakita
Posts: 69

Simple DITA topic validation question

Wed Jul 23, 2014 6:07 pm

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: 69

Re: Simple DITA topic validation question

Thu Jul 24, 2014 11:51 am

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: 604

Re: Simple DITA topic validation question

Thu Jul 24, 2014 2:20 pm

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: 69

Re: Simple DITA topic validation question

Thu Jul 24, 2014 3:53 pm

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: 5219

Re: Simple DITA topic validation question

Thu Aug 07, 2014 8:54 am

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: 5219

Re: Simple DITA topic validation question

Wed Apr 01, 2015 9:42 am

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: 69

Re: Simple DITA topic validation question

Wed Apr 01, 2015 10:47 am

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/
--------------------------------------------------*/

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 2 guests