W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2005

extending validation

From: <tgrzej10@gazeta.pl>
Date: Fri, 18 Mar 2005 15:58:31 +0100 (CET)
Message-ID: <1111157911353.ew2.tgrzej10@gazeta.pl>
To: xmlschema-dev@w3.org

Hi,
My question is about technology that would allow to validate
element's value against (let's say) database content. For example
I'd like to make a validation rule like this:

<xsd:simpleType name="USState">
  <xsd:restriction base="xsd:string">
    <xsd:enumeration value="AK"/>
    <xsd:enumeration value="AL"/>
    <xsd:enumeration value="AR"/>
    <!-- and so on ... -->
  </xsd:restriction>
</xsd:simpleType>

but with enumeration values taken from external resource (like
database).
One way to achive this seems to be to dynamically generate required
schema based on database content. On the other hand maybe there are
existing schema validators that allow to call custom functions (that
would perform neccessary checks) while validating a document. Or
maybe in XML Schmema itself there is some construct that would allow
to tell "call external procedure foo to validate this element".


I'd be gratefull for any hints and comments,
-- 
Tomek Grzejszczyk
Received on Friday, 18 March 2005 17:46:33 GMT

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