Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.6 released

OpenOfficeModule Description


Contents

Overview
Description of module-description.dtd
Integration of the module description in the component
Example

Overview

A module description provides detailed information about the module and its supported components, which is accessible in different manners. The included description is available by reading directly, by generating a short html-description, or by making an environment check for supported components to check if all needed types and services are available in the environment where they will be used. This environment check could take place during registration/installation or during a separate consistency check for a component.

Description of module-description.dtd

module-description.dtd

<?xml version="1.0" encoding="UTF-8"?>
<!-- ... -->

<!ENTITY % component-description-optional "reference-docu|service-dependency|type">
<!ENTITY % module-description-optional "project-build-dependency|runtime-module-dependency|(%component-description-optional;)">
<!ELEMENT module-description (module-name,component-description+,(%module-description-optional;)*)>
<!ELEMENT component-description (author,name,description,loader-name,supported-service+,(%component-description-optional;)*) >

<!ELEMENT author (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT description (#PCDATA)>

<!ELEMENT reference-docu EMPTY>
<!ATTLIST reference-doc
xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink/Namespace"
xlink:type (simple) #FIXED "simple"
xlink:href CDATA #REQUIRED
xlink:role NMTOKEN #IMPLIED
xlink:title CDATA #IMPLIED >

<!ELEMENT module-name (#PCDATA)>
<!ELEMENT loader-name (#PCDATA)>
<!ELEMENT supported-service (#PCDATA)>
<!ELEMENT service-dependency (#PCDATA)>
<!ELEMENT project-build-dependency (#PCDATA)>
<!ELEMENT runtime-module-dependency (#PCDATA)>
<!ELEMENT language (#PCDATA)>
<!ELEMENT status EMPTY >
<!ATTLIST status value (under_construction | alpha | beta | final) #REQUIRED>
<!ELEMENT type (#PCDATA)>


author The name of the person who has implemented the component
name

The implementation name of a component.
(e.g., com.sun.star.comp.stoc.ORegistryServiceManager)

description

A short description which should be understandable to all people in the development process.

reference-docu specify an xlink to further documentation.
module-name

The name of a shared library without the system prefix (lib) or postfix (.so, .dll, ...)
(e.g., smgr). An executable name. A Java class file name or the JAR name.

loader-name

The service name of the loader, which should be used to load the component.
(e.g., com.sun.star.loader.SharedLibrary)

supported-service

All services supported by this component.
(e.g., com.sun.star.registry.SimpleRegistry)

service-dependency

All services need this implementation.
(e.g., com.sun.star.lang.RegistryServiceManager (very often the service manager component is used) )

project-build-dependency

All projects which are necessary.
(e.g., cppuhelper, cppu, vos, sal, stl)

runtime-module-dependency

All projects which are used at runtime
(e.g., cppu1, vos1$(COM), sal1)

language

The language in which the component is implemented.
(e.g., C++)

status

The implementation state of the component.
(under construction, alpha, beta, or final)

type

Which type descriptions are necessary to enable communication with other environments. To ensure that the bridges can create proxies and stubs, they must get the type description of the used types.
The special term "comprehensive" means that all type descriptions are built into the component.
The type descriptions must be installed in the type repository (applicat.rdb).

*$(COM) is the extension of the C++ compiler.
*$(SUPDCP) is the extension of a module which depends on an SUPD and the platform.

All components written in C++ need the bridge library from uno to C++ for scripting or remote communication. These are the msci_uno.dll with the MSC4.2 and the MSC6.0; and the libsunpro5_uno.so library with the SunPro 5.0 compiler.

Integration of the module description in the module(component)

Normally, the module description should also be available by calling the module itself. In case of an implementation as a shared library, the shared library should export a C-function which provides this xml description as a return value of type sal_Char*. This function could be generated from the xml description by using the tool xml2cmp. The generated source file must be built with the component and the C-function component_getDescriptionFunc must be exported.

Example for a simple registry component:

xml2cmp -func simreg_desc.cxx simreg.xml


Example:

Description for the simple registry component, simreg.xml:

<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE module-description PUBLIC "-//W3C//DTD HTML 3.2//EN" "module-description.dtd">

<module-description xmlns:xlink=""http://www.w3.org/1999/xlink">
<module-name> simreg </module-name>
<component-description>

<author> Juergen Schmidt </author>
<name> com.sun.star.comp.stoc.SimpleRegistry </name>

<description>
This component provides access to a simple hierarchical registry. The registry based on one registry file.
</description>

<loader-name> com.sun.star.loader.SharedLibrary </loader-name>
<language> c++ </language>
<status value="final"/>

<supported-service> com.sun.star.registry.SimpleRegistry </supported-service>

<type> com.sun.star.lang.XTypeProvider </type>
<type> com.sun.star.lang.XServiceInfo </type>
<type> com.sun.star.lang.XSingleServiceFactory </type>
<type> com.sun.star.lang.XMultiServiceFactory </type>
<type> com.sun.star.registry.XSimpleRegistry </type>
<type> com.sun.star.registry.XRegistryKey </type>
<type> com.sun.star.uno.XAggregation </type>
<type> com.sun.star.uno.XWeak </type>
<type> com.sun.star.uno.TypeClass </type>

</component-description>

<project-build-dependency> cppuhelper </project-build-dependency>
<project-build-dependency> cppu </project-build-dependency>
<project-build-dependency> registry </project-build-dependency>
<project-build-dependency> store </project-build-dependency>
<project-build-dependency> vos </project-build-dependency>
<project-build-dependency> sal </project-build-dependency>

<runtime-module-dependency> cppuhelper </runtime-module-dependency>
<runtime-module-dependency> cppu1 </runtime-module-dependency>
<runtime-module-dependency> reg1 </runtime-module-dependency>
<runtime-module-dependency> store1 </runtime-module-dependency>
<runtime-module-dependency> vos1$(COM) </runtime-module-dependency>
<runtime-module-dependency> sal1 </runtime-module-dependency>

</module-description>


Author: Jürgen Schmidt ($Date: 2004/10/29 07:25:34 $)
Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.


Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.