.xsdconfig file
Best way to describe the the format of .xsdconfig file is to look at it's schema. Documentation elements contain information on special values like ##local, ##any or *
.
Examples
Rename package
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> <xb:namespace uri="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> <xb:package>org.apache.xmlbeans.impl.xb.xmlconfig</xb:package> </xb:namespace> </xb:config>
Changes the default package name of the generated classes and interfaces to the specified one.
Prefix/Suffix of generated interface names
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:ep="http://openuri.org/easypo"> <xb:namespace uri="http://openuri.org/easypo"> <xb:package>com.easypo</xb:package> </xb:namespace> <xb:namespace uriprefix="http://openuri.org/eas"> <xb:prefix>Xml</xb:prefix> </xb:namespace> <xb:namespace uriprefix="http://openuri.org/easy"> <xb:suffix>Bean</xb:suffix> </xb:namespace> </xb:config>
Changes the names of the generated interfaces by adding the prefix and suffix.
Name change
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:jira="http://jira/xmlbeans98"> <!--<qname> specifies a Java class name for a Qualified name --> <xb:qname name="jira:childElement" javaname="QNameChanged"/> <xb:qname name="jira:a-root" javaname="TheRoot"/> </xb:config>
Changes the default name of the java interface.
Extension of generated interface
<xb:extension for="*"> <xb:interface name="xmlobject.extensions.interfaceFeature.readOnlyBean.existing.IFoo"> <xb:staticHandler>xmlobject.extensions.interfaceFeature.readOnlyBean.existing.FooHandler</xb:staticHandler> </xb:interface> </xb:extension>
See ExtensionInterfacesFeature for details.
- PrePost extensions*
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> <xb:extension for="*"> <xb:interface name="xmlobject.extensions.prePostFeature.readOnlyBean.existing.IFoo"> <xb:staticHandler> xmlobject.extensions.prePostFeature.readOnlyBean.existing.FooHandler </xb:staticHandler> </xb:interface> <xb:prePostSet> <xb:staticHandler> xmlobject.extensions.prePostFeature.readOnlyBean.existing.FooHandler </xb:staticHandler> </xb:prePostSet> </xb:extension> </xb:config>
See PrePostSetFeature for details.