<!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,<BR>
<BR>
I Will investigate the second error like you say. but in XML Spy no error is reported.<BR>
<BR>
The first one I think is an error because the targetNamespace in the imported file, and like the error says, has a targetNamespace <FONT COLOR="#000000">'uri:namespace'</FONT> so no 'namespace' attribute needs to be included in the import directive.<BR>
<BR>
Here is the RIGHT specification in the W3C:<BR>
<BLOCKQUOTE>
    1 The appropriate <B>case</B> among the following must be true:
</BLOCKQUOTE>
<BLOCKQUOTE>
    1.1 <B>If </B>the <TT>namespace</TT> <A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">[attribute]</A> is present, <B>then </B>its <A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">&#183;</A><A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">actual value</A><A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">&#183;</A> must not match the <A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">&#183;</A><A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">actual value</A><A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">&#183;</A> of the enclosing <A HREF="http://www.w3.org/TR/xmlschema-1/#element-schema">&lt;schema&gt;</A>'s <TT>targetNamespace</TT> <A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">[attribute]</A>.
</BLOCKQUOTE>
<BLOCKQUOTE>
    1.2 <B>If </B>the <TT>namespace</TT> <A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">[attribute]</A> is not present, <B>then </B>the enclosing <A HREF="http://www.w3.org/TR/xmlschema-1/#element-schema">&lt;schema&gt;</A> must have a <TT>targetNamespace</TT> <A HREF="http://www.w3.org/TR/xml-infoset/#infoitem.element">[attribute]</A>
</BLOCKQUOTE>
<BR>
So, the namespace is NOT present in the &lt;import&gt; and I HAVE a targetNamespace in the &lt;import&gt;ed schema.<BR>
<BR>
<BR>
<BR>
On Wed, 2005-11-30 at 23:11 +0200, George Cristian Bina wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Dear Helder Rossa,</FONT>

<FONT COLOR="#000000">One of the nice features that you can find in oXygen is that it reports </FONT>
<FONT COLOR="#000000">XML Schema errors in most cases not only with a descriptive message but </FONT>
<FONT COLOR="#000000">also with a pointer to the XML Schema specification, pointing to the </FONT>
<FONT COLOR="#000000">exact location related with that error.</FONT>
<FONT COLOR="#000000">In your case it poins you to</FONT>
<FONT COLOR="#000000"><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">The error code is src-import.3.2 which related with the pint 3.2 from </FONT>
<FONT COLOR="#000000">the above URL:</FONT>
<FONT COLOR="#000000">***</FONT>
<FONT COLOR="#000000">3 The appropriate case among the following must be true:</FONT>
<FONT COLOR="#000000">3.1 If there is a namespace [attribute], then its &#183;actual value&#183; must be </FONT>
<FONT COLOR="#000000">identical to the &#183;actual value&#183; of the targetNamespace [attribute] of SII.</FONT>
<FONT COLOR="#000000">3.2 If there is no namespace [attribute], then SII must have no </FONT>
<FONT COLOR="#000000">targetNamespace [attribute]</FONT>
<FONT COLOR="#000000">***</FONT>
<FONT COLOR="#000000">So as you can see, if no namespace attribute is specified then the </FONT>
<FONT COLOR="#000000">imported schema must have no targetNamespace and this is not true in </FONT>
<FONT COLOR="#000000">your case.</FONT>

<FONT COLOR="#000000">Your email does not describes the exact details of the second error but </FONT>
<FONT COLOR="#000000">I think that you want to say that oXygen does not allow the use </FONT>
<FONT COLOR="#000000">attribute in a global attribute declaration but allows this in an </FONT>
<FONT COLOR="#000000">attribute inside a complex type for instance. The oXygen behavior is </FONT>
<FONT COLOR="#000000">correct and the explanation is that in one case we have an attribute </FONT>
<FONT COLOR="#000000">declaration that can be used differently from different places and in </FONT>
<FONT COLOR="#000000">the other case an attribute use. The error code s4s-att-not-allowed </FONT>
<FONT COLOR="#000000">means that this is not allowed by the schema for schemas (s4s). And if </FONT>
<FONT COLOR="#000000">you look into the schema for schemas you can see that the attribute </FONT>
<FONT COLOR="#000000">element is of type topLevelAttribute that restricts the attribute type </FONT>
<FONT COLOR="#000000">making the use of the &quot;use&quot; attribute prohibited.</FONT>

