<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.8.1">
</HEAD>
<BODY>
HI George,<BR>
<BR>
Thanx for the info. I'll check deeply the specifications.<BR>
<BR>
<BR>
On Thu, 2005-12-01 at 15:05 +0200, George Cristian Bina wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Dear Helder,</FONT>

<FONT COLOR="#000000">I think this is an error in the spec. If you read a few lines above that </FONT>
<FONT COLOR="#000000">you will see that if no namespace attribute is specified then the </FONT>
<FONT COLOR="#000000">imported schema is for no namespace components:</FONT>
<FONT COLOR="#000000">***</FONT>
<FONT COLOR="#000000">If that attribute is absent, then the import allows unqualified </FONT>
<FONT COLOR="#000000">reference to components with no target namespace.</FONT>
<FONT COLOR="#000000">***</FONT>
<FONT COLOR="#000000">So clearly there should not be a targetNamespace attribute present in </FONT>
<FONT COLOR="#000000">that schema, because having such an attribute will place the components </FONT>
<FONT COLOR="#000000">defined in that schema in that namespace.</FONT>

<FONT COLOR="#000000">Oxygen uses Xerces-J 2.7.1 for XML Schema validation. If you test also </FONT>
<FONT COLOR="#000000">with other schema processors you will see that they report this error, I </FONT>
<FONT COLOR="#000000">tried Schema Quality Checker, MSXML.NET and MSXML 4.0, Saxon SA and XSV </FONT>
<FONT COLOR="#000000">and they all complain about this.</FONT>

<FONT COLOR="#000000">Best Regards,</FONT>
<FONT COLOR="#000000">George</FONT>
<FONT COLOR="#000000">---------------------------------------------------------------------</FONT>
<FONT COLOR="#000000">George Cristian Bina</FONT>
<FONT COLOR="#000000">&lt;oXygen/&gt; XML Editor, Schema Editor and XSLT Editor/Debugger</FONT>
<FONT COLOR="#000000"><A HREF="http://www.oxygenxml.com">http://www.oxygenxml.com</A></FONT>


