untitled

(ff) #1

384 17 Answers to Selected Exercises


<simpleType name="DNASequence">
<list itemType="DNABase"/>
</simpleType>

For example, the TATA sequence would be written asTATA. The items
in an XML list are separated by spaces. A better answer would be

<simpleType name="DNASequence" base="xsd:string">
<restriction>
<pattern value="[ACGT]+"/>
</restriction>
</simpleType>

Using this definition, the TATA sequence would be written without spaces
ANSWER TO asTATA, just as one would expect.
EXERCISE4.1
In the following answer, it was presumed that the concepts ofatomArray
andbondArraywere artifacts of the design of the XML DTD and schema
and were not fundamental to the meaning of a molecule. Other assumptions
would lead to many other designs.

<Class rdf:ID="Molecule"/>
<Class rdf:ID="Atom"/>
<Class rdf:ID="Bond"/>
<Property rdf:ID="atom">
<domain rdf:resource="#Molecule"/>
<range rdf:resource="#Atom"/>
</Property>
<Property rdf:ID="bond">
<domain rdf:resource="#Molecule"/>
<range rdf:resource="#Bond"/>
</Property>
<Property rdf:ID="title"/>
<Property rdf:ID="convention"/>
<Property rdf:ID="dictRef"/>
<Property rdf:ID="count">
<range rdf:resource=
"http://www.w3.org/2000/10/XMLSchema#positiveInteger"/>
</Property>
<Property rdf:ID="elementType">
Free download pdf