You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@bea.com> on 2005/10/11 03:23:18 UTC

RE: Problems with XMLBeans validation

I know it's been over a month since this was asked, but today I finally
took some time and reviewed the rules for keyref validation (there's
also been a recent thread on xmlschema-dev about this very issue).
It turns out that in a non-intuitive way, XMLSchema is esentially
prohibiting keyrefs from resolving to keys that are duplicated within
the scope of the context element for the keyref. Note that the keys
themselves are ok, since their scopes are disjoint, it's only when they
are referenced by a keyref that the problem occurs.
 
So basically, in this instance, Xerces got confused and XmlBeans was
right. Whew!
In case this is still useful, IMO keyrefs should be declared on the same
element as the corresponding key to ensure intuitive behavior.
 
Thanks,
Radu

	-----Original Message-----
	From: lawrence.mclean@centrelink.gov.au
[mailto:lawrence.mclean@centrelink.gov.au] 
	Sent: Wednesday, September 07, 2005 9:46 PM
	To: user@xmlbeans.apache.org
	Subject: Problems with XMLBeans validation
	
	


	Hi, 
	
	The attached  schema and matching xml sample show apparent
problems with XMLBeans validation. The xml sample validates ok with the
latest xerces, as well, the schema seem ok to me. 
	
	Please note that the schema may seem a bit odd, with apparently
redundant elements, it is the way it is for historical reasons, what is
important is that it does appear to be a valid schema in spite of
XMLBeans saying that the matching xml sample is invalid. 
	
	Can anyone see a problem with my key definitions, or is there
indeed a problem with XMLBeans validation? 
	
	Thanks, Lawrence 
	
	
	
**********************************************************************
	IMPORTANT: This e-mail is intended for the use of the addressee
and may contain information that is confidential, commercially valuable
or subject to legal or parliamentary privilege. If you are not the
intended recipient you are notified that any review, re-transmission,
disclosure, use or dissemination of this communication is strictly
prohibited by several Commonwealth Acts of Parliament. If you have
received this communication in error please notify the sender
immediately and delete all copies of this transmission together with any
attachments.
	
**********************************************************************
	

________________________________________________________________________________
BEAWorld 2005: coming to a city near you.  Everything you need for SOA and enterprise infrastructure success.

 
Register now at http://www.bea.com/4beaworld

 
London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct| Beijing 7-8 Dec