1

I want to create a DTD file but I unfortunately I am getting an error, please advice. Here is my code

<!ELEMENT SUB_CONDITION EMPTY >
<!ATTLIST SUB_CONDITION relation (=|<>|>|<|>=|<=|=Mask|<>Mask) #REQUIRED>

the error is saying: "The name token is required in the enumerated type list for the "relation" attribute declaration."

1 Answer 1

1

The <, =, and > characters (#x003C, #x003D, #x003E) are not allowed in attribute values declared as enumerated.

In an attribute declared to have enumerated values, the values must match Nmtoken (one or more NameChars). That excludes several characters, including <, =, and >, which are not part of the definition of NameChar.

< is especially troublesome (it is the start-of-tag delimiter in XML markup) and is not allowed in any attributes.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you mzjn for your response, so what do you suggest I do in this case, I need to place these characters in the enumerated values.
If you must have enumerated values, you could rename them using allowed characters. Something like this perhaps: (eq|neq|gt|lt|gtoreq|ltoreq|eqMask|neqMask).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.