[tdwg-tapir] xsd:any element processing

Dave Vieglais vieglais at ku.edu
Fri Nov 9 18:54:04 CET 2007

In http://rs.tdwg.org/tapir/1.0/schema/tapir.xsd, the definition of the
<custom> element is such that any elements may be included, however the
<xsd:any> element definition does not include a "processContents" attribute,
in which case a validator will use the default of "strict" which requires
that a definition of the contents are available and valid (i.e. an
appropriate schema is available to validate the element content).  The
relevant XML schema reference is:

I'm curious if that was the intent of the TAPIR design?  If not, then
including an attribute in <xsd:any> of processContents="lax" (validate if
possible but ignore problems) or processContents="skip" (don't validate)
would enable quick evaluation of TAPIR response documents using xml schema
validation tools without requiring that providers explicitly include a
schema defining the content of the <custom> element (which seems overly
restrictive).  An appropriate change could be:

  <xsd:element name="custom">
      <xsd:documentation>Extension slot for additional information not
defined in the schema.</xsd:documentation>
        <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax" >
            <xsd:documentation>For any custom extension. E.g what security
            capabilities does the provider have? Encryption, access

I do not believe this will change any functionality of TAPIR providers, but
it will enable validation of responses such as:

<?xml version="1.0" encoding="utf-8" ?>
<response xmlns="http://rs.tdwg.org/tapir/1.0"
    <source accesspoint="
      <software name="TapirDotNET" version="0.1 (revision )"/>

which does not validate according to the current TAPIR schema.

Other places in the schema that may be a problem (because processContents is
not explicitly stated) are:


  Dave V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20071109/8f11d998/attachment.html 

More information about the tdwg-tag mailing list