• 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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!