You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2013/08/19 10:05:47 UTC

[jira] [Resolved] (XERCESC-2017) Xerces-C++ is not always able to handle W3C standard keyref

     [ https://issues.apache.org/jira/browse/XERCESC-2017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-2017.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2.0
         Assignee: Alberto Massari

A fix is in SVN. Please verify
                
> 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
>            Assignee: Alberto Massari
>             Fix For: 3.2.0
>
>
> 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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org