How can you restrict the valid values โ€‹โ€‹of an XML tag property in a DTD?

I have a DTD and I would like to constrain the possible values โ€‹โ€‹of an attribute's properties, such as "yes" or "no".

<!ATTLIST node postgrad CDATA "">

      

How to do it?

0


a source to share


1 answer


By specifying that the postgrad attribute can be yes or no:

<!ATTLIST node postgrad (yes | no)> 

      



This will do it =)

0


a source







All Articles