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