-
Notifications
You must be signed in to change notification settings - Fork 2
xmlns
Doug Bird edited this page Jun 4, 2018
·
31 revisions
An XML Namespace
All examples in this specification assume this namespace has been declared with fx
prefix; ie: xmlns:fx="https://github.com/katmore/flat/wiki/xmlns"
.
- xml version: 1.0
- character encoding must be UTF-8
- Suggested namespace declarations:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:extxs="https://github.com/katmore/flat/wiki/xmlns-extxs"
xmlns="https://github.com/katmore/flat/wiki/xmlns-object"
xmlns:fx="https://github.com/katmore/flat/wiki/xmlns"
- Optional attributes:
-
fx:meta
: indicate meta-data regarding document, such as an object type that was mapped. -
fx:created
: ISO 8601 formatted time of document creation. -
fx:crc32
: crc32 polynomial of a hypothetical object represented by the document; expressed as a base16 number. -
fx:md5
: md5 hash of a hypothetical object represented by the document; expressed as a base16 number.
-
- Base64 Encoded Attribute value:
- the encoded attribute value should be prefixed with
data:application/octet-stream;base64,
. - example element, considering the value
hello
:<mynode myattr="data:application/octet-stream;base64,aGVsbG8=" />
- the encoded attribute value should be prefixed with
- describe element values with
xsi:
attributes:<data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">My String</data>
<?xml version="1.0" encoding="UTF-8"?>
<flat xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fx="https://github.com/katmore/flat/wiki/xmlns" xmlns="https://github.com/katmore/flat/wiki/xmlns-object" xmlns:extxs="https://github.com/katmore/flat/wiki/xmlns-extxs" fx:created="1970-01-01T00:00:00-00:00" fx:crc32="34D2" fx:md5="5d41402abc4b2a76b9719d911017c592" fx:meta="flat\data\hello" >
<data xsi:type="xs:string">hello</data>
</flat>