Navigation


Changes between Initial Version and Version 1 of dict_legacy_xml.fdx


Ignore:
Timestamp:
Dec 21, 2010, 3:15:17 PM (14 years ago)
Author:
Sebastien Decugis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • dict_legacy_xml.fdx

    v1 v1  
     1[[PageOutline(2-4)]]
     2== Legacy XML dictionary files ==
     3
     4This {{{dict_legacy_xml.fdx}}} extension provides an easy way to define new objects in the dictionary, although this mechanism is both less powerful and less efficient than the native C definitions format, which should be preferred when possible.
     5
     6The original intent is to provide support for existing dictionary files coming from the OpenDiameter implementation. However, these files will probably not be re-usable "as-is" without a few modifications. The XML format expected by the extension is detailed in the remaining of this page.
     7
     8
     9=== Configuration ===
     10
     11{{{dict_legacy_xml.fdx}}} configuration file is mandatory. The complete configuration documentation can be found in the source package: [source:freeDiameter/doc/dict_legacy_xml.conf.sample dict_legacy_xml.conf.sample].
     12
     13The configuration consists in a simple list of XML files that must be loaded. Each XML file that is referrenced from the configuration will be parsed and the definitions added to the global dictionary and usable from other extensions. Beware that conflicts are not allowed (for example two AVPs defined with the same code and flags but different names).
     14
     15
     16=== Usage ===
     17
     18The DTD for XML format is provided for information here: [source:freeDiameter/contrib/dict_legacy/dictionary.dtd dictionary.dtd].
     19
     20Here is a complete example that defines the same objects as the [wiki:test_app.fdx] application:
     21{{{
     22#!xml
     23<?xml version="1.0" encoding="UTF-8"?>
     24<!DOCTYPE dictionary SYSTEM "dictionary.dtd">
     25
     26<dictionary>
     27
     28  <vendor id="999999" name="app_test vendor" />
     29
     30  <application id="16777215" name="app_test application"
     31               uri="http://www.freediameter.net">
     32
     33    <avp name="Test-AVP" code="16777215" vendor-id="999999" mandatory="must">
     34      <type type-name="Integer32" />
     35    </avp>
     36
     37    <command name="Test" code="16777214" pbit="1">
     38      <requestrules>
     39        <fixedrules>
     40          <avprule name="Session-Id" minimum="1" maximum="1" />
     41        </fixedrules>
     42        <requiredrules>
     43          <avprule name="Destination-Realm" minimum="1" maximum="1" />
     44          <avprule name="Origin-Host" minimum="1" maximum="1" />
     45          <avprule name="Origin-Realm" minimum="1" maximum="1" />
     46          <avprule name="Test-AVP" minimum="1" maximum="1" />
     47        </requiredrules>
     48        <optionalrules>
     49           <avprule name="Destination-Host" minimum="1" maximum="1" />
     50       </optionalrules>
     51      </requestrules>
     52
     53      <answerrules>
     54        <fixedrules>
     55          <avprule name="Session-Id" minimum="1" maximum="1" />
     56        </fixedrules>
     57        <requiredrules>
     58          <avprule name="Result-Code" minimum="1" maximum="1" />
     59          <avprule name="Origin-Host" minimum="1" maximum="1" />
     60          <avprule name="Origin-Realm" minimum="1" maximum="1" />
     61          <avprule name="Test-AVP" minimum="1" maximum="1" />
     62        </requiredrules>
     63      </answerrules>
     64    </command>
     65
     66  </application>
     67
     68</dictionary>
     69}}}
     70
     71=== Output ===
     72
     73This application does not produce any particular output, except for entries in the dictionary.
     74
     75=== Troubleshooting ===
     76
     77
     78
     79
     80