[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Anyway to constrain what a link points to?

From: Chelliah Thirunavukkarasu <chelliah@peregrine.com>
Date: Mon, 26 Nov 2001 21:37:33 -0500 (EST)
Message-ID: <BF0463613134D51183B80002A56B1560011A3875@belcaexcc1.peregrine.com>
To: "'www-xml-linking-comments@w3.org'" <www-xml-linking-comments@w3.org>
where a link points
Hi,

XLink lets me include references to other resources. However, as far as I
could tell, it does not let me constrain the content of the resource. 

e.g.

Let's say that I have the following schema

<?xml version="1.0" ?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xlink="http://www.w3.org/1999/xlink"
            targetNamespace="http://www.example.com/container"
            xmlns="http://www.example.com/container"
            elementFormDefault="qualified">

<xsd:element name="container">
    <xsd:complexType>
        <xsd:choice>
            <xsd:element name="element1">
                <xsd:attribute name="xlink:type" fixed="simple" />
                <xsd:attribute name="xlink:href" use="required" />
                <xsd:attribute name="namespaceConstraint"
fixed="http://www.example.com/foo" />
            </xsd:element>
            <xsd:element name="element2">
                <xsd:attribute name="xlink:type" fixed="simple" />
                <xsd:attribute name="xlink:href" use="required" />
                <xsd:attribute name="namespaceConstraint"
fixed="http://www.example.com/bar" />
            </xsd:element>
        </xsd:choice>
    </xsd:complexType>
</xsd:element>
</xsd:schema>

In the above schema, I am using the attribute "namespaceConstraint" to
specify that the remote resource referenced by element1 should conform to
the "http://www.example.com/foo.xsd" schema and the remote resource
referenced by element2 should conform to the  http://www.example.com/bar.xsd
schema.

Is there any standard way to specify the above constraint? I did not find
support in the Xlink specification for this. If there is support either in
xlink or some other standard to achieve the above, can someone please point
me to that.


Thanks

--
Chelliah
Received on Thursday, 29 November 2001 09:03:05 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.