Re: [xml] Query regarding IDCs handling during schema parsing.
- From: Daniel Veillard <veillard redhat com>
- To: nagesh <nageshs huawei com>
- Cc: xml gnome org
- Subject: Re: [xml] Query regarding IDCs handling during schema parsing.
- Date: Fri, 9 Nov 2007 04:30:04 -0500
On Fri, Nov 09, 2007 at 02:14:33PM +0800, nagesh wrote:
Hi,
I have a query about schema validation, when the schema
document is having IDC. My schema document is such that, the main
schema will import the child schema which has an IDC definition (key)
for an element. So when the schema parsing is completed successfully,
the IDC definition for that element will be stored in the child schema
data structure created for this child schema.
However when the validation of the input document starts, In
the function xmlSchemaPreRun( ), it checks for the presence of IDC
definition only in the main schema,
27899 if (vctxt->schema->idcDef != NULL) {
27900 xmlHashScan(vctxt->schema->idcDef,
27901 (xmlHashScanner) xmlSchemaAugmentIDC, vctxt);
27902 }
Because of this check, in the validation context,
"vctxt->aidcs" will be set only if the main schema has IDC definition.
So when the validation of the element declaration starts against it's
definition present in the schema file, the check for the IDC fails,
since it is not able to find the IDC definition for the same.
Function: xmlSchemaIDCRegisterMatchers
23109 aidc = vctxt->aidcs;
23110 while (aidc != NULL) {
23111 if (aidc->def == idc)
23112 break;
23113 aidc = aidc->next;
23114 }
23115 if (aidc == NULL) {
23116 VERROR_INT("xmlSchemaIDCRegisterMatchers",
23117 "Could not find an augmented IDC item for an IDC
definition");
23118 return (-1);
23119 }
So in the function, xmlSchemaPreRun( ), should it check for
all the schema pointers for the presence of Augmented IDC definitions
in all the main and child schema pointers?
Thanks in advance for the reply.
Frankly I have no idea, I don't understand the details of XSD or of the
associated code.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]