Brian,
 
http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#declare-element states that  {any attributes with non-schema namespace . . .}>  are allowed. 
In the SForS processContent is specified to be lax. That means, if bXXlance is not found to be defined somewhere, it is not validated.
Thats exactly what happened.
 
Harald
-----Original Message-----
From: Brian Ales [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 2. April 2003 20:34
To: [EMAIL PROTECTED]
Subject: validation across multiple namespaces

Hi
I need some help in a hurry - I'm trying to validate a schema (just as an XML document) that imports a namespace, and I'm only having partial success.  My problem is not with the S4S namespace, it's with the namespace defined in the import element for the 'xbrli' prefix (see below). Put simply, if you look at my schema snippet (see below), when I mispell 'debit', the parser goes and gets the correct schema and correctly sees it's not in the ennumeration for that attribute.  Great.  However, I can mispell 'balance' and Xerces doesn't complain at all - shouldn't it have a problem with an attribute name ('bXXlance') that isn't defined in the schema for the namespace defined by the xbrli: prefix?
 
Here's the relevant code for my parser (it happens to be under a JDOM SaxBuilder, but JDOM lets me get at the features/properties):
               SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true); 
               builder.setFeature("http://apache.org/xml/features/validation/schema", true);
 
                                 //I'm using a scemaLocation Property to override the document hints.
               schemaLocs[0] = ".\\XMLSchema.xsd";         //I have a local copy
               schemaLocs[1] = "http://www.xbrl.org/2001/xbrl-instance.xsd";
               builder.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", schemaLocs);  //only jaxp seems to work
 
Here's a portion of the schema I'm trying to validate (see the last attribute in the 'element' element - that's what I'm breaking to test validation):
 
<?xml version="1.0" encoding="utf-8"?>
<!-- Taxonomy based on XBRL standard v.2.  Created by UBmatrix Taxonomy Builder 5.0.76.  Contact www.ubmatrix.com -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xbrli="http://www.xbrl.org/2001/instance"
    targetNamespace="http://www.xbrl.org/taxonomy/int/fr/ias/ci/pfs/2002-11-15" elementFormDefault="qualified">
<annotation>
   
<appinfo>
      <link:linkbaseRef xlink:type="simple" xlink:href="" xlink:actuate="onRequest"
            xlink:role="http://www.xbrl.org/linkprops/linkRef/reference"
            xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />
    </appinfo>
  </annotation>
  <import namespace="http://www.xbrl.org/2001/instance" schemaLocation="http://www.xbrl.org/2001/xbrl-instance.xsd" />
  <element id="iascf-pfs_WorkProgress" name="WorkProgress" type="xbrli:monetaryItemType" substitutionGroup="xbrli:item"
    xbrli:balance="debit" />
 
 
Any help would be greatly appreciated!
Thanks in advance,
Brian

Reply via email to