summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJason Albert <albertj@us.ibm.com>2016-08-30 15:31:20 -0500
committerJason Albert <albertj@us.ibm.com>2016-08-30 15:31:20 -0500
commit712fdd3707944f95f3d2f57b72a1895812dc0ef9 (patch)
treefadcd716b8def0c41212a02d10df4e10f11bd117 /docs
parentd7cc969a3f6525a9417125c3caab7aa678240836 (diff)
downloadvpdtools-712fdd3707944f95f3d2f57b72a1895812dc0ef9.tar.gz
vpdtools-712fdd3707944f95f3d2f57b72a1895812dc0ef9.zip
Added the <keyword> section
Diffstat (limited to 'docs')
-rw-r--r--docs/xmlformat.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/docs/xmlformat.md b/docs/xmlformat.md
index ba01d76..249081e 100644
--- a/docs/xmlformat.md
+++ b/docs/xmlformat.md
@@ -129,5 +129,65 @@ The inclusion of a record binary file would look like this:
</record>
```
+## `<keyword>`
+The `<keyword>` tag is used to describe the contents of a keyword within a record.
+
+``` xml
+<keyword NAME=”NM”>
+ ..
+</keyword>
+```
+The name attribute is required and only 2 characters long
+
+### Tags included in the `<keyword>`
+
+`<kwdesc></kwdesc>`
+A description of the contents of the keyword. Only 1 tag allowed per keyword.
+
+`<kwformat></kwformat>`
+The format of the data in the `<kwdata>` tag. It can be three different values
+ * hex
+ * ascii
+ * bin
+hex and ascii data are both specified within the `<kwdata>` tag. When using the bin type, the `<kwdata>` tag is a reference to a binary file that contains just data for the keyword
+
+`<kwlen></kwlen>`
+The length of the keyword. If the data given is shorter than the keyword, the data will be right padded with zeros. If the data is longer than the `<kwlen>`, then an error is generated.
+
+`<kwdata></kwdata>`
+The data to go into the keyword. It is checked to make sure it matches the format specified. For example, that hex data has only valid hex characters.
+
+Sample keyword sections would look like this:
+
+For hex data:
+``` xml
+<keyword name="NM">
+ <kwdesc>The name keyword</kwdesc>
+ <kwformat>hex</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>01AEF78DB</kwdata>
+</keyword>
+```
+
+For ascii data:
+``` xml
+<keyword name="NM">
+ <kwdesc>The name keyword</kwdesc>
+ <kwformat>ascii</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>NAME</kwdata>
+</keyword>
+```
+
+For bin data:
+``` xml
+<keyword name="NM">
+ <kwdesc>The name keyword</kwdesc>
+ <kwformat>bin</kwformat>
+ <kwlen>4</kwlen>
+ <kwdata>name.bin</kwdata>
+</keyword>
+```
+
## Examples
Please see the examples dir in this repo for complete representations multiple types of template files \ No newline at end of file
OpenPOWER on IntegriCloud