Bob (Object) Morris might have an alternative solution but my relational database dislikes mixed ( though valid ) content like
<!ELEMENT qualifier (#PCDATA ) > <!ELEMENT value ( #PCDATA | qualifier )* >
as in Bryan's preferred example.
<ELEMENT> <NAME> leaf </NAME> <VALUE> lobed margins </VALUE> <VALUE> with spines <QUALIFIER> rarely </QUALIFER> </VALUE> </ELEMENT>
My database wants that everything should have a name, otherwise it texts over and talks in blobs.
Mixed content might also impact some of the validation and context issues discussed earlier.
From http://www.w3.org/TR/1998/REC-xml-19980210 , Extensible Markup Language (XML) 1.0. "An element type has mixed content when elements of that type may contain character data, optionally interspersed with child elements. In this case, the types of the child elements may be constrained, but not their order or their number of occurrences:"
So, to avoid unnecessary rewriting and to promote maximum utility I would prefer:
<!ELEMENT value #PCDATA ) > <!ATTLIST value qualifier CDATA #IMPLIED> ...
</ELEMENT> <NAME> leaf </NAME> <VALUE> lobed margins </VALUE> <VALUE qualifier="rarely"> with spines </VALUE> </ELEMENT>
or
<ELEMENT> <NAME> leaf </NAME> <STATE> <VALUE> lobed margins </VALUE> </STATE> <STATE> <VALUE> with spines </VALUE> <QUALIFIER> rarely </QUALIFER> </STATE> </ELEMENT>
greg
Australian ..................I................GPO Box 1777 Canberra 2601 National GREG WHITBREAD voice: +61 2 62509 482 Botanic Integrated Botanic Information System fax: +61 2 62509 599 Gardens......................S...........I.T. happens....ghw@anbg.gov.au
participants (1)
-
Greg Whitbread