
A document type definition (DTD) is used for writing the provider.xml file- when new libraries are developed. The provider.xml is consequently parsed to follow the grammar of library.provider.dtd. This DTD is a rule for defining provider specific properties for libraries, such as the library name, component name, version number, external references, and so on.
The library.provider.dtd defines the following elements:
The usage of each tag is explained in detail as follows:
<!--This is the XML DTD for the library provider descriptor.-->
<!ELEMENT provider-descriptor (display-name, component-name, description?, major-version, minor-version, micro-version, provider-name?, group-name?, references?, jars)
<!--A short name that will be displayed by the J2EE Engine tools (Visual Administrator, Deploy Tool and so on).Example:<display-name>Employee Self Library</display-name>-->
<!ELEMENT display-name (#PCDATA)>
<!--This element specifies the name under which the component is registered in the Service Container.-->
<!ELEMENT component-name (#PCDATA)>
<!--The description element is used by the library provider to describe the parent element.-->
<!ELEMENT description (#PCDATA)>
<!--The major number of the library version.-->
<!ELEMENT major-version (#PCDATA)>
<!--The minor number of the version of the library.-->
<!ELEMENT minor-version (#PCDATA)>
<!--The micro number of the library version.-->
<!ELEMENT micro-version (#PCDATA)>
<!--The provider-name element contains the name of the library provider.-->
<!ELEMENT provider-name (#PCDATA)>
<!--This element specifies the name of the component group.-->
<!ELEMENT group-name (#PCDATA)>
<!--The references element contains a set of reference names to other services, libraries or interfaces.-->
<!ELEMENT references (reference)*>
<!--The reference element contains a reference name to another service, library or interface that is used in the library source code (explicit or implicit).-->
<!ELEMENT reference (#PCDATA)>
<!--A mandatory attribute that shows the type of the referred component.-->
<!ATTLIST reference type (service|library|interface) #REQUIRED>
<!--This attribute is mandatory and is used to show that the classes of the referred component can be used directly by the provided library component without additional conditions.-->
<!ATTLIST reference strength (weak) #REQUIRED>
<!--Reference provider-name attribute specifies the name of the component provider that the library refers to.-->
<!ATTLIST reference provider-name CDATA #IMPLIED>
<!--The jars element contains a set of jar-name tags that describe the binary JAR archives of the library.-->
<!ELEMENT jars (jar-name)+>
<!--The name of the JAR archive file that contains the whole library binary code or just part of it.
Example:
<jars>
<jar-name>
mylibrary.jar
</jar-name>
</jars>
-->
<!ELEMENT jar-name (#PCDATA)>