Help TOC > Description of XML tags
Description of XML tags

Introduction

This section describes some of the XML elements (tags) that shall be used when writing an XML file for use within DEXlib. A description of how special characters like '>', '½' and 'ä' are written in text sections, is explained here .

This chapter only explains and exemplifies a few of the possible elements. The complete set of elements are defined in the dexlib/dtd/dex/text.ent DTD.

This chapter is divided into two sections;

Basic text tags

This section describes the XML elements (tags) that are used for basic text layout. The following XML elements are described within this section;

Paragraph

Paragraphs are defined by the XML element <p>. This element is the same as the HTML element of the same name. The DTD for the <p> element in DEXlib is;

<!ELEMENT p (%text-elts;)*>

E.g. <p>A new paragraph.</p>

List

Lists are defined by the XML elements <ul> and <ol>. These elements are the same as the HTML elements of the same name. The DTD for the <ul> and <ol> elements in DEXlib is;

<!ELEMENT ul (li+)>
<!ELEMENT ol (li+)>
<!ATTLIST ol
     type (1 | A | a | I | i) "1"
     start CDATA #IMPLIED>
        
<!ELEMENT li (%text-elts;)*>

where <ul> is an unordered list, <ol> is an ordered list and <li> is a list item. The optional 'type' attribute of the ordered list ("ol") specifies the numbering style of the list, and the also optional 'start' attribute specifies the starting point for the list. Without these attributes, numbering is done with ordinary digits starting with "1".

The following XML;

<ol type="i">
  <li>First item.</li>
  <li>Second item.</li>
</ol>

results in;

  1. First item
  2. Second item

Image

Images are defined by the XML element <img>. This element is the same as the HTML element (?) of the same name. The DTD for the <img> element in DEXlib is;

<!ELEMENT img (img.area*)>
<!ATTLIST img
     src    CDATA #REQUIRED
     alt    CDATA #IMPLIED
     width  CDATA #IMPLIED
     master CDATA #IMPLIED>

The 'src' attribute value is the name of the file containing the image to be displayed (should be in the .png format). The 'alt' attribute value is an alternative text shown if the image isn't displayed as intended. The 'width' attribute value is setting the displayed width of the image. The relation between width and height stays the same. The maximum value (?) that should be used is '650'. The 'master' attribute value is the name of the application file used to generate the image.
An example of a correct XML element is;

<img src="path/image.png" 
     alt="descritive text" 
     width="450" 
     master="path/imgsource.ppt" />

Figure

A 'figure' is the combination of an image, some descriptive text and identifiers for the figure. Images are defined by the XML element <figure>. The DTD for the <figure> element in DEXlib is;

<!ELEMENT figure (title, img)>
<!ATTLIST figure
     id      ID    #IMPLIED  
     number  CDATA #IMPLIED>

<!ELEMENT title (%text-elts;)*>

An example of a correct XML element is;

<figure id = "f1" number = "1">
   <title>The OASIS logotype.</title>
   <img src="images/oasislogo.png"
</figure>

This would display as;



Figure 1 —  The OASIS logotype.

Figure 1 —  The OASIS logotype.

Code string

The 'Code string' element is used to represent text displayed at a computer display. This is defined by the XML element <code>. The DTD for the <code> element in DEXlib is;

<!ELEMENT code (#PCDATA)>

Text tagged with the <code> element is displayed like this;

this is some code

The <code> element should also be used when a reference to a specific file within DEXlib is made. The second paragraph in the Introduction contains an example of this.

Code block

The 'Code block' element is used to represent text in different types of computer code. This is defined by the XML element <code_block>. The DTD for the <code_block> element in DEXlib is;

<!ELEMENT code_block (#PCDATA)>

Text between <code_block> and </code_block> is displayed exactly as entered, with spaces, carriage returns and tabs. All DTD and XML examples on this page are written with the <code_block> element.

Screen output

The 'Screen' element is used to represent text displayed at a computer display. This is defined by the XML element <screen>. The DTD for the <screen> element in DEXlib is;

<!ELEMENT  screen (%text-elts;)*>
<!ATTLIST  screen
     xml-space  (default | preserve)  "preserve">

Text tagged with the <screen> element is displayed like this;

this is some screen    output
this is some screen    output with white spaces stripped...

Tags for referencing parts of DEXlib

This section describes the XML elements that can be used to establish hyperlinks between different parts of DEXlib. The following types of links are described within this section;

Link to pages and sections within the PLCS Information Pages

To create a link to an internal DEXlib Information Page, the construct below is used;

<help_ref file="source_page.xml" >Page</help_ref>

To create a link to a specific section within an internal DEXlib Information Page, the section attribute should be used;

<help_ref file="target_page.xml" 
          section="target_section">Page</help_ref>

Link to external web pages

To create a link to an external web page, the construct below is used;

<a href="http://www.iso.org"/>

Parenthesis around the link is automatically added by the style sheet.

Link to a DEX

A link to a DEX is defined by the XML element;

where linkend is

NOTE    A list of all available DEX links is provided in the "Tools" section of DEXlib.

Link to a Capability

A link to a Capability is defined by the XML element;

where linkend is

NOTE    A list of all available DEX links is provided in the "Tools" section of DEXlib.

Link to a Template

A link to a Template is defined by the XML element;

<!--  reference to a capability template -->
<!--    name is the name of the template
When the template is defined in a capability, provide the capability name 
When the template is defined in a business_concept,  provide the business_concept and its context
-->
<!ELEMENT template_ref EMPTY>
<!ATTLIST template_ref
     name             CDATA #REQUIRED
     capability       CDATA #IMPLIED
     context          CDATA #IMPLIED
     business_concept CDATA #IMPLIED>

where linkend is

NOTE    A list of all available DEX links is provided in the "Tools" section of DEXlib.

Link to an EXPRESS object

A link to an EXPRESS object is defined by the XML element;

where linkend is

NOTE    A list of all available DEX links is provided in the "Tools" section of DEXlib.

Link to an external EXPRESS object

A link to an external EXPRESS object is defined by the XML element;

where linkend is

NOTE    A list of all available DEX links is provided in the "Tools" section of DEXlib.

Link to a module

A link to a is defined by the XML element;

where linkend is

NOTE    A list of all available DEX links is provided in the "Tools" section of DEXlib.

Link to an OWL Class

A Link to a class in an RDL is defined by the XML element;

<!-- Setup an URL to a class in an RDL -->
<!ELEMENT rdl_ref (#PCDATA)>

<!-- id: the id of the class being referenced -->
<!ATTLIST rdl_ref 
     id CDATA #REQUIRED>

<!-- urn: the urn of the RDL containing the class referenced -->
<!ATTLIST rdl_ref 
     urn CDATA #REQUIRED>