-
Notifications
You must be signed in to change notification settings - Fork 2
xmlns extxs
An XML Namespace
Namespace for describing object metadata. For the purposes of the specification, object metadata is defined as such properties as: data types, array indexes, encoding type, etc.
See https://github.com/katmore/flat/wiki/xmlns for flat xml specification details.
All examples in this specification assume this namespace has been declared with the tag extxs
; ie: xmlns:extxs="https://github.com/katmore/flat/wiki/xmlns-extxs
, that namespace http://www.w3.org/2001/XMLSchema-instance
has been tagged as xsi
, and that namespace http://www.w3.org/2001/XMLSchema
has been tagged as xs
.
This specification includes a subset of xsi:type attribute values (those with the xs
prefix) and an extended set of type description values (those with the extxs
prefix).
- xs:DateTime
- xs:hexBinary
- xs:base64Binary
- xs:anyURI
- xs:string
- xs:integer
- xs:decimal
- xs:boolean
- extxs:Array
- extxs:Object
- extxs:NumericStringInt
- extxs:NumericStringFloat
- extxs:NumericString
- extxs:Resource
- extxs:UnknownType
- extxs:EmptyString
- extxs:Binary
The extxs:index
attribute describes a numerical integer value indicating a node's relationship to its parent; useful for when a node represents an array element.
- example usage, considering a parent node
mylist
with two children:<mylist> <item extxs:index="0">Item 1</item> <item extxs:index="1">Item 2</item> </mylist>
The extxs:key
attribute describes a node's relationship to its parent; useful for when a node represents a hashmap key/value association.
- example usage, considering a parent node
mything
with a child having keymy_first_thing
and another having keymy_second_thing
with corresponding values ofThing 1
andThing 2
:<mything> <part extxs:key="my_first_thing">Thing 1</part> <part extxs:key="my_second_thing">Thing 2</part> </mything>
The xsi:nil
attribute having the value true
describes that a node has no corresponding data value.
- example of node with a
null
value:<mynode xsi:nil="true" />
The encoding of a node's data value can be described with the extxs:encoding
attribute.
- example of a node with
base64
data encoding, (the node data has the valuehello
):<mynode extxs:encoding="base64">aGVsbG8=</mynode>
A extxs:dump
node describes a parent node's data value while also indicating that the value cannot be reliably unserialized. A dump value's encoding can be described with the extxs:encoding
attribute.
- example dump using "base64" encoding:
<extxs:dump extxs:encoding="base64">aGVsbG8=</dump>
- example dump using "none" encoding:
<extxs:dump extxs:encoding="none">hello</dump>