http://akinity.org/version/0.1/specification/cTag/XML/cTag.xsd Document version 0.1 Andrew Henderson akinity.org A sample of a cTag in XML. This document forms part of a reference implementation in XML of Akinity specification version 0.1. cTag.xml and akinity.xml complete this XML reference implementation -- How to use this document. MUST MAY SHOULD given, defined, specified Terminology: [Application default] indicates the value that an application using the cTag MUST use whenever an optional value or element is not specified in the XML document. Can apply to the value in an element or to the existence of a sub-element. [Supported Values] a list of values that are specified as part of the system. [context] the value of an implicit cTag. e.g. a word, a linked file Application defaults are intended to facilitate a smooth transition between, at one extreme, a cTag fully marked-up in XML and at the other an [implicit cTag]; such that all values and structures MAY be inferred. With the exception of cTag.origin.synthetic.source.text/uri which comprises any synthesisable content. Thus even lacking XML mark-up, any word, URL, file, image etc. that could be valid input to the synthesis function (SHA-256) MAY be treated by the application as an implicit cTag, with mark-up being defaulted according to the specified application defaults. e.g. the plain utf-8 text "海" MAY be read by an application as a cTag having the XML form below (braces replace angle brackets to mitgate unreadable escape characters having to be embedded in this document): {?xml version="1.0" encoding="utf-8"?} {tns:cTag xmlns:tns="http://akinity.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://akinity.org http://akinity.org/specification/v.0.1/cTag/XML/cTag.xsd"} {tns:version} {tns:v.0.1} {/tns:v.0.1} {/tns:version} {tns:origin} {tns:synthetic} {tns:text}海{/tns:text} {/tns:synthetic} {/tns:origin} {tns:created}2009-02-10T08:30:15.17{/tns:created} {tns:text}海{/tns:text} {tns:contents} {tns:base64data}ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr{/tns:base64data} {/tns:contents} {tns:segments} {tns:start}8{/tns:start} {tns:end}8{/tns:end} {/tns:segments} {/tns:cTag} where ABCD... is substituted with the actual base64 encoding of the SHA-256 hash of "海" This encoding is documented at http://base16.org Specify an algorithm that was used to encode the value in cTag.body.contents Supported Values: base64, hex Application default: base64 cTag MUST conform to the specified version of Akinity. Constrains: lower bound on cTag.head.breadth e.g. akinity.cTag.version='v.0.1'.breadth.minimum=8 upper bound on cTag.head.breadth e.g. akinity.cTag.version='v.0.1'.breadth.maximum=15 upper bound on cTag.head.meiotic.depth e.g. akinity.cTag.version='v.0.1'.meiotic.depth.maximum=cTag.head.breadth Application default: latest version of Akinity supported by the aplication. Prior undocumented version. This version. First documented version. Specify details concerning the cTag's origin Number of usable bits in entirety (all segments) of cTag.body.contents = power(2, cTag.head.breadth) e.g. power(2,12) = 4,096 usable bits Number of base64 characters in entire contents string = usable bits / 6 (exponent of 64 - as in base64) e.g. breadth=12 requires 4,096 / 6 = 683 bytes of storage The date and time of cTag creation by meiosis or synthesis. Application default : now For a synthetic cTag, text MAY be the original source material. Application default : cTag.origin.synthetic.source.text For a synthetic cTag, uri MAY link to the original source material. Application default : cTag.origin.synthetic.source.uri In the interest of application performance and bandwidth conservation chunked transmission is specified. Transmission of a complete cTag in XML MUST be conducted through one or more content/offset pair chunks, each of which comprises an entire XML document. Each chunk MUST comprise one or more whole and contiguous segments. Chunks MAY be requested/transmitted beginning with cTag.segments.start = akinity.cTag.version.breadth.minimum, increasing incrementally and ending at cTag.breadth. Nevertheless, it is not specified the order in which requests/transmissions SHOULD be conducted. Required components in the head MUST be identical for every chunk of XML used by the cTag. If any two chunks are inconsistent in any component of cTag (or ancestor) then it is at the discretion of the application to decide what values or error condition to use. Segments specifies the start and end of a contiguous sequence of cTag contents and offsets. The number of usable bits in any one segment s is power(2,s). A chunk of usable bits is therefore sized according to the power(2,s) formula, summed over all segments in the chunk. range: cTag.segments.start to cTag.segments.end cTag MUST conform to the specified version of Akinity. Constrains: lower bound on cTag.head.breadth e.g. akinity.cTag.version='v.0.1'.breadth.minimum=8 upper bound on cTag.head.breadth e.g. akinity.cTag.version='v.0.1'.breadth.maximum=15 upper bound on cTag.head.meiotic.depth e.g. akinity.cTag.version='v.0.1'.meiotic.depth.maximum=cTag.head.breadth Application default: latest version of Akinity supported by the aplication. Breadth is an element of meiotic because any synthetic cTag can be thought of as having infintely extendable length. Whereas a meiotic cTag may be contracted but not extended, so it has a upper bound on its breadth. Range min: akinity.cTag.version.breadth.minimum. max: akinity.cTag.version.breadth.maximum. Constrains the size of cTag.contents and cTag.origin.meiotic.offsets Binary exponent of the number of usable bits of information implied by cTag.body.contents. e.g. cTag.head.breadth=10 implies power(2,10)=1024 usable bits of information in cTag.body.contents. Note: due to overhead in encoding cTag.contents and cTag.origin.meiotic.offsets will actually contain about one third bits of excess data under base64 encoding. Application default: akinity.cTag.version.breadth.minimum Range: min=0. max=akinity.cTag.version.meiotic.depth.maximum. Application default: 0 Constrains the size of cTag.origin.meiotic.offsets. Binary exponent of the number of prior meitoic combinations to the most distant significant ancestors. e.g cTag.body.meiotic.depth=7 implies at most power(2,7)=128 + (less distant ancestors) 64 + 32 + 16 + 8 + 4 + 2 = 254 significant ancestors. If cTag.head.meiotic=0 and cTag.head.meiotic.depth>0 then cTag.head is invalid, hence cTag is invalid. base64 characters in entire offsets string = usable bits * cTag.head.depth / 6 e.g. breadth=12, depth=7 requires 4,096 * 7 / 6 = 4,779 bytes. This string, when given, will often represent the majority of a cTag's volume. However, because offset entropy is generally low, the string in cTag.body.offsets should compress quite effectively. Together with contents, the data in the example requires under 6Kb of storage before compression. Application default: a string of zeros to the required length (base64:AAAAA ... with adjustment for the final character). Identify one or two cTag(s) which were the meiotic parent(s) of the cTag at the top of this XML document. The specifications of both cTag.head.meiotic.parent.x and cTag.head.meiotic.parent.y reference the specification of cTag recursively, so a cTag XML document can be used to specify any number of ancestors. Beyond compliance with the cTag specification, no further validation of parents is required. Application default : none Specify whether the cTag is synthetic or meiotic. Application default: synthetic This cTag was created by meiosis. Range min: akinity.cTag.version.breadth.minimum max: cTag.segments.end. Application default: akinity.cTag.version.breadth.minimum. The first segment in the chunk given by a particular XML document. Applies to both contents and offsets. Range: min: cTag.body.segments.start max: c Tag.head.breadth. Application default: cTag.head.breadth The last segment in the chunk given by a particular XML document. Applies to both contents and offsets. Specify whether the source of the synthetic tag was attached text or was material linked to by a URI. Application default: text If a value is given, the value in this field was purportedly used to synthesise this cTag. It is not validated as such. If no value is given then the value in cTag.text field was purportedly used for synthesis. If the value in this field is a valid URI, it implies that the URI itself (not the linked material) was the source of synthesis. Application default: null (not given) If given, the document linked to by this field was used to synthesise this cTag. If no value given then the document linked to by the value in cTag.uri field was used.