Examples

The following are examples of rules in the HLProperties.xml configuration file.

The first two examples both define the exact same rule but have small differences in style. Note that the XML files generated by the system are always as verbose as possible (they explicitly define even default values).

<Rule>
 <Filters>
   <Source type="Hull"></Source>
   <Type>Seam</Type>
   <Number from="0" to="100"></Number>
 </Filters>
 <Properties>
     <Symbols>
      <Symbol use="PlanView">SeamSymbol</Symbol>
      <Symbol use="CrossSection">SeamSymbol</Symbol>
      <Symbol use="Production">SeamSymbol</Symbol>
    </Symbols>
   <Production value="Mark"></Production>
   <Projection type="Perpendicular"></Projection>
 </Properties>
</Rule>
<Rule>
 <Filters>
   <Source type="Hull">This text is ignored</Source>
   <Type>SE</Type>
   <Number to="100"></Number>
 </Filters>
 <Properties>
     <Symbols>
      <Symbol use="PlanView">SeamSymbol</Symbol>
      <Symbol use="CrossSection">SeamSymbol</Symbol>
      <Symbol use="Production">SeamSymbol</Symbol>
    </Symbols>
   <Production value="Mark"></Production>
   <Projection type="Perpendicular">This text is also ignored</Projection>
 </Properties>
</Rule>

The following are examples of properties that cannot be parsed:

<Source type=Hall></Source> (invalid attribute value 'Hall')
<Number form=5></Number> (invalid attribute name ‘'form')
<Symbol use=All>Seam:Symbol</Symbol> (invalid file name because it contains ':')

Document Type Definition

The rules described above are encoded in the HLProperties.dtd document type definition file. This file is used by the parser to validate the XML file.

The contents of the definition file are as follows:

<!ELEMENT HullLineProperties (Rule)*>

<!ELEMENT Rule (Filters?, Properties)>

<!ELEMENT Filters (Source?, Type?, Group?, Number?)>

<!ELEMENT Source EMPTY>

<!ATTLIST Source

 type        (Hull | Other | All)        #REQUIRED

>

<!ELEMENT Type (#CDATA)>

<!ELEMENT Group EMPTY>

<!ATTLIST Group

 from        CDATA        "0"

 to        CDATA        #REQUIRED

>

<!ELEMENT Number EMPTY>

<!ATTLIST Number

 from        CDATA        "0"

 to        CDATA        #REQUIRED

>

<!ELEMENT Properties (Symbols | Production | Projection | Property)*>

<!ELEMENT Symbols (Symbol)+>

<!ELEMENT Symbol (#CDATA)>

<!ATTLIST Symbol

 use        (PlanView | CrossSection | Production | All)        "all"

>

<!ELEMENT Production EMPTY>

<!ATTLIST Production

 value        (Mark | Cut | Paint | SideLine | BaseLine | None)        #REQUIRED

>

<!ELEMENT Projection EMPTY>

<!ATTLIST Projection

 type (Perpendicular | Inside | Outside | Maximum | MaxPerpendicular | None) #REQUIRED

>