<FONT COLOR="#000000">Helder Rossa wrote:</FONT>
<FONT COLOR="#000000">&gt; Hi,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I Will investigate the second error like you say. but in XML Spy no </FONT>
<FONT COLOR="#000000">&gt; error is reported.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; The first one I think is an error because the targetNamespace in the </FONT>
<FONT COLOR="#000000">&gt; imported file, and like the error says, has a targetNamespace </FONT>
<FONT COLOR="#000000">&gt; 'uri:namespace' so no 'namespace' attribute needs to be included in the </FONT>
<FONT COLOR="#000000">&gt; import directive.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Here is the RIGHT specification in the W3C:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;     1 The appropriate *case* among the following must be true: </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;     1.1 *If *the namespace [attribute]</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">http://www.w3.org/TR/xml-infoset/#infoitem.element</A>&gt; is present,</FONT>
<FONT COLOR="#000000">&gt;     *then *its &#183; &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">http://www.w3.org/TR/xmlschema-1/#key-vv</A>&gt;actual value</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">http://www.w3.org/TR/xmlschema-1/#key-vv</A>&gt;&#183;</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">http://www.w3.org/TR/xmlschema-1/#key-vv</A>&gt; must not match the &#183;</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">http://www.w3.org/TR/xmlschema-1/#key-vv</A>&gt;actual value</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">http://www.w3.org/TR/xmlschema-1/#key-vv</A>&gt;&#183;</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">http://www.w3.org/TR/xmlschema-1/#key-vv</A>&gt; of the enclosing &lt;schema&gt;</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#element-schema">http://www.w3.org/TR/xmlschema-1/#element-schema</A>&gt;'s targetNamespace</FONT>
<FONT COLOR="#000000">&gt;     [attribute] &lt;<A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">http://www.w3.org/TR/xml-infoset/#infoitem.element</A>&gt;. </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;     1.2 *If *the namespace [attribute]</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">http://www.w3.org/TR/xml-infoset/#infoitem.element</A>&gt; is not present,</FONT>
<FONT COLOR="#000000">&gt;     *then *the enclosing &lt;schema&gt;</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xmlschema-1/#element-schema">http://www.w3.org/TR/xmlschema-1/#element-schema</A>&gt; must have a</FONT>
<FONT COLOR="#000000">&gt;     targetNamespace [attribute]</FONT>
<FONT COLOR="#000000">&gt;     &lt;<A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">http://www.w3.org/TR/xml-infoset/#infoitem.element</A>&gt; </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; So, the namespace is NOT present in the &lt;import&gt; and I HAVE a </FONT>
<FONT COLOR="#000000">&gt; targetNamespace in the &lt;import&gt;ed schema.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; On Wed, 2005-11-30 at 23:11 +0200, George Cristian Bina wrote:</FONT>
<FONT COLOR="#000000">&gt;&gt; Dear Helder Rossa,</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; One of the nice features that you can find in oXygen is that it reports </FONT>
<FONT COLOR="#000000">&gt;&gt; XML Schema errors in most cases not only with a descriptive message but </FONT>
<FONT COLOR="#000000">&gt;&gt; also with a pointer to the XML Schema specification, pointing to the </FONT>
<FONT COLOR="#000000">&gt;&gt; exact location related with that error.</FONT>
<FONT COLOR="#000000">&gt;&gt; In your case it poins you to</FONT>
<FONT COLOR="#000000">&gt;&gt; <A HREF="http://www.w3.org/TR/xmlschema-1/#src-import">http://www.w3.org/TR/xmlschema-1/#src-import</A></FONT>
<FONT COLOR="#000000">&gt;&gt; The error code is src-import.3.2 which related with the pint 3.2 from </FONT>
<FONT COLOR="#000000">&gt;&gt; the above URL:</FONT>
<FONT COLOR="#000000">&gt;&gt; ***</FONT>
<FONT COLOR="#000000">&gt;&gt; 3 The appropriate case among the following must be true:</FONT>
<FONT COLOR="#000000">&gt;&gt; 3.1 If there is a namespace [attribute], then its &#183;actual value&#183; must be </FONT>
<FONT COLOR="#000000">&gt;&gt; identical to the &#183;actual value&#183; of the targetNamespace [attribute] of SII.</FONT>
<FONT COLOR="#000000">&gt;&gt; 3.2 If there is no namespace [attribute], then SII must have no </FONT>
<FONT COLOR="#000000">&gt;&gt; targetNamespace [attribute]</FONT>
<FONT COLOR="#000000">&gt;&gt; ***</FONT>
<FONT COLOR="#000000">&gt;&gt; So as you can see, if no namespace attribute is specified then the </FONT>
<FONT COLOR="#000000">&gt;&gt; imported schema must have no targetNamespace and this is not true in </FONT>
<FONT COLOR="#000000">&gt;&gt; your case.</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Your email does not describes the exact details of the second error but </FONT>
<FONT COLOR="#000000">&gt;&gt; I think that you want to say that oXygen does not allow the use </FONT>
<FONT COLOR="#000000">&gt;&gt; attribute in a global attribute declaration but allows this in an </FONT>
<FONT COLOR="#000000">&gt;&gt; attribute inside a complex type for instance. The oXygen behavior is </FONT>
<FONT COLOR="#000000">&gt;&gt; correct and the explanation is that in one case we have an attribute </FONT>
<FONT COLOR="#000000">&gt;&gt; declaration that can be used differently from different places and in </FONT>
<FONT COLOR="#000000">&gt;&gt; the other case an attribute use. The error code s4s-att-not-allowed </FONT>
<FONT COLOR="#000000">&gt;&gt; means that this is not allowed by the schema for schemas (s4s). And if </FONT>
<FONT COLOR="#000000">&gt;&gt; you look into the schema for schemas you can see that the attribute </FONT>
<FONT COLOR="#000000">&gt;&gt; element is of type topLevelAttribute that restricts the attribute type </FONT>
<FONT COLOR="#000000">&gt;&gt; making the use of the &quot;use&quot; attribute prohibited.</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;      &lt;xs:element id=&quot;attribute&quot; name=&quot;attribute&quot; </FONT>
<FONT COLOR="#000000">&gt;&gt; type=&quot;xs:topLevelAttribute&quot;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;      &lt;/xs:element&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;      &lt;xs:complexType name=&quot;topLevelAttribute&quot;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;          &lt;xs:complexContent&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;              &lt;xs:restriction base=&quot;xs:attribute&quot;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;xs:sequence&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                      &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;xs:annotation&quot;/&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                      &lt;xs:element minOccurs=&quot;0&quot; name=&quot;simpleType&quot; </FONT>
<FONT COLOR="#000000">&gt;&gt; type=&quot;xs:localSimpleType&quot;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                      &lt;/xs:element&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;/xs:sequence&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;xs:attribute name=&quot;ref&quot; use=&quot;prohibited&quot;/&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;xs:attribute name=&quot;form&quot; use=&quot;prohibited&quot;/&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;xs:attribute name=&quot;use&quot; use=&quot;prohibited&quot;/&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;xs:attribute name=&quot;name&quot; type=&quot;xs:NCName&quot; use=&quot;required&quot;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;/xs:attribute&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;                  &lt;xs:anyAttribute namespace=&quot;##other&quot; </FONT>
<FONT COLOR="#000000">&gt;&gt; processContents=&quot;lax&quot;/&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;              &lt;/xs:restriction&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;          &lt;/xs:complexContent&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;      &lt;/xs:complexType&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Hope things are clear now.</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Best Regards,</FONT>
<FONT COLOR="#000000">&gt;&gt; George</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Helder Rossa wrote:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Hi,</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; I&#8217;ve got several errors validating a correct xsd file in oXygen Eclipse </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Plug-In.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; *Importing a XSD File*</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Error:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; src-import.3.2: An &lt;import&gt; element information item that had no </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; namespace attribute was found, so the imported document cannot have a </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; targetNamespace attribute. However, the targetNamespace 'uri:namespace' </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; was found in the imported document.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; @see: <A HREF="http://www.w3.org/TR/xmlschema-1/#src-import">http://www.w3.org/TR/xmlschema-1/#src-import</A></FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Occurs when:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; &lt;xs:import schemaLocation=&quot;anotherfile.xsd&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Only works when:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; &lt;xs:import namespace=&#8221;uri:namespace&#8221; schemaLocation=&quot;anotherfile.xsd&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; This is incorrect!!</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; *Use Attribute in a Element*</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Error:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; s4s-att-not-allowed: Attribute 'use' cannot appear in element 'attribute'.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Occurs when:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; &lt;xs:attribute name=&quot;type&quot; type=&quot;xs:string&quot; use=&quot;required&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Only Works when:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; &lt;xs:attribute name=&quot;type&quot; type=&quot;xs:string&quot; use=&quot;required&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; This is incorrect because use attribute is OK.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; What I have to configure for oXygen work corrrectly?!</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Thanx</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;  </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; ------------------------------------------------------------------------</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; _______________________________________________</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; oXygen-user mailing list</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; <A HREF="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</A> &lt;mailto:<A HREF="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</A>&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; <A HREF="http://www.oxygenxml.com/mailman/listinfo/oxygen-user">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>