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 mi...@sybase.com on 2009/07/01 06:00:35 UTC
substitution group in Xerces 2.8
Hi,
We using xerces in our application as the XML parser. We have a query
which worked on Xerces 2.1 but not on Xerces 2.8:
select xmlvalidate(
'<?xml version="1.0"?>
<group
xmlns="http://www.xbrl.org/2001/instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rtr="http://about.reuters.com/results/2002-06-30/001"
xmlns:uk="http://www.iasb.org.uk/xbrl/2002-02-25/003"
xmlns:iso4217="http://www.iso.org/4217"
xsi:schemaLocation="http://about.reuters.com/results/2002-06-30/001
http://www-edm/remote/svr/groups/xmltest/xmlschema/XBRL_Reuters/Reuters-Interims-xbrl-001.xsd
http://www.iasb.org.uk/xbrl/2002-02-25/003 http://www-edm/remote/svr/gro
ups/xmltest/xmlschema/XBRL_Reuters/UK-draft-25-Feb-2002-v2-003.xsd">
</group>' option 'schemavalidate=yes')
...
XMLVALIDATE(): XML parser error <<Element chapter has a type which does
not derive from the type of the element at the head of the substitution
group>> atline 1494, offset 72.
...
XMLVALIDATE(): XML parser error <<Element name has a type which does not
derive from the type of the element at the head of the substitution
group>> at line1495, offset 69.
...
XMLVALIDATE(): XML parser error <<Element number has a type which does not
derive from the type of the element at the head of the substitution
group>> atline 1496, offset 71.
...
XMLVALIDATE(): XML parser error <<Element paragraph has a type which does
not derive from the type of the element at the head of the substitution
group>> at line 1497, offset 74.
...
XMLVALIDATE(): XML parser error <<Element subparagraph has a type which
does not derive from the type of the element at the head of the
substitution group>> at line 1498, offset 77.
In addition, if I switched the 2 pairs of the schemaLocation, it will
work. Any idea why?
Thanks.
RE: substitution group in Xerces 2.8
Posted by mi...@sybase.com.
Yes, I did lookup the bug list in the release notes related to
substitution group. However, the description is very brief to provide
more info regarding the change.
The point that puzzled me is why it works by swapping the 2
schemalocations. In fact, I tried the same using other parsers such as
XMLSpy and it gave errors regardless the sequence of the schemalocations.
So, which is 'correct'?
Thanks.
"Jesse Pelton" <js...@PKC.com>
07/09/2009 08:15 PM
Please respond to
c-users@xerces.apache.org
To
<c-...@xerces.apache.org>, <c-...@xerces.apache.org>
cc
Subject
RE: substitution group in Xerces 2.8
Five years worth of work occurred between 2.1 and 2.8. Assuming it's even
possible, it's likely to be a substantial task to identify whatever commit
or commits caused this particular behavior to change. There may or may
not be an associated bug report. If Boris or anyone else undertakes this
on your behalf, be sure to offer them profuse thanks.
You can search the bug database yourself (
http://issues.apache.org/jira/browse/XERCESC).
http://xerces.apache.org/xerces-c/source-repository.html has information
on how to work with the source repository. If you don't have Subversion,
look for the link to the repository's Web interface at the bottom of the
page. You might want to start by looking at the Xerces-C "Release Info"
page (http://xerces.apache.org/xerces-c/releases.html) and the "Releases
Archive" linked from there.
-----Original Message-----
From: michelle.lim@sybase.com [mailto:michelle.lim@sybase.com]
Sent: Thu 7/9/2009 1:21 AM
To: c-users@xerces.apache.org
Subject: Re: substitution group in Xerces 2.8
Hi Boris,
Would you be able to point me to the bug# in xerces that made this change?
Thanks!
Boris Kolpackov <bo...@codesynthesis.com>
07/09/2009 03:12 PM
Please respond to
c-users@xerces.apache.org
To
c-users@xerces.apache.org
cc
michelle.lim@sybase.com
Subject
Re: substitution group in Xerces 2.8
Hi Michelle,
michelle.lim@sybase.com <mi...@sybase.com> writes:
> Thanks for your reply. However, why xerces 2.1 is ok? Is there
anything
> in xerces 2.8 that "corrected" the wrong behavior in xerces 2.1?
Probably. I would expect the XML Schema support in 2.8 to be a lot
more spec-compliant than in 2.1.
Boris
--
Boris Kolpackov, Code Synthesis Tools
http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:
http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing:
http://codesynthesis.com/products/xsde
RE: substitution group in Xerces 2.8
Posted by Jesse Pelton <js...@PKC.com>.
Five years worth of work occurred between 2.1 and 2.8. Assuming it's even possible, it's likely to be a substantial task to identify whatever commit or commits caused this particular behavior to change. There may or may not be an associated bug report. If Boris or anyone else undertakes this on your behalf, be sure to offer them profuse thanks.
You can search the bug database yourself (http://issues.apache.org/jira/browse/XERCESC). http://xerces.apache.org/xerces-c/source-repository.html has information on how to work with the source repository. If you don't have Subversion, look for the link to the repository's Web interface at the bottom of the page. You might want to start by looking at the Xerces-C "Release Info" page (http://xerces.apache.org/xerces-c/releases.html) and the "Releases Archive" linked from there.
-----Original Message-----
From: michelle.lim@sybase.com [mailto:michelle.lim@sybase.com]
Sent: Thu 7/9/2009 1:21 AM
To: c-users@xerces.apache.org
Subject: Re: substitution group in Xerces 2.8
Hi Boris,
Would you be able to point me to the bug# in xerces that made this change?
Thanks!
Boris Kolpackov <bo...@codesynthesis.com>
07/09/2009 03:12 PM
Please respond to
c-users@xerces.apache.org
To
c-users@xerces.apache.org
cc
michelle.lim@sybase.com
Subject
Re: substitution group in Xerces 2.8
Hi Michelle,
michelle.lim@sybase.com <mi...@sybase.com> writes:
> Thanks for your reply. However, why xerces 2.1 is ok? Is there
anything
> in xerces 2.8 that "corrected" the wrong behavior in xerces 2.1?
Probably. I would expect the XML Schema support in 2.8 to be a lot
more spec-compliant than in 2.1.
Boris
--
Boris Kolpackov, Code Synthesis Tools
http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:
http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing:
http://codesynthesis.com/products/xsde
Re: substitution group in Xerces 2.8
Posted by mi...@sybase.com.
Hi Boris,
Would you be able to point me to the bug# in xerces that made this change?
Thanks!
Boris Kolpackov <bo...@codesynthesis.com>
07/09/2009 03:12 PM
Please respond to
c-users@xerces.apache.org
To
c-users@xerces.apache.org
cc
michelle.lim@sybase.com
Subject
Re: substitution group in Xerces 2.8
Hi Michelle,
michelle.lim@sybase.com <mi...@sybase.com> writes:
> Thanks for your reply. However, why xerces 2.1 is ok? Is there
anything
> in xerces 2.8 that "corrected" the wrong behavior in xerces 2.1?
Probably. I would expect the XML Schema support in 2.8 to be a lot
more spec-compliant than in 2.1.
Boris
--
Boris Kolpackov, Code Synthesis Tools
http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:
http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing:
http://codesynthesis.com/products/xsde
Re: substitution group in Xerces 2.8
Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Michelle,
michelle.lim@sybase.com <mi...@sybase.com> writes:
> Thanks for your reply. However, why xerces 2.1 is ok? Is there anything
> in xerces 2.8 that "corrected" the wrong behavior in xerces 2.1?
Probably. I would expect the XML Schema support in 2.8 to be a lot
more spec-compliant than in 2.1.
Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open source XML data binding for C++: http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
Re: substitution group in Xerces 2.8
Posted by mi...@sybase.com.
Sorry for that... would not do that in future.
Thanks for your reply. However, why xerces 2.1 is ok? Is there anything
in xerces 2.8 that "corrected" the wrong behavior in xerces 2.1?
Boris Kolpackov <bo...@codesynthesis.com>
07/07/2009 11:24 AM
Please respond to
c-users@xerces.apache.org
To
c-users@xerces.apache.org
cc
michelle.lim@sybase.com
Subject
Re: substitution group in Xerces 2.8
Michelle,
Please don't cross-post to multiple mailing lists. c-users is
sufficient for questions about Xerces-C++ usage.
michelle.lim@sybase.com <mi...@sybase.com> writes:
> xsi:schemaLocation="http://about.reuters.com/results/2002-06-30/001
>
http://www-edm/remote/svr/groups/xmltest/xmlschema/XBRL_Reuters/Reuters-Interims-xbrl-001.xsd
> http://www.iasb.org.uk/xbrl/2002-02-25/003 http://www-edm/remote/svr/gro
> ups/xmltest/xmlschema/XBRL_Reuters/UK-draft-25-Feb-2002-v2-003.xsd"
>
> [...[
>
> In addition, if I switched the 2 pairs of the schemaLocation, it will
> work. Any idea why?
Probably because the first schema (Reuters-Interims-xbrl-001.xsd)
imports (directly or indirectly) another schema for the
http://www.iasb.org.uk/xbrl/2002-02-25/003 namespace. As a result,
UK-draft-25-Feb-2002-v2-003.xsd is ignored since Xerces-C++ thinks
it already has the grammar for this namespace.
Boris
--
Boris Kolpackov, Code Synthesis Tools
http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:
http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing:
http://codesynthesis.com/products/xsde
Re: substitution group in Xerces 2.8
Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Michelle,
Please don't cross-post to multiple mailing lists. c-users is
sufficient for questions about Xerces-C++ usage.
michelle.lim@sybase.com <mi...@sybase.com> writes:
> xsi:schemaLocation="http://about.reuters.com/results/2002-06-30/001
> http://www-edm/remote/svr/groups/xmltest/xmlschema/XBRL_Reuters/Reuters-Interims-xbrl-001.xsd
> http://www.iasb.org.uk/xbrl/2002-02-25/003 http://www-edm/remote/svr/gro
> ups/xmltest/xmlschema/XBRL_Reuters/UK-draft-25-Feb-2002-v2-003.xsd"
>
> [...[
>
> In addition, if I switched the 2 pairs of the schemaLocation, it will
> work. Any idea why?
Probably because the first schema (Reuters-Interims-xbrl-001.xsd)
imports (directly or indirectly) another schema for the
http://www.iasb.org.uk/xbrl/2002-02-25/003 namespace. As a result,
UK-draft-25-Feb-2002-v2-003.xsd is ignored since Xerces-C++ thinks
it already has the grammar for this namespace.
Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open source XML data binding for C++: http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde