Hello:
I am preparing for the ibm xml developer certification and i found an old copy of one of ibm's tests online ->
http://www.certificationguru.com/solution.htm One of the answers to a dtd question seems incorrect, and i am wondering if anyone else agrees with me (or if u disagree pls clue me in as to what i am missing ;^)
question 16 indicates that the following dtd content model is *not allowed*
<!element Customer ((Name, Ship-to-address) | (Name, Bill-to-address))>
it is refered to as a "non-deterministic content model"...
I tried this out with little xml
doc and a dtd as follows ->
<?xml version="1.0"?>
<!DOCTYPE note SYSTEM "note.dtd"
>
<note>
<name>foo</name>
<bill-to>foo</bill-to>
</note>
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
note.dtd
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<!ELEMENT note ( (name, ship-to) | (name, bill-to) ) >
<!ELEMENT name (#PCDATA)>
<!ELEMENT ship-to (#PCDATA)>
<!ELEMENT bill-to (#PCDATA)>
well... it works for me ! So where is the ambiguity in this content model ?
thanks very much for your help ..
chris