DTD's and namespaces

Robert.WAKELING@DG15.cec.be
Fri, 11 Sep 1998 09:59:40 +0200


I am looking for ways to make it easy for people to find and understand=
public
tender notices (or solicitation synopses). SGML DTD's are routinely use=
d to
format at least 150,000 of these per year. Since they can be in any of =
eleven
languages we also have a coded multilingual vocabulary of over 9000 pro=
duct and
service definitions, as well as city names and subject headings. I thou=
ght that
XML might provide a neat way to standardise these notices across many s=
ites and
allow selective searching, retrieval and display of these notices in an=
y
language. But I can't find enough guidance on designing DTD's or using
namespaces to see clearly how to do this, or if it can be done.

I have two specific problems: when to use elements or attributes, and h=
ow to
make reference to external documents or language vocabularies. The name=
space
debate has further confused me here. My first humble attempt looks like=
this:

<?xml version=3D"1.0" encoding=3D"UTF-8" ?>
<!DOCTYPE TenderNotice [
<!ELEMENT TenderNotice (ContractingAuthority, (ContractInformation,
ContactDetails, Reference)*) >

<!ATTLIST TenderNotice
PublicationDate CDATA #REQUIRED=20
Xml:lang NMTOKEN #IMPLIED >

<!-- I don't understand what should be treated as elements and what as
attributes so elements are used below. -->

<!ELEMENT ContractingAuthority (OrganisationName, Address)>
<!ELEMENT OrganisationName (#PCDATA) >
<!ELEMENT Address (Addressline+, Postcode?, Country?) >
<!ELEMENT Addressline (#PCDATA) >
<!ELEMENT Postcode (#PCDATA) >
<!ELEMENT Country (#PCDATA) >

<!-- Should be an ISO3166 Code -->

<!ELEMENT ContractInformation (ObjectOfContract, EstimatedValue?, Deadl=
ineDate?)
>

<!ELEMENT EstimatedValue (#PCDATA) >

<!-- will need currency attributes -->

<!ELEMENT DeadlineDate (date) >
<!ATTLIST DeadlineDate=20
DeadlineForReceiptof (Tenders | RequestToParticipate) #REQUI=
RED
<!ELEMENT date (#PCDATA) >

<! --in accordance with ISO 2014-1976 (YYYYMMDD) for example. There are=
other
dates that may be equally or more relevant -->

<!ELEMENT ObjectOfContract (WorkDescription, CPVCode*) >
<!ELEMENT WorkDescription (#PCDATA) >
<!ELEMENT CPVCode (#PCDATA) >

<! -- this is the code for Work descriptions with eleven corresponding =
language
versions so it could automatically generate the WorkDescription in a ch=
osen
language -->

<!ELEMENT ContactDetails (CommonName, Address, (TelephoneNumber,
FacsimileNumber, EmailAddress,)? Other*) >
<!ELEMENT CommonName (Honorific?, (Initials|GivenName)?, SurName) >
<!ELEMENT Honorific (#PCDATA) >
<!ELEMENT Initials (#PCDATA) >
<!ELEMENT GivenName (#PCDATA) >
<!ELEMENT SurName (#PCDATA) >
<!ELEMENT TelephoneNumber (#PCDATA) >
<!ELEMENT FacsimileNumber (#PCDATA) >
<!ELEMENT EmailAddress (#PCDATA) >
<!ELEMENT Other (#PCDATA) >

<!ELEMENT Reference (#PCDATA)>

<! -- this is where I want to provide for references to full tender doc=
uments,
standard conditions and so on either through URL's, URIs, external enti=
ty
references or some other mechanism perhaps with Processing instructions=
. -->

]>

I don't know whether this is the right place to ask for answers- but ca=
n anyone
help or suggest where else could I look?
=