Validating values of text strings with DTD
Can I have a dtd file check that the values of numbers are between specified values?
Maybe, make sure that
<开发者_StackOverflow社区x>5</x>
has a value between 1 and 10?
No, this is one of the many restrictions of DTDs that caused people to design more powerful schema languages like XSD.
No, it doesn't allow you to specify or inspect the contents of a #PCDATA
element. It's atomic for DTD's purposes.
精彩评论