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

Sanjaya Vitharana sanjaya@REDACTED
Wed Jul 13 11:42:07 CEST 2005


got your point.

changing it to
<!ATTLIST key
       no (1|2|3|4|5|6|7|8|9|z|r|c|astric) #REQUIRED>
will sort the problem.

Since the mobile phone has the * (astric) key, it is interesting to know how
to express the constraint as we like.

Such as,
<!ATTLIST key
       no (1|2|3|4|5|6|7|8|9|z|r|c|*) #REQUIRED>

Could you please guide me to some reference materials or some better
examples to pick this quickly.
----------------------------------------------------------------------------
-----------------------
Further more,

is it not possile to define a datatype like below ???

<!ATTLIST fax
      no MyType #IMPLIED>

MyType::= #x9 | #xA | #xD

or some other way ..... ( this is NOT Working too )

Or using <!ENTITY like ...

<!ENTITY aa "&#xD;&#xA;">
<!ENTITY ss     "*">

Hope it will possible.

As I never did it before, I don't know how this can be done.

Can anybody help me ....!!!!
----------------------------------------------------------------------------
-----------------------

Regards,

Sanjaya Vitharana

----- Original Message -----
From: "Helmut Enck-Radana" <her@REDACTED>
To: "Sanjaya Vitharana" <sanjaya@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Wednesday, July 13, 2005 2:25 PM
Subject: Re: DTD / xmerl_scan:file help !!!!! {invalid_nmtoken,"*) #RE"


> Hi,
>
> in XML DTDs enumerated values have to be NMTOKENs, i.e. you can only use
> strings which could be used as names. You have to use a different schema
> language, if you need to to express the constraint you described. May be a
> better solution is not to use the asterisc, but a symbol which conforms to
> the NMTOKEN production instead.
>
> -- Helmut
>
> At 08:46 2005-07-13, you wrote:
> >Reverting to my below question,
> >
> ><!ATTLIST key
> >       no CDATA #REQUIRED>
> >
> >is working well, but it allows all the rage of CDATA to appear with the
> >attribute "no".
> >
> >But I want something like below to strict the valid keys to some
specific.
> >
> ><!ATTLIST key
> >       no (1|2|3|4|5|6|7|8|9|z|r|c|*) #REQUIRED>    ---Note the * (astric
> > in the end) --- and of course NOT WORKING.
> >
> >Hope you can understand.
> >
> >Are there any way to do this ...????
> >
> >Regards,
> >
> >Sanjaya Vitharana
>
>





More information about the erlang-questions mailing list