|
Page Created :
FELIX :
Using XML Schemas
Using XML Schemas has been created by Clement Escoffier (Sep 10, 2008). Content:Using XML SchemasVersion 0.9.0-SNAPSHOT iPOJO provides XML schemas to check iPOJO descriptors (i.e. metdata.xml). Several schemas are provided in order to describe the core syntax, compositions and external handlers.
Note: the schemas are also provided inside implicated bundles. <ipojo
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/0.9.0-SNAPSHOT/core.xsd"
xmlns="org.apache.felix.ipojo">
<component ....>
</component>
</ipojo>
First, declares the 'XMLSChema-instance' namespace. Then, declares used namespaces and schemas in the 'xsi:schemaLocation' attribute. This attribute contains pairs 'namespace url' separated by spaces. Finally, declares the default namespace to "org.apache.felix.ipojo". <ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/0.9.0-SNAPSHOT/core.xsd org.apache.felix.ipojo.extender http://felix.apache.org/ipojo/schemas/0.9.0-SNAPSHOT/extender-pattern.xsd" xmlns="org.apache.felix.ipojo" xmlns:extender="org.apache.felix.ipojo.extender"> <component classname="org.apache.felix.ipojo.junit4osgi.impl.JunitExtender"> <extender:extender extension="Test-Suite" class="code-quote">"onBundleArrival" class="code-quote">"onBundleDeparture" /> <callback transition="invalidate" method="stopping" /> <callback transition="validate" method="starting" /> <provides /> </component> <instance component="org.apache.felix.ipojo.junit4osgi.impl.JunitExtender" /> </ipojo> The only difference is contained in the 'schemaLocation' attribute, which contains several pairs. You also need to declare the namespace of the used external handler. |
Unsubscribe or edit your notifications preferences
