Traduzione ATTLIST, lista di attributi di un elemento XML
#
# DTD
#
<!ELEMENT city (nome, stato)>
<!ATTLIST city
zipCode ID #REQUIRED
phonePrefix CDATA #IMPLIED
nome CDATA #IMPLIED
>
<!ELEMENT nome (#PCDATA)>
<!ELEMENT stato (#PCDATA)>
#
# Corrispondente ODL_i3
#
interface city ( extent city key attlist_zipCode ) {
attribute string attlist_nome*;
attribute string attlist_zipCode*;
attribute string attlist_phonePrefix;
attribute string nome;
attribute string stato;
};
#
# Corrispondente OLCD (risultera' simile a)
# manca la gestione degli attributi opzionali in OLCD
#
prim city = ^ [
attlist_nome : string ,
attlist_zipCode : string ,
attlist_phonePrefix : string ,
nome : string ,
stato : string ] .