[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a or b or both - mystery..
- From: Marcus Carr <firstname.lastname@example.org>
- To: Anshul.Mittal@iint.com
- Date: Tue, 17 Apr 2001 09:39:33 +1000
> 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)),
> 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
<!ELEMENT LineItem (((EcatSuppName, EcatSuppCode?) | (EcatSuppCode)),
((EcatSuppPartNbr, EcatSuppModel?) | (EcatSuppModel)),
ManufacturerName?, EcatItemDesc, CommCodeXref?,
EcatQuantity, EcatUom, EcatUnitPriceFx, EcatCurrency,
> Any Idias ??
Extending Easter holidays for another week? :-)
Marcus Carr email: email@example.com
Allette Systems (Australia) www: http://www.allette.com.au
"Everything should be made as simple as possible, but not simpler."