Dear all,

This is a question about code generation.
I wonder if it is possible to skip the generation of Java code for schema files 
which are included by others.

Example:

** Schema foo.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
    xmlns:tns="http://foo.bar";
    targetNamespace="http://foo.bar"; version="1.0">

    <xs:include schemaLocation="bar.xsd" />
.......

I would like to skip the code generation of the types declared in bar.xsd as I 
already generated them in a separate artefact (which is on the classpath).

I first tried to exclude the schema in the jibx-maven-plugin section of my 
pom.xml

    <excludeSchemas>
        <exludeSchema>bar.xsd</exludeSchema>
    </excludeSchemas>
    
but this does not exlude the schema (I think because it is included by another 
one).

Then I tried to explicitly exlude the generation of the types declared in 
bar.xsd in a custom schema configuration with:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<schema-set xmlns:xs="http://foo.bar";>
    <schema name="bar.xsd" excludes="myType" />
</schema-set>

This prevents the generation of "myType" but also skips generating all 
occurences (usage) of this type in foo.xsd (e.g. as elements for declared types 
in foo.xsd).

So my question: Is it possible to skip the generation of Java source code for 
special schema files (or even types) which are included by other schemas - 
without also skipping all usage occurences of these types?

Thanks for any help
  Klaus

  
___________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to