C.4 Sample Distribution.xml Documents

Novell Linux Point of Service Distribution Source Documents can be defined in an XML editor or in a standard text editor. XML editors provide the advantage of a graphical user interface. Typically, XML elements are presented as graphical objects and are visually organized in the schema hierarchy. Element attributes are defined as fields within the element objects. After the XML template is defined, the template can be saved as a standard XML document. The graphics in Section 9.2.3, Distribution Source Document (Distribution.xml) were taken in an XML editor. They show XML schema in a graphical format.

Distribution Source Documents can also be defined as XML documents in standard text format. These documents are more complicated because the schema hierarchy and element attributes are defined through the document syntax and organization. The following documents are presented in text format.

The following are examples of Distribution Source Documents:

C.4.1 Distribution.xml Template

Figure C-2 is a graphical representation of the Distribution Source Document template. It demonstrates the basic organization of Distribution Source Documents.

Figure C-2 Distribution.xml schema structure

Distribution.xml schema structure

The following is a textual representation of the Distribution Source Document template. It demonstrates the basic organization and syntax of Distribution Source Documents; however, it is not populated with actual data.

<xs:element name="Distribution">
   <xs:complexType>
      	<xs:sequence>
        	<xs:element name="ImageClass" maxOccurs="unbounded">
           	<xs:complexType>
              <xs:all>
                 		<xs:element name="Kernel">
                    <xs:complexType>
                    			<xs:attribute name="Name" type="xs:string"
                       use="required"/>
                    		<xs:attribute name="Version" type="xs:string"
                       use="required"/>
                    		<xs:attribute name="Path" type="xs:string"
                       use="optional"/>
                    </xs:complexType>
              		   </xs:element>
                 	<xs:element name="SourceList">
                    <xs:complexType>
                    		<xs:sequence>
                    			<xs:element name="Source" maxOccurs="unbounded">
                    <xs:complexType>
                    			<xs:attribute name="URI" type="xs:string" 
                       use="required"/>
                    			<xs:attribute name="Order" type="xs:int" 
                       use="required"/>
                    </xs:complexType>
              	      </xs:element>
           	         </xs:sequence>
                    </xs:complexType>
                 </xs:element>
              </xs:all>
	     <xs:attribute name="Name" type="xs:string" use="required"/>
           </xs:complexType>
        </xs:element>
      	</xs:sequence>
      	<xs:attribute name="SchemaVersion" type="xs:string"
         use="required" fixed="1"/>
      	<xs:attribute name="SchemaRevision" type="xs:string"
         use="required" fixed="2"/>
   </xs:complexType>
</xs:element>

C.4.2 Defined Distribution.xml Document

The following Distribution Source Document is populated with image data. It illustrates how a Distribution Source Document can be defined.

<?xml version="1.0" encoding="UTF-8"?>
<!-- generated by poscdtool -->
<Distribution xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/SLES/POS/Distribution.xsd" SchemaVersion="1" SchemaRevision="2">
   <ImageClass Name="nld">
      <Kernel Name="kernel-SLRS" Path="/opt/SLES/POS/pac"
           Version="2.6.5-7.155"/>
      <SourceList>
         <Source URI="/opt/SLES/POS/maintenance/nld" Order="0"/>
         <Source URI="/opt/SLES/POS/dist/NLD9/SP1/CD1" Order="1"/>
         <Source URI="/opt/SLES/POS/dist/NLD9/SP1/CD2" Order="2"/>
         <Source URI="/opt/SLES/POS/dist/NLD9/FCS/CD1" Order="3"/>
         <Source URI="/opt/SLES/POS/dist/NLD9/FCS/CD2" Order="4"/>
         <Source URI="/opt/SLES/POS/dist/NLD9/FCS/CD3" Order="5"/>
         <Source URI="/opt/SLES/POS/dist/NLPOS9/FCS/CD4" Order="6"/>
      </SourceList>
   </ImageClass>
   <ImageClass Name="sles">
      <Kernel Name="kernel-SLRS" Path="/opt/SLES/POS/pac"
           Version="2.6.5-7.155"/>
      <SourceList>
         <Source URI="/opt/SLES/POS/maintenance/sles" Order="0"/>
         <Source URI="/opt/SLES/POS/dist/NLPOS9/FCS/CD1" Order="1"/>
         <Source URI="/opt/SLES/POS/dist/NLPOS9/FCS/CD2" Order="2"/>
         <Source URI="/opt/SLES/POS/dist/NLPOS9/FCS/CD4" Order="3"/>
         <Source URI="/opt/SLES/POS/dist/SLES9/FCS/CD1" Order="4"/>
         <Source URI="/opt/SLES/POS/dist/SLES9/FCS/CD2" Order="5"/>
         <Source URI="/opt/SLES/POS/dist/SLES9/FCS/CD3" Order="6"/>
      </SourceList>
   </ImageClass>
</Distribution>