Need help to validate my DTD ...?

webmasterbeta

New Member
Hello,

I've ever worked with XML stream, but this is the first time I'am interesting in creation of DTD. I need to bring some locks in the creation of the XML document.

I read lots of information about DTD on the web, but I think ask to the www community is the best thing to do to be 100% sure that the syntaxe of my DTD is OK.
Here it is:

<!DOCTYPE prefetch_filter [
<!ELEMENT prefetch_filter (rule+)>
<!ELEMENT rule (name,condition+)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT condition (mask,value)>
<!ELEMENT mask EMPTY>
<!ATTLIST mask text1 CDATA #REQUIRED
digit2 CDATA #REQUIRED
digit3 CDATA #FIXED"0">
digit4 CDATA #FIXED"0">
digit5 CDATA #FIXED"0">
digit6 CDATA #FIXED"0">
<!ELEMENT value (#PCDATA)>
<!ATTLIST value operator (=|!=|<|>|<=|>=|eq|ne|lt|gt|le|ge|=~) #REQUIRED>
]>

I have also a 2nd question:
I would like to force the attribute digit2 -> digit6 to be only digits. The keyword CDATA precises that it can be whatever the character string. Is there another keyword to precise that only digits can be use for these attributes?

Thanks in advance for your help
 
Back
Top