You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Chalker, Dean" <De...@intelliwhere.com> on 2003/11/13 02:01:41 UTC

Patch for XInclude Tests

Hi all,
 
I am working adding XPointer functionality to XInclude when I found that the
checking of XInclude test output had been disabled by "mrglavas" on Oct 17.
 
The tests typically throw the following errors:

[Error] tests.xsd:22:29: src-resolve: Cannot resolve the name 'xml:base' to
a(n) 'attribute declaration' component.
[Error] tests.xsd:22:29: s4s-elt-invalid-content.1: The content of
'childType' is invalid.  Element 'attribute' is invalid, misplaced, or
occurs too often.
[Error] tests.xsd:56:30: s4s-elt-invalid-content.1: The content of
'#AnonType_elem' is invalid.  Element 'attribute' is invalid, misplaced, or
occurs too often.
[Error] tests.xsd:40:33: s4s-elt-invalid-content.1: The content of
'#AnonType_viewmyRoot' is invalid.  Element 'attribute' is invalid,
misplaced, or occurs too often.

which all seem to be related to three instance of the following line in
tests,xsd

<attribute ref="xml:base"/>

I commented these lines out, and restored the comparison code in Tests.java,
and the tests run clean.
 
Perhaps someone can educate me on whats wrong with these lines, or a better
solution than just commenting the lines out of tests.xsd.
 
 
Regards
Dean
 
 
 
INTERGRAPH
Dean Chalker
Distinguished Design Engineer (R&D)
IntelliWhere Product Development Center
Intergraph Mapping and Geospatial Solutions
Level 3/299 Coronation Drive
Milton  Brisbane
Austalia  4064
Phone:  +61 (0)7 3510 8918
Fax:    +61 (0)7 3510 8901
E-mail: dean.chalker@intelliwhere.com <ma...@intelliwhere.com>

URL: imgs.intergraph.com
 

Re: Patch for XInclude Tests

Posted by Michael Glavassevich <mr...@apache.org>.
Hello Dean,

Thanks for hunting this down. The problem was with the import of the
schema for the xml namespace. It was pointing to some inaccessible local
file. I created a schema which defines xml:base to replace this reference.
Upon reenabling the tests, they all passed as you observed.

I'm still somewhat uneasy about how these comparisons are being done. It's
quite fragile. The comparisons depend too heavily on the existence of
error mesages and their content. Error messages are localized so they
will be different in other locales, thus I'm quite certina that these
tests will fail in non-English locales. Even within the English locale,
the content of the messages may change. Also this technique depends on
the order of errors reported, and the point in processing where they're
reported. Both of these can change at any time. It's just not reliable.

All that said, it's working for now.

On Thu, 13 Nov 2003, Chalker, Dean wrote:

> Hi all,
>
> I am working adding XPointer functionality to XInclude when I found that the
> checking of XInclude test output had been disabled by "mrglavas" on Oct 17.
>
> The tests typically throw the following errors:
>
> [Error] tests.xsd:22:29: src-resolve: Cannot resolve the name 'xml:base' to
> a(n) 'attribute declaration' component.
> [Error] tests.xsd:22:29: s4s-elt-invalid-content.1: The content of
> 'childType' is invalid.  Element 'attribute' is invalid, misplaced, or
> occurs too often.
> [Error] tests.xsd:56:30: s4s-elt-invalid-content.1: The content of
> '#AnonType_elem' is invalid.  Element 'attribute' is invalid, misplaced, or
> occurs too often.
> [Error] tests.xsd:40:33: s4s-elt-invalid-content.1: The content of
> '#AnonType_viewmyRoot' is invalid.  Element 'attribute' is invalid,
> misplaced, or occurs too often.
>
> which all seem to be related to three instance of the following line in
> tests,xsd
>
> <attribute ref="xml:base"/>
>
> I commented these lines out, and restored the comparison code in Tests.java,
> and the tests run clean.
>
> Perhaps someone can educate me on whats wrong with these lines, or a better
> solution than just commenting the lines out of tests.xsd.
>
>
> Regards
> Dean
>
>
>
> INTERGRAPH
> Dean Chalker
> Distinguished Design Engineer (R&D)
> IntelliWhere Product Development Center
> Intergraph Mapping and Geospatial Solutions
> Level 3/299 Coronation Drive
> Milton  Brisbane
> Austalia  4064
> Phone:  +61 (0)7 3510 8918
> Fax:    +61 (0)7 3510 8901
> E-mail: dean.chalker@intelliwhere.com <ma...@intelliwhere.com>
>
> URL: imgs.intergraph.com

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org