xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18372] - <unique> constraint ignored
Date Fri, 04 Apr 2003 19:48:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18372

<unique> constraint ignored

bmf1972@icqmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |



------- Additional Comments From bmf1972@icqmail.com  2003-04-04 19:48 -------
Niel,

Here is a detailed test case.

1) The target XML file:

<?xml version="1.0" encoding="UTF-16"?>
<doc
	xmlns="uuid:123456"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="uuid:123456 test.xsd">

	<elm1 alias="A2" />
	<elm2 alias="A2" />
</doc>

2) The schema XSD file:

<?xml version="1.0" encoding="UTF-16"?>
<schema
        xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:tst="uuid:123456"
        targetNamespace="uuid:123456"
        elementFormDefault="qualified"
        version="1.0">

	<element name="doc" type="tst:doc">
		<unique name="elm">

<!--
The following xpath union expression ( tst:elm1 | tst:elm2 ) is not fully
evaluated ( only the first member -> tst:elm1 )
The consequence is that the above target XML file is validated OK, while it isn't!
-->
			<selector xpath="tst:elm1 | tst:elm2" />
			<field xpath="@alias" />
		</unique>
	</element>

	<complexType name="doc">
		<sequence>
			<element name="elm1" type="tst:elm" />
			<element name="elm2" type="tst:elm" />
		</sequence>
	</complexType>

	<complexType name="elm">
		<attribute name="alias" type="string" />
	</complexType>
</schema>

3) The target is _invalid_ according to the schema, but it appears valid to
Xerces... (tested with MSXML4.0 - OK).

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


Mime
View raw message