Table of Contents

Improving the Bixtorage File Structure

A major overhaul of the Bixtorage (BXT) file structure is planned for v0.2. The new structure will be described here.

DTD

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT bixtorage (owner,conf,description,item*)>
<!ATTLIST bixtorage
    created NMTOKEN #REQUIRED
    hash NMTOKEN #REQUIRED
    modified NMTOKEN #REQUIRED
    version NMTOKEN #REQUIRED
>
<!ELEMENT conf (ctypes,wiring)>
<!ELEMENT ctypes (set+)>
<!ELEMENT description EMPTY>
<!ELEMENT dfields (set+)>
<!ELEMENT field (#PCDATA)*>
<!ATTLIST field id NMTOKEN #REQUIRED>
<!ELEMENT item (field+)*>
<!ATTLIST item
    created NMTOKEN #REQUIRED
    description CDATA #REQUIRED
    id NMTOKEN #REQUIRED
    modified NMTOKEN #REQUIRED
    owner NMTOKEN #REQUIRED
    type NMTOKEN #REQUIRED
>
<!ELEMENT owner (#PCDATA)>
<!ELEMENT set (#PCDATA)>
<!ATTLIST set id NMTOKEN #REQUIRED>
<!ELEMENT tagrels (set+)>
<!ELEMENT wiring (tagrels,dfields)>

Sample XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bixtorage SYSTEM "bixtorage.dtd" >
<bixtorage created="NMTOKEN" hash="NMTOKEN" modified="NMTOKEN" version="NMTOKEN">
  <owner>$owner</owner>
  <conf>
    <ctypes>
      <set id="NMTOKEN">$ctype_set</set>
    </ctypes>
    <wiring>
      <tagrels>
        <set id="NMTOKEN">$tagrel_set</set>
      </tagrels>
      <dfields>
        <set id="NMTOKEN">$dfield_set</set>
      </dfields>
    </wiring>
  </conf>
  <description/>
  <item created="NMTOKEN" description="CDATA" id="NMTOKEN" modified="NMTOKEN"
        owner="NMTOKEN" type="NMTOKEN">
    <field id="NMTOKEN">(#PCDATA)</field>
  </item>
</bixtorage>

The variables $ctype_set, $tagrel_set and $dfield_set should be replaced by values of the structure given in customization_0.2.