|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi, have a little problem with attribute enumeration in DTD im hoping someone can help me with.
<!ELEMENT movie_classification EMPTY> <!ATTLIST movie_classification rating (General Exhibition|Parental Guidance|Mature|Mature Adult|Restricted) #REQUIRED> simply will not validate. is there a restriction on how long attlist enumeration list can be? or a particular word that shouldn't be in there? i tried declaring it as entity: <!ENTITY G "General Exhibition"> <!ENTITY PG "Parental Guide"> <!ENTITY M "Mature"> <!ENTITY MA "Mature Adult"> <!ENTITY R "Restricted"> then use: <!ATTLIST movie_classification rating (&G;|&PG;|&M;|&MA;|&R;) #REQUIRED> that doesnt work either. not sure what to do. help please. |
|
#2
|
|||
|
|||
|
Spaces are not allowed in the attribute enumeration list. There is probably a way to do this, but you could just try something like what I have included below:
http://www.w3schools.com/dtd/dtd_attributes.asp |
|
#3
|
|||
|
|||
|
thanks. that explains it.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > DTD attribute enumeration |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|