• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Handling duplicate Element tags in DTD

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a XML which has tags with same name as in the following example
<root>
<r1>
<duplicate>xyz</duplicate>
</r1>
<duplicate/>
</root>
The DTD for whic would be
<!ELEMENT root(r1, duplicate)>
<!ELEMENT r1(duplicate)>
<!ELEMENT duplicate>
<!ELEMENT duplicate EMPTY>
But this DTD does not seem to be valid as <duplicate> is found to be repeated.
How do I write a DTD in this case?

thanks
Sreeni
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!