W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Schema Notations

From: Chelsea Valentine <cvalentine@austin.rr.com>
Date: Wed, 22 Aug 2001 10:04:25 -0500
To: <xmlschema-dev@w3.org>
Message-ID: <B7A93428.C051%cvalentine@austin.rr.com>
I am in the process of trying to define a schema notation that will allow me
to reference an external gif image. I have defined the notation and derived
notation datatype as follows:

<xsd:notation name="gif" public="image/gif" system="viewer.exe" />

<xsd:simpleType name="imgType>
  <xsd:restriction base="xs:NOTATION">
     <xsd:enumeration value="gif"/>
  </xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="coverType">
  <xsd:attribute name="imgType" type="imgType" use="required"/>
</xsd:complexType>

<xsd:element name="cover" type="coverType" minOccurs="0"/>
   
When used in the XML document:

<cover imgType="gif"/>

My question is, where is the best place to define the location of the gif
image? And, how do you explicitly define the relationship between the gif
notation and the gif file location?

I am used to using an XML DTD external unparsed entity to reference the img
file and point to the associated notation. Is there an equivalent mechanism
for defining this relationship in XML Schema? I am aware that XML Schema
does not support entities, however, is there another way to skin the cat so
to say?

Any help would be greatly appreciated,

Chelsea Valentine
Received on Wednesday, 22 August 2001 11:04:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:23 GMT