DTD / xmerl_scan:file help !!!!! {invalid_nmtoken,"*) #RE"

Sanjaya Vitharana sanjaya@REDACTED
Wed Jul 13 07:30:56 CEST 2005


Hi....!!!

I get the below error when adding * (astric) to attribute list of my "key" element. As below

<!ATTLIST key
      no (1|2|3|4|5|6|7|8|9|z|r|c|*) #REQUIRED>    ---Note the * (astric in the end)

Error I got is.

1> {ParsResult2,Misc2}=xmerl_scan:file('ivr.xml',[{validation,true
}]).
2798- fatal: {invalid_nmtoken,"*) #RE"}
** exited: {fatal,{{invalid_nmtoken,"*) #RE"},
                   {file,"./ivr.dtd"},
                   {line,21},
                   {col,47}}} **

Seems to be * (astric) is invalid in DTD (or may be xmerl_scan validation problem).

But i want to use * (astric) in my XML file as below. So there must be a way to define it in DTD ..... can any DTD expert help me in this case.

--------------- XML File I use -------------------------
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE IVR SYSTEM "ivr.dtd">
<IVR>
.........
<key no="*">http://localhost/greeting_lite/select_song_greeting.php</key>  ------------------- Note the attribute *
.........

</IVR>

-------- This DTD is working without any problem ----------
<?xml version="1.0" encoding="utf-8" ?>
<!ELEMENT IVR (........, key*, ..........)>    
<!ELEMENT key (#PCDATA)>
<!ATTLIST key
      no (1|2|3|4|5|6|7|8|9|z|r|c) #REQUIRED>
------------------------------------------------------------------------------------

NOTE: ......... (doted line) means there are some other fields

Waiting quick reply.

Regards.

Sanjaya Vitharana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050713/04c01156/attachment.htm>


More information about the erlang-questions mailing list