Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about DTD

Status
Not open for further replies.

daniel82

Programmer
Aug 19, 2006
3
GB
Hey there,
I have an urgent question about DTD and since I couldn't find any DTD forums, I thought I'd take my chances and post it here:

I'm supposed to write a DTD for defining the structure of a receipt document, and one of the elements should be:

"The list of items purchased is made up of at least one, but not more than three, purchased items."

and the second one:

"The list of items purchased is made up of at least two, but not more than four, purchased items."

(I think they're basically the same)

I was thinking the answer might be something like:

<!ELEMENT items_purchased_list -- (purchased_items, purchased_items, purchased_items?, purchased_items?)>

(for the more than 2, and less than 4)

I know it's probably a simple and stupid question, but I couldn't find the answer anywhere, it will be one of the questions I'll have to answer tomorrow (Monday 21st) and it's freaking me out. I'd appreciate any suggestions.

cheers
daniel
 
><!ELEMENT items_purchased_list [highlight]--[/highlight] (purchased_items, purchased_items, purchased_items?, purchased_items?)>
It would be fine except what does it mean by having two dashes up there?
[tt]<!ELEMENT items_purchased_list (purchased_items, purchased_items, purchased_items?, purchased_items?)> [/tt]
 
Hi, thanks for the reply!

The two dashes are supposed to be the opening and closing tags, the first one meaning it should have an opening tag, and the second one representing the closing tag (it's not omitted)
 
I'm just not sure if it is the practical way to do it; what if the question was "more than 2 but less than 40" ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top