Software components DTD


This Document Type Declaration (DTD) contains the structure of the elements needed to describe software components. XML documents conforming to this structure are provided to and returned by the i5/OS Registered Application Information Repository APIs.

If a character encoding is specified in your XML document, it must be specified in the XML declaration. If the encoding is not specified then the XML processor will assume UTF-8 as the character encoding.

The DTD for the Registered Application Information Repository APIs is contained in the stream file located at /QIBM/XML/DTD/QszRegAppInfoRepository.dtd.

<?xml version='1.0' encoding='utf-8' ?>
 
<!-- RegAppInfoRepository must be the root element of the XML document
     Contains  0 to n Component elements -->
<!ELEMENT RegAppInfoRepository  (Component)*>
 
<!-- The RegAppInfoRepository element also must contain a
     DTDVersion attribute -->
<!ATTLIST  RegAppInfoRepository  DTDVersion CDATA #REQUIRED >
 
<!--  Component element defines a separately installable piece of an
      application. May contain an ExtendedData element -->
<!ELEMENT Component     (ExtendedData?)>
 
<!-- The component also must contain the following attribute list:
       ProductName   - describes the name of the product the Component belongs to
       ComponentName - describes the name of the component
 
     Optionally it may contain the following attribute list:
       ComponentVersion   - the version of the component
       Instance           - used to differentiate among copies of the same
                            component
       FeatureName        - describes the feature of the component
       ComponentVendor    - describes the name of the vendor who created the
                            component
       PackagedProduct    - indicates this component is an i5/OS packaged
                            product,  "0" means the component is not an i5/OS
                            packaged product "1" means the component is an
                            i5/OS packaged product, if the attribute
                            is not specified then "0" is assumed  -->
<!ATTLIST  Component  ProductName        CDATA #REQUIRED
                      ComponentName      CDATA #REQUIRED
                      ComponentVersion   CDATA #IMPLIED
                      Instance           CDATA #IMPLIED
                      FeatureName        CDATA #IMPLIED
                      ComponentVendor    CDATA #IMPLIED
                      PackagedProduct    (0|1|_) "0" >
 
<!--  ExtendedData element contain additional information related to the
      component. May contain a Shared element, a ProductDescription element,
      a Files element and zero or more AdditionalValue elements -->
<!ELEMENT ExtendedData (Shared?,
                        ProductDescription?,
                        Files?,
                        AdditionalValue*)>
 
<!-- The ExtendedData element may contain the following attribute list:
       Installed          - indicates if the component is installed, "0" means
                            not installed "1" means installed, if the attribute
                            is not specified then installed ("1") is assumed
       Supported          - indicates if the component is supported,  "0" means
                            not supported, "1" means supported, this is attribute
                            is optional
       UninstallInfo      - describes the procedure to uninstall the component
       LastFixPackApplied - contains the last fixpack applied to the component
       InstallerType      - describes the type of installer
       CCSID              - the CCSID of the information provided         -->
<!ATTLIST  ExtendedData  Installed          (0|1|_) "1"
                         Supported          (0|1|_) #IMPLIED
                         UninstallInfo      CDATA #IMPLIED
                         LastFixPackApplied CDATA #IMPLIED
                         InstallerType      CDATA #IMPLIED
                         CCSID              CDATA #IMPLIED >
 
<!-- Shared element it should be present when this is a shared component   -->
<!ELEMENT Shared      (SharingComponent)+>
 
<!-- SharingComponent element contains information of the component
 which is using this component, although this is an empty element,
 the information is provided as attributes -->
<!ELEMENT SharingComponent  EMPTY>
 
<!-- The sharing component must contain the following attribute list:
           ProductName, ComponentName
     Optionally it may contain the following attribute list:
           ComponentVersion, Instance, FeatureName, ComponentVendor       -->
<!ATTLIST  SharingComponent  ProductName      CDATA #REQUIRED
                             ComponentName    CDATA #REQUIRED
                             ComponentVersion CDATA #IMPLIED
                             Instance         CDATA #IMPLIED
                             FeatureName      CDATA #IMPLIED
                             ComponentVendor  CDATA #IMPLIED >
 
