[Haskell] Dtd2Haskell question
Peter Simons
simons at cryp.to
Sun Oct 31 08:02:50 EST 2004
I'd like to add one more question / feature request into the
mix. I have a DTD which defines two elements with (almost)
identical attributes:
<!ENTITY % priorities
"( veryhigh | high | medium | low | verylow )" >
<!ELEMENT link EMPTY>
<!ATTLIST link
priority %priorities; #REQUIRED
...
>
<!ELEMENT note (#PCDATA | comment)* >
<!ATTLIST note
priority %priorities; #REQUIRED
...
>
Dtd2Haskell generates these data types:
data Link = Link
{ linkPriority :: Link_priority
, ....
}
data Link_priority
= Link_priority_veryhigh
| Link_priority_high
| ...
data Note_Attrs = Note_Attrs
{ notePriority :: Note_priority
, ...
}
data Note_priority
= Note_priority_veryhigh
| Note_priority_high
| ...
It's no big deal, but IMHO it should be possible that
Dtd2Haskell recognizes that the entity refers to the _same_
attribute type.
Peter
More information about the Haskell
mailing list