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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a or b or both - mystery..




Anshul.Mittal@iint.com wrote:

> I have a requirement where I have to specify the following condition in a dtd...
>
>    ecat-supp-name and ecat-supp-code are individually optional but one of the
> two needs to be present to locate the vendor
>
>    So I need to have ecat-supp-name or ecat-supp-code or or both in the higher
> level element...
>
>   Thats how I wrote the dtd  .
>
> <!ELEMENT LineItem (((EcatSuppName|EcatSuppCode)|(EcatSuppName,EcatSuppCode)),
> ((EcatSuppPartNbr|EcatSuppModel)|(EcatSuppPartNbr,EcatSuppModel)),
>                                    ManufacturerName?, EcatItemDesc,
> CommCodeXref?, EcatQuantity, EcatUom,
>                                    EcatUnitPriceFx, EcatCurrency,
> EcatCatalogId?, EcatPONumber?)>
>
> But getting the following error " Content Model is non - deterministic for Line
> Item" when I try to validate this dtd.

The problem is that the processor can't determine where it is when it encounters the
EcatSuppName element, because it doesn't know if it requires an EcatSuppCode to
follow or not. Even if you got past this problem for this set of elements, it would
recur when the processor got to the EcatSuppPartNbr in the same content model. The
following model allows either or both elements in the set to occur and requires one
as the minimum. The only restriction is that if both elements in the set exist, they
must be in a fixed order, but that restriction is present in your current model
anyway.

<!ELEMENT LineItem    (((EcatSuppName, EcatSuppCode?) | (EcatSuppCode)),
                       ((EcatSuppPartNbr, EcatSuppModel?) | (EcatSuppModel)),
                       ManufacturerName?, EcatItemDesc, CommCodeXref?,
                       EcatQuantity, EcatUom, EcatUnitPriceFx, EcatCurrency,
                       EcatCatalogId?, EcatPONumber?)>

> Any Idias ??

Extending Easter holidays for another week? :-)


--
Regards,

Marcus Carr                      email:  mrc@allette.com.au
___________________________________________________________________
Allette Systems (Australia)      www:    http://www.allette.com.au
___________________________________________________________________
"Everything should be made as simple as possible, but not simpler."
       - Einstein