Topics

Are IBM-Supplied DITA Schemas Valid?

W. Eliot Kimber <ekimber@...>
 

I'm still trying to fully understand the state of the current DITA
schemas (as provided in the 1.3 IBM DITA distribution). Here are the
results I get to date:

- Stylus studio and oXygen 1.4 both produce huge error reports. It
looks like they may both use the same technology to implement their
schema processing since both report the same set of errors.

- Turbo XML 2.4.1 Considers the schemas to be valid

- Saxon SA 8 reports the following problems:

------------
C:&#92;standards&#92;ibm-dita&#92;dita13&#92;schema>java com.saxonica.Validate sample-
xsd-file.xml
Saxon-SA evaluation license expires in 30 days
Error on line 134 of file:/C:/standards/ibm-
dita/dita13/schema/programming-domain.mod:
An element <kwd> in the content model is in the substitution group
of another element
<keyword> that is also in the content model, but has a different
type
Error on line 235 of file:/C:/standards/ibm-
dita/dita13/schema/programming-domain.mod:
The content model of complex type plentry.class is not a valid
restriction of the content
model of type dlentry.class. Restricted type allows element pd
where the base type does not
Error on line 25 of file:/C:/standards/ibm-
dita/dita13/schema/software-domain.mod:
An element <varname> in the content model is in the substitution
group of another element
<keyword> that is also in the content model, but has a different
type
Error on line 68 of file:/C:/standards/ibm-
dita/dita13/schema/software-domain.mod:
An element <varname> in the content model is in the substitution
group of another element
<keyword> that is also in the content model, but has a different
type
Error on line 101 of file:/C:/standards/ibm-
dita/dita13/schema/software-domain.mod:
An element <varname> in the content model is in the substitution
group of another element
<keyword> that is also in the content model, but has a different
type
Error on line 117 of file:/C:/standards/ibm-
dita/dita13/schema/software-domain.mod:
An element <varname> in the content model is in the substitution
group of another element
<keyword> that is also in the content model, but has a different
type
Error on line 133 of file:/C:/standards/ibm-
dita/dita13/schema/software-domain.mod:
An element <varname> in the content model is in the substitution
group of another element
<keyword> that is also in the content model, but has a different
type
Error on line 24 of file:/C:/standards/ibm-dita/dita13/schema/ui-
domain.mod:
An element <shortcut> in the content model is in the substitution
group of another element
<keyword> that is also in the content model, but has a different
type
Error on line 31 of file:/C:/standards/ibm-
dita/dita13/schema/concept.mod:
The content model of complex type concept.class is not a valid
restriction of the content
model of type topic.class. Restricted type allows element conbody
where the base type does not
Warning: The schema is invalid
---------------

Since I implicitly trust Mike Kay to have gotten it right, I suspect
that the errors reported by Saxon do in fact reflect the true state
of the schemas: that they are technically invalid but correct enough
to be accepted by Turbo.

The other alternative is that the IBM DITA schema developers used a
tool, like Turbo, that failed to report all the problems and that the
schemas are in fact not valid at all.

Can anyone enlighten me?

Thanks,

Eliot

Don R. Day <dond@...>
 

--- In dita-users@..., "W. Eliot Kimber" <ekimber@i...> wrote:
Since I implicitly trust Mike Kay to have gotten it right, I suspect
that the errors reported by Saxon do in fact reflect the true state
of the schemas: that they are technically invalid but correct enough
to be accepted by Turbo.

The other alternative is that the IBM DITA schema developers used a
tool, like Turbo, that failed to report all the problems and that the
schemas are in fact not valid at all.
I don't see topic.xsd, task.xsd, or reference.xsd implicated in those
messages. If you had said that "not all the schemas are valid," I'd be
more in agreement: clearly there are problems with the domains and
with concept.mod.

Can anyone enlighten me?
I think its a bit of both, Eliot. Yes, the dita13 schemas did pick up
some typing bugs when we added keyword and term into some content
models among the domains. But no tool I used had indicated anything
wrong with programming-domain.mod or concept.mod, so I suspect that
Saxon 8 may quickly become a new standard for verifying any new design
changes to the DITA schemas.

The "OASIS-DITAsubmission-01" set of schemas should correct the
declaration errors that Saxon 8 reported for software-domain.mod.
I'll ask Eric Sirois to look into the other messages.

--
Don Day
IBM Lead DITA Architect

W. Eliot Kimber <ekimber@...>
 

--- In dita-users@..., "Don R. Day" <dond@u...> wrote:
--- In dita-users@..., "W. Eliot Kimber" <ekimber@i...>
I don't see topic.xsd, task.xsd, or reference.xsd implicated in
those
messages. If you had said that "not all the schemas are valid," I'd
be
more in agreement: clearly there are problems with the domains and
with concept.mod.
I was only testing with ditabase.xsd, because it includes all
the .mod files. But I believe that the other top-level XSDs would
produce the same basic result because they all use the same modules
and domains. That is, they all pull in the same set of domain modules.

The "OASIS-DITAsubmission-01" set of schemas should correct the
declaration errors that Saxon 8 reported for software-domain.mod.
OK, I'll try those and see if I get different results.

Cheers,

Eliot
Innodata Isogen

Eric Sirois
 

Hi Eliot,

Stylus Studio and Saxon 8.0 (depending on your Java JDK) use Xerces to parse/validate the XML Schemas. I'm not sure if Turbo XML which XML parser it uses to validate XML Schemas.
You are going to run into the same problems if an IDE use MSXML too. These are 'valid' as per the XML Schema 1.0 spec. The specification algorithm for restriction of content models is too restrictive per se.

Some XML IDEs that have there on proprietary parsers either ignore that protion of the algorithm or simply check that the elements in the restricted content model a valid (closer to a multiple inheritance model).

Unfortunately, we are stuck with these errors until XML Schema 1.1 aware parsers become available or that XML IDES only validate the document as per the XML Schemas and not the XML Schema itself.



From: "W. Eliot Kimber" <ekimber@...>
Date: 2004/06/28 Mon PM 07:07:48 EDT
To: dita-users@...
Subject: [dita-users] Are IBM-Supplied DITA Schemas Valid?

1