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 "Aniruddha Dayalu (RBIN/EDI5)" <An...@in.bosch.com> on 2005/08/09 10:05:37 UTC
Help Needed: Schema validation on Xerces ver2.6
Hi,
I have installed Xerces-C(version 2.6) and ran a sample program
(DOMCount).
I am running the below command line argument from the bin directory (XML
and XSD file also present in the bin directory too) in xerces
DOMCount -v=always personal-schema.xml
The XML File is also a sample XML file, I wanted to check the schema
validation functionality provided by Xerces so I have used the -v=always
switch.
This should do the Schema validation (validating Instance XML with
Schema)
But it throws a lot of errors, a few shown below (as if it is not
picking the schema)
Sample Error Message
---------------------------
Error at file /home/xerces-c-src_2_6_0/bin/personal-schema.xml, line 39,
char 10
Message: Unknown element 'link'
Error at file /home/xerces-c-src_2_6_0/bin/personal-schema.xml, line 39,
char 19
Message: Attribute 'manager' is not declared for element 'link'
---------------------------
The XML file personal-schema.xml has the Schema file mentioned as
<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='/home/xerces-c-src_2_6_0/bin/personal.xsd
'>
I believe this syntax to represent Schema in a Instance is ok. But why
are the errors occuring? Please do help.
Also I would like to know to what extent does Xerces support
key/keyref/unique constraints?
Can Constraints which are defined over several elements be supported.
Such constraints are defined as e.g. <selector xpath="//element_a |
//element_b"/> <field xpath="@name"/> for key, unique or keyref
constraints.
Also can the below case of reference be validated by Xerces-C?
Referenzes are defined in one attribute as
"namespace::declarationname1/declarationname2" and may also be relative
like "./declarationname" and "../declarationname". References on bit
constants are coded as
"namespace::bit_collection_name/bit_range_name/bit_constant_name". No
relative referencing is allowed.
Would greatly appreciate any information on this. Thanking you.
Regards,
Anirudh
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org