<!-- ProductDescription element contains the description of the product  -->
<!ELEMENT ProductDescription EMPTY>
 
<!-- The ProductDescription element must contain the following
     attribute list:
           MessageLibrary - contains the name of the message file library
           MessageFile    - contains the name of the message file
           MessageID      - the message id which contains the description
                            of the product       -->
<!ATTLIST  ProductDescription  MessageLibrary CDATA #REQUIRED
                               MessageFile    CDATA #REQUIRED
                               MessageID      CDATA #REQUIRED >
 
<!-- Files element contains the list of the application files
     at least one Directory element should be specified when this
     element is used to add/update information in the Registered Application
     Information Repository, when information about all files wants to be
     removed from the repository then this element can be empty  -->
<!ELEMENT Files              (Directory)*>
 
<!-- Directory element contains a full directory path name (as an attribute)
     and may contain a set of FileName elements  -->
<!ELEMENT Directory          (FileName)*>
 
<!-- The Directory element must contain the following attribute:
           DirectoryName - contains the full directory path name  -->
<!ATTLIST  Directory  DirectoryName     CDATA #REQUIRED >
 
<!-- FileName element contains the name of a file   -->
<!ELEMENT FileName           (#PCDATA)>
 
<!-- AdditionalValue element can be used to store any information useful to the
     installer or application  -->
<!ELEMENT AdditionalValue   EMPTY>
 
<!-- The AdditionalValue element must contain the following attribute:
           ValueName  - The name of a user defined piece of information
 
     Optionally it may contain the following attributes:
           ValueID - Should be specified if the user wants to store more than
                     one additional value with the same ValueName.
           Value   - contains a user defined value associated to the ValueName -->
<!ATTLIST  AdditionalValue ValueName CDATA #REQUIRED
                           ValueID   CDATA #IMPLIED
                           Value     CDATA #IMPLIED >

DTD Element and Attribute Descriptions   The maximum length of each element or attribute value is 15360 UCS-2 characters unless otherwise specified.

AdditionalValue element

This element has been defined to store information that is only useful to the installer or application. Any number of repetitions of this element can be defined. This element has to contain the following attribute:

  • ValueName

Optionally it may contain one of each of the following attributes:

  • ValueID
  • Value
Here is an example of the use of this element for i5/OS packaged products:
<AdditionalValue ValueName="PrimLangLoadId" Value="2924"/>
Although PrimLangLoadId is not an element defined by the DTD, it will be stored as an AdditionalValue to improve queries.

A user who wants to retrieve this value can use the list API and include the following in the input:

<AdditionalValue ValueName="PrimLangLoadId" Value=""/>
or
<AdditionalValue ValueName="PrimLangLoadId" />

Another use of the AdditionalValue element can be for an installer to record the progress of an install. For example, an installer could be written to call the update API several times during the installation process, as follows:

  1. The installer registers the component being installed and also defines an additional value called "State" and sets its value to "Registered". (The example only shows the AdditionalValue element).
    <AdditionalValue ValueName="State" Value="Registered"/>
    
  2. The installer creates a set of directories and then calls the update API to set the AdditionalValue element with the "State" ValueName to a new Value "DirsCreated".
    <AdditionalValue ValueName="State" Value="DirsCreated"/>
    
  3. The installer copies all files to the corresponding directories and calls the update API to set the "State" tag to "FilesCopied"
    <AdditionalValue ValueName="State" Value="FilesCopied"/>
    
  4. The installer creates some user profiles to finish its installation and then calls the update API to update the "State" to "Complete".
    <AdditionalValue ValueName="State" Value="Complete"/>
    

The previous example was used only to illustrate a possible use for the AdditionalValue element. This does not mean that "State", "Registered", "DirsCreated", and so on are elements or attributes defined by this DTD. These values are free format, so they may contain any character value.

CCSID attribute

The CCSID for the values specified in the attribute and element values.

Component element

This element describes a software component - a separately installable piece of an application. This element must contain the following attributes:

  • ProductName
  • ComponentName

This element may contain the following attributes:

  • ComponentVersion
  • Instance
  • FeatureName
  • ComponentVendor
  • PackagedProduct

This element may also contain an ExtendedData element.

ComponentName attribute

The name of the component. It is composed of character data and its length must not be greater than 256 UCS-2 characters.

ComponentVendor attribute

The name of the creator of the component. It is composed of character data and its length must not be greater than 256 UCS-2 characters.

ComponentVersion attribute

The version of the component. It is composed of character data and its length must not be greater than 64 UCS-2 characters.

DTDVersion attribute

The version of the DTD the XML document should be validated against.

Directory element

This element identifies a directory and optionally a set of files that are part of the software component. This element has to contain a DirectoryName attribute and zero or more FileName elements.

When FileName elements are specified it means they belong in the directory named in the DirectoryName attribute of the Directory element where they were specified.

The following is an example of how a user could specify this element.

Suppose a user wants to register the following:

    /ProgramFiles/XYZTools/Editor/bin            (directory)
    /ProgramFiles/XYZTools/Editor/bin/edit1.exe  (file)
    /ProgramFiles/XYZTools/Editor/bin/edit2.exe  (file)
    /ProgramFiles/XYZTools/Editor/bin/edit3.exe  (file)
    /ProgramFiles/XYZTools/Editor/bin/edit4.exe  (file)
    /ProgramFiles/XYZTools/Editor/bin/edit5.exe  (file)
    /ProgramFiles/XYZTools/Editor/Personal       (directory)

The Files element in the XML document could be specified as follows:

 <Files>
    <Directory DirectoryName="/ProgramFiles/XYZTools/Editor/bin">
       <FileName>edit1.exe</FileName>
       <FileName>edit2.exe</FileName>
       <FileName>edit3.exe</FileName>
       <FileName>edit4.exe</FileName>
       <FileName>edit5.exe</FileName>
    </Directory>
    <Directory DirectoryName="/ProgramFiles/XYZTools/Editor/Personal">
    </Directory>
 </Files>

DirectoryName attribute

The full path name of a directory that is part of this component. It is composed of character data and its length must not be greater than 15360 UCS-2 characters.

ExtendedData element

This element contains all other information related to the component. None of the attributes or elements it contains are required. One of each of the following attributes may be contained in this element:

  • Installed
  • Supported
  • UninstallInfo
  • LastFixPackApplied
  • InstallerType
  • CCSID

It may also contain a Shared element, a ProductDescription element, a Files element and zero or more AdditionalValue elements.

FeatureName attribute

The component feature. It is composed of character data and its length must not be greater than 64 UCS-2 characters.

FileName element

The name of a file that is part of the software component. It is composed of character data and its length must not be greater than 256 UCS-2 characters.

Files element

This element contains the list of directories and files belonging to the software component. It is composed of 1 to n Directory elements.

Installed attribute

This attribute indicates if this component is currently installed. It can be the character value "0" which means the component is not installed or it can be "1" which means the component is installed. When this attribute is not present or it is empty then the default value is "1" which means installed.

InstallerType attribute

The type of installer used to install this software component. It is composed of character data. Some types of installers are ISJE and RSTLICPGM.

Instance attribute

The component Instance is useful when a user wants to install more than one copy of the same component on the system. An installer can use this attribute to store any value that allows the installer to differentiate among copies. For example, the path name where this component was installed might be used. This attribute is composed of character data and its length must not be greater than 256 UCS-2 characters.

LastFixPackApplied attribute

The last fix pack applied for the component. It is composed of character data.

MessageID attribute

The identifier of the message that describes the product option. Its length must not be greater than 7 UCS-2 characters.

MessageFile attribute

The name of the message file containing the messages that describe the product and its options. The message file for the base option is considered the message file for the product. Its length must not be greater than 10 UCS-2 characters.

MessageLibrary attribute

The name of the library for the message file that contains the messages describing the product and its options. Its length must not be greater than 10 UCS-2 characters.

PackagedProduct attribute

This attribute indicates if the component is a native i5/OS License Program Product including the i5/OS Operating System. It can be the character value "0" which means the component is not a native i5/OS License Program Product or it can be "1" which means it is. When this attribute is not present then the default value is "0".

ProductName attribute

This is the name of the software product the component belongs to. It is composed of character data and its length must not be greater than 256 UCS-2 characters.

ProductDescription element

This element contains the description of the product. It has to contain the following attributes:

  • MessageLibrary
  • MessageFile
  • MessageID

RegAppInfoRepository element

This is the root element of the DTD. There must be 1 of these elements in each XML object. This element must contain a DTDVersion attribute and may contain 1 or more Component elements.

Shared element

If present, this element indicates the component is a shared component. Its purpose is to provide an uninstaller with a way to know whether a component is still needed by another product or component. This element contains 1 to n SharingComponent elements.

SharingComponent element

This element identifies the component user of this component. This element has to contain the following attributes:

  • ProductName
  • ComponentName

Optionally it may contain one of each of the following attributes:

  • ComponentVersion
  • Instance
  • FeatureName
  • ComponentVendor

Supported attribute

This attribute indicates if this component is currently supported. It can be the character value "0" which means the component is not supported or it can be "1" which means the component is supported. When this attribute is not present or it is empty then no value is registered in the repository.

UninstallInfo attribute

This attribute can be used to describe how to uninstall the component. It is composed of character data.

Value attribute

This attribute contains additional information related to the software component and it is identified by the ValueName attribute.

ValueID attribute

This attribute should be used to differentiate among additional values (AdditionalValue elements) with the same value name (ValueName attribute).

ValueName attribute

This attribute identifies a user defined piece of information. Its length should not be greater than 256 UCS-2 characters.

Additional Specifications and Restrictions   The percent character (%) and the underline character (_) are allowed only for query purposes.

i5/OS Packaged Products Considerations   When the PackagedProduct attribute is present and has a value of "1", the component is part of an i5/OS packaged product. For example:

 <Component ProductName="5722SM1" ComponentVendor="04 1-800-IBM-SERV"
            FeatureName="0000" ComponentName="5050" PackagedProduct="1">
       ...
       ...
 </Component>
 

The following table describes the mapping of i5/OS Packaged Products information to the elements of the XML document.


Packaged product field Corresponding XML element or attribute Example of original value XML format
Product ID ProductName 5722SM1 <Component ProductName="5722SM1" ...>
Release ComponentVersion V5R1M0 <Component ComponentVersion="V5R1M0" ...>
Load ID ComponentName 5050 <Component ComponentName="5050" ...>
Message File Name

Message File Library

Message ID

ProductDescription QSMUMSG

QSMU

SMU1601

<ProductDescription
      MessageLibrary="QSMU"
      MessageFile="QSMUMSG"
      MessageID="SMU1601" />

Registration ID (type and value) ComponentVendor 04 1-800-IBM-SERV <Component ComponentVendor="04 1-800-IBM-SERV" ...>
Product option Feature *BASE <Component FeatureName="0000" ...>
CCSID CCSID 00037 <CCSID>00037</CCSID>
Installed Primary Library Instance QSMU <Component Instance="/QSYS.LIB/QSMU.LIB" ...>
Delta level AdditionalValue 01 <AdditionalValue ValueName="DeltaLevel" Value="L01"/>
Allow Mixed Release AdditionalValue Y <AdditionalValue ValueName="AllowMixedRelease" Value="Y"/>
Primary Language Load ID AdditionalValue 2924 <AdditionalValue ValueName="PrimLangLoadId" Value="2924"/>
Directory list in PRDLOD Files /XYZ30/bin
<Files>
  <Directory DirectoryName="/XYZ30/bin">
  </Directory>
</Files>

Library list in PRDLOD Files QSMU
<Files>
  <Directory
        DirectoryName="/QSYS.LIB/QSMU.LIB">
  </Directory>
</Files>

Supported Supported Y <ExtendedData Supported="1" ...>
n/a UninstallInfo n/a <ExtendedData UninstallInfo="DLTLICPGM 5722SS1" ...>