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

Re: Schema Notations

From: Bob Schloss <rschloss@us.ibm.com>
Date: Wed, 22 Aug 2001 14:47:22 -0400
To: Chelsea Valentine <cvalentine@austin.rr.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <OF8387D82B.0023041B-ON85256AB0.0066C6AC@pok.ibm.com>


     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.


Bob Schloss
IBM Thomas J. Watson Research Center - Next Gen Web group
Yorktown Heights, New York, USA

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

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

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

I am in the process of trying to define a schema notation that will allow
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:complexType name="coverType">
  <xsd:attribute name="imgType" type="imgType" use="required"/>

<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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC