Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What does the "+" mean in the DTD file?

 
Hua Liang
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider the following definition:

<!ELEMENT taglib validator?, listener*, tag+) >
Does it mean that "tag" is mandatory?
Thanks!
 
Mike Wang
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hua Liang:
Consider the following definition:

<!ELEMENT taglib validator?, listener*, tag+) >
Does it mean that "tag" is mandatory?
Thanks!

? : 0-1
* : 0-many
+ : 1-many
 
Hua Liang
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I've got it!
 
hover cheng
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I remember those as:
? : does it exist? (yes or no)
+ : positive number (should be greater than 0)
* : no matter how many
 
riya s
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also if there is no ? * or + then it means it occurs once... and that is mandatory
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic