xml-maven-plugin : multiple schema validation
---------------------------------------------

                 Key: MOJO-1699
                 URL: https://jira.codehaus.org/browse/MOJO-1699
             Project: Mojo
          Issue Type: Improvement
          Components: xml
    Affects Versions: xml-maven-plugin 1.0
         Environment: $ mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 23:16:01+0400)
Java version: 1.6.0_21
Java home: D:\soft\java\jdk\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
            Reporter: Nickolay Martinov
            Assignee: Jochen Wiedmann
         Attachments: xml-maven-plugin.multischema-validate.patch

Sometimes there are elements of type any in schema. Still often there is schema 
for elements that are actually put in "any". There should be way to validate 
such documents:
<?xml version="1.0" encoding="UTF-8"?>
<tns:envelop xmlns:tns="http://www.example.org/envelop";>
        <data:data xmlns:data="http://www.example.org/data";>
                <data:content>123</data:content>
        </data:data>
</tns:envelop>
Here tns:envelop is any with lax content processing. Currently plugin does not 
allow to check that data:data contains correct data (testing always passes). 
Submitting all schema to validator fixes this problem and error for following 
file is correctly reported:
<?xml version="1.0" encoding="UTF-8"?>
<tns:envelop xmlns:tns="http://www.example.org/envelop";>
        <data:data xmlns:data="http://www.example.org/data";>
        </data:data>
</tns:envelop>
As:
[INFO] While parsing 
xml-maven-plugin\target\it\it10-multischema-validate\src\test\resources\2invalid.xml,
 at 
file:/xml-maven-plugin/target/it/it10-multischema-validate/src/test/resources/2invalid.xml,
 line 4,  column 14: cvc-complex-type.2.4.b: The content of element 'data:data' 
is not complete. One of '{"http://www.example.org/data":content}' is expected.



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to