469,903 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Can you ensure an element is not empty in the DTD?

<!DOCTYPE transactions [
<!ELEMENT transactions (transaction)*>
<!ELEMENT transaction (date, merchant, cardtype, amount)>
<!ELEMENT merchant (#PCDATA)>
<!ELEMENT cardtype (#PCDATA)>
<!ELEMENT amount (#PCDATA)>
Suppose I have something like above. Is there a way to ensure that
when the xml is validated, that every tag has some text in it through
the DTD? Or does that need to be done at the application level?

Thanks for your help.


Oct 23 '07 #1
1 3066
Not in DTDs. Schemas can enforce a minimum data length.

Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 23 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Derek Basch | last post: by
1 post views Thread by John | last post: by
1 post views Thread by Mark Spencer | last post: by
7 posts views Thread by kumar.senthil | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.