OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: Ambiguous content model in DITA 2.0


I’m thinking that what we originally approved for the content model of <messagepanel> was the following sequence:

 

  1. Zero or more <data> elements
  2. One <typeofhazard> element
  3. One of the following:
    1. <consequence> element (zero or more), followed by <howtoavoid> element (at least one)
    2. <howtoavoid> element (at least one), followed by <consequence> element (zero or more)
  4. Zero or more <hazardsymbol> elements

 

My memory is a little fuzzy now, but what I remember is that we:

  • Knew that different types of safety statements listed “consequence” and “how to avoid” in different order
  • Wanted to help people avoid doing gymnastics in their style sheets
  • Wanted to minimize migration pains in moving to DITA 2.0 markup
  • Wanted to allow <hazardsymbol> in a number of places – directly within <messagepanel> and also within other elements: <typeofhazard>, <consequence>, and <howtoavoid>

 

We approved the stage three proposal for this on 22 October 2019.

 

Best,

Kris

 

Kristen James Eberlein
Chair, OASIS DITA Technical Committee
Owner, Eberlein Consulting LLC
kris@eberleinconsulting.com

Skype: kriseberlein; voice: +1 (919) 622-1501

 

From: dita@lists.oasis-open.org <dita@lists.oasis-open.org> On Behalf Of Robert Anderson
Sent: Monday, August 1, 2022 3:30 PM
To: dita@lists.oasis-open.org
Subject: [dita] Fw: Ambiguous content model in DITA 2.0

 

Hi everyone,

 

Passing along a reported issue in the grammar files for TC discussion.

 

Thanks,

Robert

 

 


From: Patrick Baker <pbaker@stilo.com>
Sent: Saturday, July 30, 2022 9:58 AM
To: Robert Anderson <robert.dan.anderson@oracle.com>
Subject: [External] : Ambiguous content model in DITA 2.0

 

Hi Robert,

 

According to OmniMark, the following content model is ambiguous:

 

<!ENTITY % messagepanel.content
                       "(
                         (%data;)*,
                         (%typeofhazard;),
                         (
                          ((%consequence;)*, (%howtoavoid;)+) |
                          ((%howtoavoid;)+, (%consequence;)*)
                          ),(%hazardsymbol;)*
                         )"

 

A content model must not be ambiguous. For the declared element "messagepanel", the element "howtoavoid" is ambiguous in the content model.
At line 132 of entity hazard-d-def
In entity file://${ROOT_PATH}/schema/OASIS/DITA/2.0/org.oasis-open.dita.v2_0/dtd/base/hazardstatementDomain.mod
Included from entity file://${ROOT_PATH}/schema/OASIS/DITA/2.0/org.oasis-open.dita.techcomm.v2_0/dtd/technicalContent/ditabase.dtd

 

The fix would be straight forward... Just change one * to a +. It will match the same XML, but will not be ambiguous.

 

<!ENTITY % messagepanel.content
                       "(
                         (%data;)*,
                         (%typeofhazard;),
                         (
                          ((%consequence;)+, (%howtoavoid;)+) |
                          ((%howtoavoid;)+, (%consequence;)*)
                          ),(%hazardsymbol;)*
                         )"

 

I'd recommend a similar change in the RNG.

 

regards,

Patrick



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]