You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Neil Sherman <ns...@aimltd.co.uk> on 2002/09/12 12:30:23 UTC

Problems with Xerces 1.6 (Also MSXML 4) and Schema attributes

Hi all!

I trying to validate a xml document against an existing schema, but am
receiving the following error messages relating to the schema:-

Message: Attribute 'use' cannot appear in global attribute declarations

The section of the schema it is complaining about is :

<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<!-- 
	
**********************************************************************
	*    *****          Global Attribute Declarations
*****    *
	
**********************************************************************
--> 
<xsd:attribute name="Distance" use="optional" type="xsd:integer"> 
	<xsd:annotation> 
		<xsd:documentation>Distance (metres)</xsd:documentation>

	</xsd:annotation> 
</xsd:attribute>

...	...	...

I also get a similar error message when trying to validate using MSXML
4.  However if I load the schema document into Xml Spy and click the
validate button it tells me that the document is in fact valid.

I have tried looking at the W3c standards to determine whether or not a
use attribute is infact valid within a global attribute declaration :-

<attribute
  default = string
  fixed = string
  form = (qualified | unqualified) 
  id = ID
  name = NCName
  ref = QName
  type = QName
  use = (optional | prohibited | required): optional
  {any attributes with non-schema Namespace...}>
Content: (annotation?, (simpleType?))
</attribute>

It mentions "any attributes with non-schema Namespace", but I am unsure
as to what this actually means ?

I am using version 1.6 of Xerces, which I believe to be W3C compliant
(mostly!) for the schema language, could anybody shed any light on this
error message ?

Many thanks for your time

Neil

Ps - I would appreciate it if you could cc any reply to my email address
nsherman@aimltd.co.uk



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org