Re: Schema Notations

Chelsea,

     I don't know if there is a standard way to do this, and I do know that
XML processors in general do not support reference resolution to anything
except external entities.

     The World Wide Web Consortium put out a recommendation called XLink
1.0 on June 27th.  Although they obviously had in mind hyperlinking as in
browsers, I think that using Xlink to refer from instance documents to
other resources is the correct way to do this.

     You can read the spec at http://www.w3.org/TR/xlink/.

     Your application code would have to examine the element on which you
specified the link attributes in your instance document, use the values of
the various xlink attributes, and then "fetch" the gif or whatever.

               Regards,
               Bob

Bob Schloss
IBM Thomas J. Watson Research Center - Next Gen Web group
Yorktown Heights, New York, USA
http://www.research.ibm.com/people/s/bschloss
http://www.research.ibm.com/XML


Chelsea Valentine <cvalentine@austin.rr.com>@w3.org on 08/22/2001 11:04:25
AM

Sent by:  xmlschema-dev-request@w3.org


To:   <xmlschema-dev@w3.org>
cc:
Subject:  Schema Notations



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 14:48:18 UTC