[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webservices-general
Subject:    [jira] [Created] (XMLSCHEMA-56) Element defined in a base type sometimes isn't visited by an XmlSche
From:       "Kevin (JIRA)" <jira () apache ! org>
Date:       2019-01-20 6:28:00
Message-ID: JIRA.13210572.1547965641000.139285.1547965680024 () Atlassian ! JIRA
[Download RAW message or body]

Kevin created XMLSCHEMA-56:
------------------------------

             Summary: Element defined in a base type sometimes isn't visite=
d by an XmlSchemaWalker's visitor
                 Key: XMLSCHEMA-56
                 URL: https://issues.apache.org/jira/browse/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

Hi,

I have a strange issue where the field in a base type (i.e. one which is ex=
tended by another type) is not visited by the xmlschema-walker. It is stran=
ge 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 th=
at directory and sometimes not!). I cannot for the life of me discern a pat=
tern.

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 happe=
ns).

Please see my=C2=A0attached 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 be=
haviour also occurred when "unused.xsd" defined a used type, I just simplif=
ied that part away for this test. My java file "Main.java" creates an "XmlS=
chemaWalker" with a visitor "MyVisitor". "MyVisitor" prints the element nam=
e 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 "b=
aseElement" is visited when you test the project, please create a few direc=
tories, 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 d=
irectory in which you test, you need to change the "xsdDirectory" string at=
 the start of "testWalker()" in "Main.java"* - the xsd files are in the "xs=
d" subdirectory of the project. You'll also need xmlschema-core and xmlsche=
ma-walker jar files on the classpath.

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

cheers,

Kevin.

=C2=A0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic