ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin (JIRA)" <>
Subject [jira] [Created] (XMLSCHEMA-56) Element defined in a base type sometimes isn't visited by an XmlSchemaWalker's visitor
Date Sun, 20 Jan 2019 06:28:00 GMT
Kevin created XMLSCHEMA-56:

             Summary: Element defined in a base type sometimes isn't visited by an XmlSchemaWalker's
                 Key: XMLSCHEMA-56
             Project: XmlSchema
          Issue Type: Bug
    Affects Versions: 2.2.4, 2.2.3
         Environment: openSUSE Leap 15

open-jdk 11 (but I've tried 1.8 and same thing happens)

xmlschema 2.2.3 and 2.2.4 (core and walker)
            Reporter: Kevin
         Attachments: walk.tar


I have a strange issue where the field in a base type (i.e. one which is extended by another
type) is not visited by the xmlschema-walker. It is strange because it only happens in some
instances of the test project (i.e. when I copy all project files to a new directory it will
sometimes happen in that directory and sometimes not!). I cannot for the life of me discern
a pattern.

This occurs with both 2.2.3 and 2.2.4 of xmlschema (core and walker). I am on openSUSE Leap
15 and openjdk 11 (but I've tried 1.8 and same thing happens).

Please see my attached tar file. There are two xsd files in the "xsd" directory. The first
is "test.xsd". It defines a type "Test" which extends the type "Base". The type "Base" has
a field "baseElement". The "test.xsd" file also includes another xsd file "unused.xsd" which
is empty, but the behaviour also occurred when "unused.xsd" defined a used type, I just simplified
that part away for this test. My java file "" creates an "XmlSchemaWalker" with a
visitor "MyVisitor". "MyVisitor" prints the element name when it visits an element.

*The bug I'm seeing* is that "baseElement" is not visited by the visitor in some instances
of the project. The root element ("test") is visited. If "baseElement" is visited when you
test the project, please create a few directories, copy the project files into each, and see
if you can reproduce the error (this is what I mean by "instances" of the project). *NOTE:
in each directory in which you test, you need to change the "xsdDirectory" string at the start
of "testWalker()" in ""* - the xsd files are in the "xsd" subdirectory of the project.
You'll also need xmlschema-core and xmlschema-walker jar files on the classpath.

I hope you can reproduce the bug. Please let me know if you need more info.




This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message