xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Xmlbeans Wiki] Update of "XsdConfigFile" by fx
Date Fri, 01 Aug 2008 21:56:25 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlbeans Wiki" for change notification.

The following page has been changed by fx:
http://wiki.apache.org/xmlbeans/XsdConfigFile

The comment on the change is:
Adding .xsdconfig file page

New page:
= .xsdconfig file =

Best way to describe the the format of .xsdconfig file is to look at it's [http://svn.apache.org/viewvc/xmlbeans/trunk/src/configschema/schema/xmlconfig.xsd?view=markup
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.

----

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org


Mime
View raw message