This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 32332 - XSD <unique> validation
Summary: XSD <unique> validation
Status: RESOLVED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: Schema (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-26 03:08 UTC by bmf1972
Modified: 2008-12-01 23:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The target XML file (478 bytes, text/xml)
2003-04-04 05:52 UTC, bmf1972
Details
The XSD schema file (1.28 KB, text/xml)
2003-04-04 05:53 UTC, bmf1972
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bmf1972 2003-03-26 03:08:53 UTC
Having the following XML document:
<doc>
  <elm1 alias="SameAlias" />
  <elm2 alias="SameAlias" />
</doc>

and the following XSD (fragment) document:
<element name="doc">
  <unique name="alias">
    <selector xpath="elm1|elm2" />
    <field xpath="@alias" />
  </unique>
</element>

the validation is succesfull...

It appears that the xpath union expression is
ignored and only the first union member (i.e.,
elm1) is utilized.
Comment 1 _ pkuzel 2003-03-26 13:25:03 UTC
Actually IDE delegates parsing logic to external parser. The external
parser is located using JAXP API. You can at any time change parser
implementation. Try to plug in latest Xerces2 impl from xml.apache.org.

I can recall that Xerces2 implementation that we bundle by default
intentionaly ignores some contraints set by XMLSchema for performance
reasons
<http://xml.apache.org/xerces2-j/features.html>.

I'm going switch it on and let you know (but it's Xerces specifics).
Comment 2 _ pkuzel 2003-03-26 16:03:48 UTC
The schema-full-checking feature does not influence XML document checking.

I duplicated the bug into Apaches' bugzilla
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18372>.
Comment 3 bmf1972 2003-04-04 03:57:54 UTC
Petr,
I'll will attach a full test case for this.
Adrian.
Comment 4 bmf1972 2003-04-04 05:52:30 UTC
Created attachment 9695 [details]
The target XML file
Comment 5 bmf1972 2003-04-04 05:53:59 UTC
Created attachment 9696 [details]
The XSD schema file
Comment 6 Samaresh Panda 2008-12-01 23:36:15 UTC
Perhaps this got fixed in 5.5 Ent Pack when we introduced a new set of tools to work with schemas.