<!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">·</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">·</A> must not match the <A HREF="http://www.w3.org/TR/xmlschema-1/#key-vv">·</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">·</A> of the enclosing <A HREF="http://www.w3.org/TR/xmlschema-1/#element-schema"><schema></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"><schema></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 <import> and I HAVE a targetNamespace in the <import>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 ·actual value· must be </FONT>
<FONT COLOR="#000000">identical to the ·actual value· 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 "use" attribute prohibited.</FONT>
<FONT COLOR="#000000"> <xs:element id="attribute" name="attribute" </FONT>
<FONT COLOR="#000000">type="xs:topLevelAttribute"></FONT>
<FONT COLOR="#000000"> </xs:element></FONT>
<FONT COLOR="#000000"> <xs:complexType name="topLevelAttribute"></FONT>
<FONT COLOR="#000000"> <xs:complexContent></FONT>
<FONT COLOR="#000000"> <xs:restriction base="xs:attribute"></FONT>
<FONT COLOR="#000000"> <xs:sequence></FONT>
<FONT COLOR="#000000"> <xs:element minOccurs="0" ref="xs:annotation"/></FONT>
<FONT COLOR="#000000"> <xs:element minOccurs="0" name="simpleType" </FONT>
<FONT COLOR="#000000">type="xs:localSimpleType"></FONT>
<FONT COLOR="#000000"> </xs:element></FONT>
<FONT COLOR="#000000"> </xs:sequence></FONT>
<FONT COLOR="#000000"> <xs:attribute name="ref" use="prohibited"/></FONT>
<FONT COLOR="#000000"> <xs:attribute name="form" use="prohibited"/></FONT>
<FONT COLOR="#000000"> <xs:attribute name="use" use="prohibited"/></FONT>
<FONT COLOR="#000000">------------------------------------^^^^^^^^^^^^^^^^^^^^^^^</FONT>
<FONT COLOR="#000000"> <xs:attribute name="name" type="xs:NCName" use="required"></FONT>
<FONT COLOR="#000000"> </xs:attribute></FONT>
<FONT COLOR="#000000"> <xs:anyAttribute namespace="##other" </FONT>
<FONT COLOR="#000000">processContents="lax"/></FONT>
<FONT COLOR="#000000"> </xs:restriction></FONT>
<FONT COLOR="#000000"> </xs:complexContent></FONT>
<FONT COLOR="#000000"> </xs:complexType></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">> Hi,</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I’ve got several errors validating a correct xsd file in oXygen Eclipse </FONT>
<FONT COLOR="#000000">> Plug-In.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> *Importing a XSD File*</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Error:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> src-import.3.2: An <import> element information item that had no </FONT>
<FONT COLOR="#000000">> namespace attribute was found, so the imported document cannot have a </FONT>
<FONT COLOR="#000000">> targetNamespace attribute. However, the targetNamespace 'uri:namespace' </FONT>
<FONT COLOR="#000000">> was found in the imported document.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> @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">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Occurs when:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> <xs:import schemaLocation="anotherfile.xsd" /></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Only works when:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> <xs:import namespace=”uri:namespace” schemaLocation="anotherfile.xsd" /></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> This is incorrect!!</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> *Use Attribute in a Element*</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Error:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> s4s-att-not-allowed: Attribute 'use' cannot appear in element 'attribute'.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Occurs when:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> <xs:attribute name="type" type="xs:string" use="required" /></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Only Works when:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> <xs:attribute name="type" type="xs:string" use="required" /></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> This is incorrect because use attribute is OK.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> What I have to configure for oXygen work corrrectly?!</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Thanx</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> ------------------------------------------------------------------------</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> _______________________________________________</FONT>
<FONT COLOR="#000000">> oXygen-user mailing list</FONT>
<FONT COLOR="#000000">> <A HREF="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</A></FONT>
<FONT COLOR="#000000">> <A HREF="http://www.oxygenxml.com/mailman/listinfo/oxygen-user">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>