Hi, Mihran. Can you provide actual files, including a complete xsd file?
On Sat, Jul 6, 2013 at 12:03 AM, Mihran Hovsepyan (JIRA) <[email protected]> wrote: > Mihran Hovsepyan created XERCESC-2017: > ----------------------------------------- > > Summary: Xerces-C++ is not always able to handle W3C standard > keyref > Key: XERCESC-2017 > URL: https://issues.apache.org/jira/browse/XERCESC-2017 > Project: Xerces-C++ > Issue Type: Bug > Components: Validating Parser (XML Schema) > Affects Versions: 3.1.1 > Reporter: Mihran Hovsepyan > > > I use *Xerces-C++ 3.1.1* to validate schema of xml files. Bellow is example > of some such file. > > <CONFIG> > <DBS> > <DB ID="D"> > <!--...--> > </DB> > <VDB ID="V"> > <!--...--> > <PARTS> > <PART_DB ID="V1" /> > <PART_DB ID="V2" /> > </PARTS> > </VDB> > <!--...--> > </DBS> > <HOSTS> > <HOST ID="host1"> > <DBS> > <DB ID="D"> > <!--...--> > </DB> > <DB ID="V1"> > <!--...--> > </DB> > <DB ID="V2"> > <!--...--> > </DB> > </DBS> > <VDBS> > <DB ID="V"> > <!--...--> > </DB> > </VDBS> > </HOST> > <!--...--> > </HOSTS> > </CONFIG> > > And in its schema the following key and keyref are defined for the root > element `CONFIG`. > > <xsd:key name="DbIdKey"> > <xsd:selector > xpath="./DBS/DB|./DBS/VDB|./DBS/VDB/PARTS/PART_DB" /> > <xsd:field xpath="@ID" /> > </xsd:key> > <xsd:keyref name="DbIdRef" refer="DbIdKey"> > <xsd:selector > xpath="./HOSTS/HOST/DBS/DB|./HOSTS/HOST/VDBS/DB" /> > <xsd:field xpath="@ID" /> > </xsd:keyref> > > So, though the file meets requirements of the schema according to *W3C* and > some validators understand that (for instance XML validator of *MS Visual > Studio*), *Xerces-C++ 3.1.1* unable to do that. It complains: > > identity constraint key for element 'CONFIG' not found (last_line, > last_column_of_last_line) > > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA administrators > For more information on JIRA, see: http://www.atlassian.com/software/jira > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
