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 Elisha Berns <e....@computer.org> on 2002/01/23 06:05:39 UTC

FW: [m7itb] Question

Hi,

I have been using the Xerces  C++ 1.60 parser to conduct validation tests
and unfortunately it has a lot of quirks that require a lot of work-arounds
in order to do anything.  It appears to be the case that the <include>
directive which is found in Mpeg7-2001.xsd only works properly if the order
of the included files matches the order of dependencies  between schema
items declared in them.  So if element C depends on element B which depends
on element A (and each respective item is declared in a schema files with
the same name (A.xsd, etc.)) then the only order of include statements that
appears to work is <include A>, <include B>, <include C>.  Furthermore
within the included files themselves the schema items must be declared in
the order of their dependencies.

The long and the short of all that is that the MPEG-7 schema files had to be
rearranged so that the item declarations matched the order(s) of dependency
between them.  And it works similar to the way a C++ preprocessor handles .h
include files: the file order is valid as long as there is no use of items
not yet declared.

What isn’t clear to me is whether this is a feature or a bug in Xerces C++
1.60.  I double checked the W3 Schema Recommendation and didn’t see any
mention of dependency checking in the <include> directive.  Does that mean
that the Recommendation just doesn’t way in on how the <include> directive
needs to handle dependencies?  And whoever implements a validator can
interpret the issue of dependency checking as they please?

The question that begs to be asked here is the following:  If doing
dependency checking is a valid way of implementing the <include> directive
and some parser/validators are going to work/fail due to out of order
declarations of schema items then aren’t the current MPEG-7 schema files
problematic because they don’t/won’t work with a dependency checking
validator?  Of course the item declarations can be rearranged to reflect
dependencies and levels of abstraction such as base data types, descriptor
types and description schemes.

So, if someone has any comments to make I sure would like to know what they
are.  And if I made some really stupid mistake in this matter, please let me
know.

Basically I ran the tests through the Xerces C++ DOMPrint sample with schema
validation and namespaces ON.  Is there is some caveat or trick to doing it
I don’t know about?

Elisha Berns

e.berns@computer.org <ma...@computer.org>








To unsubscribe from this group, send an email to:
m7itb-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

Re: FW: [m7itb] Question

Posted by Khaled Noaman <kn...@ca.ibm.com>.
Hi Elisha,

 The W3C has no mention of dependency checking for the <include>
directive, and that dependency checking is one of the limitations of the
C++ parser as noted in the documentation
(http://xml.apache.org/xerces-c/schema.html). This will be fixed in the
next release of the parser.

Khaled

Elisha Berns wrote:

> Hi,
>
> I have been using the XercesC++ 1.60 parser to conduct validation
> tests and unfortunately it has a lot of quirks that require a lot of
> work-arounds in order to do anything.It appears to be the case that
> the <include> directive which is found in Mpeg7-2001.xsd only works
> properly if the order of the included files matches the order of
> dependenciesbetween schema items declared in them.So if element C
> depends on element B which depends on element A (and each respective
> item is declared in a schema files with the same name (A.xsd, etc.))
> then the only order of include statements that appears to work is
> <include A>, <include B>, <include C>.Furthermore within the included
> files themselves the schema items must be declared in the order of
> their dependencies.
>
> The long and the short of all that is that the MPEG-7 schema files had
> to be rearranged so that the item declarations matched the order(s) of
> dependency between them.And it works similar to the way a C++
> preprocessor handles .h include files: the file order is valid as long
> as there is no use of items not yet declared.
>
> What isn’t clear to me is whether this is a feature or a bug in Xerces
> C++ 1.60.I double checked the W3 Schema Recommendation and didn’t see
> any mention of dependency checking in the <include> directive.Does
> that mean that the Recommendation just doesn’t way in on how the
> <include> directive needs to handle dependencies?And whoever
> implements a validator can interpret the issue of dependency checking
> as they please?
>
> The question that begs to be asked here is the following:If doing
> dependency checking is a valid way of implementing the <include>
> directive and some parser/validators are going to work/fail due to out
> of order declarations of schema items then aren’t the current MPEG-7
> schema files problematic because they don’t/won’t work with a
> dependency checking validator?Of course the item declarations can be
> rearranged to reflect dependencies and levels of abstraction such as
> base data types, descriptor types and description schemes.
>
> So, if someone has any comments to make I sure would like to know what
> they are.And if I made some really stupid mistake in this matter,
> please let me know.
>
> Basically I ran the tests through the Xerces C++ DOMPrint sample with
> schema validation and namespaces ON.Is there is some caveat or trick
> to doing it I don’t know about?
>
> Elisha Berns
>
> e.berns@computer.org
>
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> m7itb-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>