<FONT COLOR="#000000">     &lt;xs:element id=&quot;attribute&quot; name=&quot;attribute&quot; </FONT>
<FONT COLOR="#000000">type=&quot;xs:topLevelAttribute&quot;&gt;</FONT>
<FONT COLOR="#000000">     &lt;/xs:element&gt;</FONT>

<FONT COLOR="#000000">     &lt;xs:complexType name=&quot;topLevelAttribute&quot;&gt;</FONT>
<FONT COLOR="#000000">         &lt;xs:complexContent&gt;</FONT>
<FONT COLOR="#000000">             &lt;xs:restriction base=&quot;xs:attribute&quot;&gt;</FONT>
<FONT COLOR="#000000">                 &lt;xs:sequence&gt;</FONT>
<FONT COLOR="#000000">                     &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;xs:annotation&quot;/&gt;</FONT>
<FONT COLOR="#000000">                     &lt;xs:element minOccurs=&quot;0&quot; name=&quot;simpleType&quot; </FONT>
<FONT COLOR="#000000">type=&quot;xs:localSimpleType&quot;&gt;</FONT>
<FONT COLOR="#000000">                     &lt;/xs:element&gt;</FONT>
<FONT COLOR="#000000">                 &lt;/xs:sequence&gt;</FONT>
<FONT COLOR="#000000">                 &lt;xs:attribute name=&quot;ref&quot; use=&quot;prohibited&quot;/&gt;</FONT>
<FONT COLOR="#000000">                 &lt;xs:attribute name=&quot;form&quot; use=&quot;prohibited&quot;/&gt;</FONT>
<FONT COLOR="#000000">                 &lt;xs:attribute name=&quot;use&quot; use=&quot;prohibited&quot;/&gt;</FONT>
<FONT COLOR="#000000">------------------------------------^^^^^^^^^^^^^^^^^^^^^^^</FONT>

<FONT COLOR="#000000">                 &lt;xs:attribute name=&quot;name&quot; type=&quot;xs:NCName&quot; use=&quot;required&quot;&gt;</FONT>
<FONT COLOR="#000000">                 &lt;/xs:attribute&gt;</FONT>
<FONT COLOR="#000000">                 &lt;xs:anyAttribute namespace=&quot;##other&quot; </FONT>
<FONT COLOR="#000000">processContents=&quot;lax&quot;/&gt;</FONT>
<FONT COLOR="#000000">             &lt;/xs:restriction&gt;</FONT>
<FONT COLOR="#000000">         &lt;/xs:complexContent&gt;</FONT>
<FONT COLOR="#000000">     &lt;/xs:complexType&gt;</FONT>

<FONT COLOR="#000000">Hope things are clear now.</FONT>

<FONT COLOR="#000000">Best Regards,</FONT>
<FONT COLOR="#000000">George</FONT>


<FONT COLOR="#000000">Helder Rossa wrote:</FONT>
<FONT COLOR="#000000">&gt; Hi,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I&#8217;ve got several errors validating a correct xsd file in oXygen Eclipse </FONT>
<FONT COLOR="#000000">&gt; Plug-In.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; *Importing a XSD File*</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Error:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; src-import.3.2: An &lt;import&gt; element information item that had no </FONT>
<FONT COLOR="#000000">&gt; namespace attribute was found, so the imported document cannot have a </FONT>
<FONT COLOR="#000000">&gt; targetNamespace attribute. However, the targetNamespace 'uri:namespace' </FONT>
<FONT COLOR="#000000">&gt; was found in the imported document.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&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; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Occurs when:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; &lt;xs:import schemaLocation=&quot;anotherfile.xsd&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Only works when:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; &lt;xs:import namespace=&#8221;uri:namespace&#8221; schemaLocation=&quot;anotherfile.xsd&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; This is incorrect!!</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; *Use Attribute in a Element*</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Error:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; s4s-att-not-allowed: Attribute 'use' cannot appear in element 'attribute'.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Occurs when:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; &lt;xs:attribute name=&quot;type&quot; type=&quot;xs:string&quot; use=&quot;required&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Only Works when:</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; &lt;xs:attribute name=&quot;type&quot; type=&quot;xs:string&quot; use=&quot;required&quot; /&gt;</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; This is incorrect because use attribute is OK.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; What I have to configure for oXygen work corrrectly?!</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Thanx</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;  </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; ------------------------------------------------------------------------</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; _______________________________________________</FONT>
<FONT COLOR="#000000">&gt; oXygen-user mailing list</FONT>
<FONT COLOR="#000000">&gt; <A HREF="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</A></FONT>
<FONT COLOR="#000000">&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>