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