untitled

(ff) #1
381

</component>
<component name="ionic_current">
<variable name="I_ion" interface="out"
physical_unit="microA_per_mm2"/>
<variable name="v" interface="in"/>
<variable name="Vth" interface="in"
physical_unit="millivolt"/>
</component>

The DTD is the following:

<!ELEMENT component (variable)*>
<!ATTLIST component name ID #REQUIRED>
<!ELEMENT variable EMPTY>
<!ATTLIST variable
name CDATA #REQUIRED
initial CDATA #IMPLIED
physical_unit IDREF "dimensionless"
interface (in|out) #IMPLIED>

IDREFmeans that the attribute refers to another one elsewhere in the docu-
ANSWER TO ment. In this case it is referring to a physical unit definition in exercise 1.3.
EXERCISE2.1
The XML schema can be obtained by translating the molecule DTD in fig-
ure 1.6 usingdtd2xsd.pl(W3C 2001a). The answer is the following:


<schema
xmlns=’http://www.w3.org/2000/10/XMLSchema’
targetNamespace=’http://www.w3.org/namespace/’
xmlns:t=’http://www.w3.org/namespace/’>

<element name=’molecule’>
<complexType>
<sequence>
<element ref=’t:atomArray’/>
<element ref=’t:bondArray’/>
</sequence>
<attribute name=’title’ type=’string’ use=’optional’/>
<attribute name=’id’ type=’string’ use=’optional’/>
<attribute name=’convention’ type=’string’ use=’default’ value=’CML’/>
<attribute name=’dictRef’ type=’string’ use=’optional’/>
<attribute name=’count’ type=’string’ use=’default’ value=’1’/>
</complexType>
</element>
Free download pdf