I am new here, so I don't know if this is the best way to report a bug/problem!
I am trying to use Xpath to impose co-occurrence constraints. Basically, to either usre an attribute or a child element to define the same thing. In the typical library example, something like
xs:unique name="isbn"
xs:selector path="."/
xs:field path="isbn|@isbn"/
/xs:unique
meaning that either the child element "isbn" or the attibute "isbn" may be present, but not both.
I then proceed to create an instance document with an error (both present), and Copy Editor says it's valid.
My real example is a big larger than this, but basically this is what is happening. I checked that both the selector and the field are correct.
When I put my real example in Altova (I downloaded the trial version just to test this), everything works as it should.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think it's possible that Xerces-C does not support XML Schema 1.1 (and thus ), but I'd be happy to be corrected if I'm wrong!
Neither port (Windows or Linux) has switched to Xerces-C 3.x yet, so it's possible that this will resolve the problem. (Not sure why Ubuntu doesn't yet support the new version.)
It does seem as if open source C++ implementations trail their Java counterparts by a wide margin.
Actually, with exactly the same schema, different co-occurrence constraints located elsewhere do work correctly! I will send you a new instance file (and updated schema since I am actively working on it!)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am new here, so I don't know if this is the best way to report a bug/problem!
I am trying to use Xpath to impose co-occurrence constraints. Basically, to either usre an attribute or a child element to define the same thing. In the typical library example, something like
xs:unique name="isbn"
xs:selector path="."/
xs:field path="isbn|@isbn"/
/xs:unique
meaning that either the child element "isbn" or the attibute "isbn" may be present, but not both.
I then proceed to create an instance document with an error (both present), and Copy Editor says it's valid.
My real example is a big larger than this, but basically this is what is happening. I checked that both the selector and the field are correct.
When I put my real example in Altova (I downloaded the trial version just to test this), everything works as it should.
Could you send me the XSD and a short sample doc to gnschmidt at users dot sourceforge dot net?
I'm happy to take a look.
(Perhaps I need to update the validator to a more recent version of Xerces-C.)
Best,
Gerald
I think it's possible that Xerces-C does not support XML Schema 1.1 (and thus ), but I'd be happy to be corrected if I'm wrong!
Neither port (Windows or Linux) has switched to Xerces-C 3.x yet, so it's possible that this will resolve the problem. (Not sure why Ubuntu doesn't yet support the new version.)
It does seem as if open source C++ implementations trail their Java counterparts by a wide margin.
: http://www.ibm.com/developerworks/library/x-xml11pt2/
PS: Xerces-C has had a 'full constraint checking' option for ages, but it's already switched on:
parser->setFeature ( XMLUni::fgXercesSchemaFullChecking, true );
thanks for the help!
Actually, with exactly the same schema, different co-occurrence constraints located elsewhere do work correctly! I will send you a new instance file (and updated schema since I am actively working on it!)
sorry, my mistake; it's different sort of Xpath use, not co-occurrence constraints, that I was using and that XMLCE is correctly processing in my file