Documentation for moki

Table of Contents

top

Schema Document Properties

Target Namespace http://www.w3.org/2007/05/moki
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations belong to this schema's target namespace.
  • By default, local attribute declarations have no namespace.
Documentation

This is the schema for MOKI, the MobileOK Intermediate document format.

moki was produced as part of the mobileOK Checker project, to allow the representation of an HTML resource and all its associated resources together, in order to allow the checking of that HTML resource for mobileOK conformance.

moki represents aspects of the HTTP retrieval of a resource, provides the ability to encode the content of the resource and to attach specific metadata about resources, concerning their size, validity and so on.

Although moki was created for the specific purpose of being processed by XSLT to provide a "results" document containing the results of the mobileOK Basic Tests (hence it being termed "intermediate"), its possible uses are more general than that. No additional use cases were taken into account in its design and it is likely that it would need to be extended or modified to accommodate other applications.

That said, the mobileOK checker itself does not currently exploit all moki features.

Moki was developed and elaborated by members of the mobile OK Checker Task Force from an initial design by Jo Rabin.

For more information on the mobileOK Basic Tests, please refer to the W3C mobileOK Basic Tests 1.0 specification.

Comments about moki should be sent to the Checker Task Force mailing list (see archives), public-mobileOK-checker@w3.org.

Editor: Jo Rabin

Date: 02 November 2008

This Version: http://dev.w3.org/2007/mobileok-ref/moki/schema/moki-20081204.xsd

Latest Version: http://dev.w3.org/2007/mobileok-ref/moki/schema/moki.xsd

Previous Version: http://dev.w3.org/2007/mobileok-ref/moki/schema/moki-20071022.xsd

Status: stable, the mobileOK Basic Tests 1.0 is a W3C Proposed Recommendation

$Id: moki.xsd.html,v 1.3 2008-12-04 16:58:11 fd Exp $

Copyright © 2005-2008 W3C © ( MIT , ERCIM , Keio), All Rights Reserved. W3C liability, trademark, document use rules apply.

Declared Namespaces

Prefix Namespace
xml http://www.w3.org/XML/1998/namespace
xs http://www.w3.org/2001/XMLSchema
xhtml http://www.w3.org/1999/xhtml
moki http://www.w3.org/2007/05/moki
Schema Component Representation
<xs:schema elementFormDefault="qualified" targetNamespace="http://www.w3.org/2007/05/moki">
...
</xs:schema>
top

Global Declarations

Element: CSSValidity

Name CSSValidity
Used by (from the same schema document) Element stylesheet
Type moki:validityType
Nillable no
Abstract no
Documentation

Details of CSS errors and warnings, if any. Overall validity (no errors) indicated by "valid" attribute being true.

Logical Diagram
h-602396923 h-774391463
XML Instance Representation
<moki:CSSValidity
valid=" xs:string (value comes from list: {'VALID'|'INVALID'|'NOT_VALIDATED'|'true'|'false'}) [1]">
Start Choice [0..*]
<moki:error> ... </moki:error> [1]
<moki:warning> ... </moki:warning> [1]
End Choice
</moki:CSSValidity>
Diagram
h-602396923 h-774391463
Schema Component Representation
<xs:element name="CSSValidity" type=" moki:validityType "/>
top

Element: HTTPRequest

Name HTTPRequest
Used by (from the same schema document) Element retrieval
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

An XML representation of the request. Raw headers if present, represents the string that actually sent as headers. timeStart can be used to enable timing of the request.

Logical Diagram
h-11955359 h-1277355132 h674216329 h276413563 h-1421071056
XML Instance Representation
<moki:HTTPRequest
timeStart=" xs:dateTime [0..1]">
<moki:rawHeaders> ... </moki:rawHeaders> [0..1]
<moki:method> ... </moki:method> [1]
<moki:URI> ... </moki:URI> [1]
<moki:protocol> ... </moki:protocol> [1]
<moki:header> ... </moki:header> [0..*]
</moki:HTTPRequest>
Diagram
h-11955359 h-1277355132 h674216329 h276413563 h-1421071056
Schema Component Representation
<xs:element name="HTTPRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:rawHeaders " minOccurs="0"/>
<xs:element ref=" moki:method "/>
<xs:element ref=" moki:URI "/>
<xs:element ref=" moki:protocol "/>
<xs:element ref=" moki:header " minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="timeStart" type=" xs:dateTime "/>
</xs:complexType>
</xs:element>
top

Element: HTTPResponse

Name HTTPResponse
Used by (from the same schema document) Element retrieval
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

An XML representation of an HTTP response. Raw headers if present, represents the string that was parsed to create the headers. timeStart and timeEnd can be used to track more precise timings of responses.

Need to represent failure of underlying DNS or TCP

Logical Diagram
h-11955359 h276413563 h-1092281707 h-1421071056 h-1498075514
XML Instance Representation
<moki:HTTPResponse
timeEnd=" xs:dateTime [0..1]"
timeStart=" xs:dateTime [0..1]">
<moki:rawHeaders> ... </moki:rawHeaders> [0..1]
<moki:protocol> ... </moki:protocol> [1]
<moki:status> ... </moki:status> [1]
<moki:header> ... </moki:header> [0..*]
<moki:entity> ... </moki:entity> [1]
</moki:HTTPResponse>
Diagram
h-11955359 h276413563 h-1092281707 h-1421071056 h-1498075514
Schema Component Representation
<xs:element name="HTTPResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:rawHeaders " minOccurs="0"/>
<xs:element ref=" moki:protocol "/>
<xs:element ref=" moki:status "/>
<xs:element ref=" moki:header " minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref=" moki:entity "/>
</xs:sequence>
<xs:attribute name="timeEnd" type=" xs:dateTime "/>
<xs:attribute name="timeStart" type=" xs:dateTime "/>
</xs:complexType>
</xs:element>
top

Element: MarkupValidity

Name MarkupValidity
Used by (from the same schema document) Element validity
Type moki:validityType
Nillable no
Abstract no
Documentation

Records errors and warnings when evaluating against the provided DOCTYPE

Logical Diagram
h-602396923 h-774391463
XML Instance Representation
<moki:MarkupValidity
valid=" xs:string (value comes from list: {'VALID'|'INVALID'|'NOT_VALIDATED'|'true'|'false'}) [1]">
Start Choice [0..*]
<moki:error> ... </moki:error> [1]
<moki:warning> ... </moki:warning> [1]
End Choice
</moki:MarkupValidity>
Diagram
h-602396923 h-774391463
Schema Component Representation
<xs:element name="MarkupValidity" type=" moki:validityType "/>
top

Element: MobileValidity

Name MobileValidity
Used by (from the same schema document) Element validity
Type moki:validityType
Nillable no
Abstract no
Documentation

Records errors and warnings when evaluating against XHTML Basic 1.1

Logical Diagram
h-602396923 h-774391463
XML Instance Representation
<moki:MobileValidity
valid=" xs:string (value comes from list: {'VALID'|'INVALID'|'NOT_VALIDATED'|'true'|'false'}) [1]">
Start Choice [0..*]
<moki:error> ... </moki:error> [1]
<moki:warning> ... </moki:warning> [1]
End Choice
</moki:MobileValidity>
Diagram
h-602396923 h-774391463
Schema Component Representation
<xs:element name="MobileValidity" type=" moki:validityType "/>
top

Element: URI

Name URI
Used by (from the same schema document) Element aboutMe , Element stylesheet , Element image , Element object , Element link , Element HTTPRequest
Type xs:anyURI
Nillable no
Abstract no
Logical Diagram
XML Instance Representation
<moki:URI> xs:anyURI </moki:URI>
Diagram
Schema Component Representation
<xs:element name="URI" type=" xs:anyURI "/>
top

Element: UTF-8Validity

Name UTF-8Validity
Used by (from the same schema document) Element validity
Type moki:validityType
Nillable no
Abstract no
Documentation

Records errors and warnings when evaluating UTF-8 validity

Logical Diagram
h-602396923 h-774391463
XML Instance Representation
<moki:UTF-8Validity
valid=" xs:string (value comes from list: {'VALID'|'INVALID'|'NOT_VALIDATED'|'true'|'false'}) [1]">
Start Choice [0..*]
<moki:error> ... </moki:error> [1]
<moki:warning> ... </moki:warning> [1]
End Choice
</moki:UTF-8Validity>
Diagram
h-602396923 h-774391463
Schema Component Representation
<xs:element name="UTF-8Validity" type=" moki:validityType "/>
top

Element: XHTMLDocInfo

Name XHTMLDocInfo
Used by (from the same schema document) Element primaryDoc
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Details of the primary document, which is assumed to be an XHTML document.

Logical Diagram
h-155687659 h-604558118 h449865502 h-1571126407 h-1430537916
XML Instance Representation
<moki:XHTMLDocInfo>
<moki:validity> ... </moki:validity> [1]
<moki:chars> ... </moki:chars> [1]
<moki:xmlDecl> ... </moki:xmlDecl> [1]
<moki:doctypeDecl> ... </moki:doctypeDecl> [1]
<moki:docContent> ... </moki:docContent> [1]
</moki:XHTMLDocInfo>
Diagram
h-155687659 h-604558118 h449865502 h-1571126407 h-1430537916
Schema Component Representation
<xs:element name="XHTMLDocInfo">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:validity "/>
<xs:element ref=" moki:chars "/>
<xs:element ref=" moki:xmlDecl "/>
<xs:element ref=" moki:doctypeDecl "/>
<xs:element ref=" moki:docContent "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: aboutMe

Name aboutMe
Used by (from the same schema document) Element moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Information about the process carrying out the assembly of the resources into moki format.

Logical Diagram
h-573369874 h674216329 h-1547229547 h-458813592 h633321363
XML Instance Representation
<moki:aboutMe>
<moki:name> ... </moki:name> [1]
<moki:URI> ... </moki:URI> [1]
<moki:version> ... </moki:version> [1]
<moki:callingIP> ... </moki:callingIP> [1]
<moki:timestamp> ... </moki:timestamp> [1]
</moki:aboutMe>
Diagram
h-573369874 h674216329 h-1547229547 h-458813592 h633321363
Schema Component Representation
<xs:element name="aboutMe">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:name "/>
<xs:element ref=" moki:URI "/>
<xs:element ref=" moki:version "/>
<xs:element ref=" moki:callingIP "/>
<xs:element ref=" moki:timestamp "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: actualDimensions

Name actualDimensions
Used by (from the same schema document) Element imageInfo
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The actual dimensions in pixels of images that have an intrinsic size.

Logical Diagram
XML Instance Representation
<moki:actualDimensions
height=" xs:integer [1]"
width=" xs:integer [1]"/>
Diagram
Schema Component Representation
<xs:element name="actualDimensions">
<xs:complexType>
<xs:attribute name="height" type=" xs:integer " use="required"/>
<xs:attribute name="width" type=" xs:integer " use="required"/>
</xs:complexType>
</xs:element>
top

Element: callingIP

Name callingIP
Used by (from the same schema document) Element aboutMe
Type xs:string
Nillable no
Abstract no
Documentation

The IP Address of the component generating the moki document.

Since servers may vary the representation of resources based on IP address, this field is significant, though it is understood that address translation (NAT) may be in operation, so the IP address assigned to the component compiling the moki document may not be that received by the remote servers. Where possible, therefore, the address inserted here should be that after address translation.

Logical Diagram
XML Instance Representation
<moki:callingIP> xs:string </moki:callingIP>
Diagram
Schema Component Representation
<xs:element name="callingIP" type=" xs:string "/>
top

Element: chars

Name chars
Used by (from the same schema document) Element XHTMLDocInfo , Element stylesheet
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The number of characters in the document and the number of white space characters that are extraneous (as defined in mobileOK Basic Tests MINIMIZE.

Not sure whether the "total" here is different to the "size" of the final HTTP retrieval's body entity.

Logical Diagram
XML Instance Representation
<moki:chars
extraneous=" xs:integer [1]"
total=" xs:integer [1]"/>
Diagram
Schema Component Representation
<xs:element name="chars">
<xs:complexType>
<xs:attribute name="extraneous" type=" xs:integer " use="required"/>
<xs:attribute name="total" type=" xs:integer " use="required"/>
</xs:complexType>
</xs:element>
top

Element: column

Name column
Used by (from the same schema document) Element position
Type xs:positiveInteger
Nillable no
Abstract no
Documentation

The column offset into a line oriented resource. Starting from 0.

Logical Diagram
XML Instance Representation
<moki:column> xs:positiveInteger </moki:column>
Diagram
Schema Component Representation
<xs:element name="column" type=" xs:positiveInteger "/>
top

Element: docContent

Name docContent
Used by (from the same schema document) Element XHTMLDocInfo
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The HTML content of the document, tidied if necessary to make it correct. The original untidied version is found as the entity body of the final HTTP request. The content is tidied if "Validity" of the parent element is false.

We should consider adding a "tidied" attribute to indicate this. Also it would be nice if we allowed for details of which tidy operations were carried out, they may not correspond exactly to the validity errors.

Logical Diagram
XML Instance Representation
<moki:docContent>
Allow any elements from the following namespace(s): http://www.w3.org/1999/xhtml (strict validation). [1]
</moki:docContent>
Diagram
Schema Component Representation
<xs:element name="docContent">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: doctypeDecl

Name doctypeDecl
Used by (from the same schema document) Element XHTMLDocInfo
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Details of any DOCTYPE declaration that may be present.

Logical Diagram
XML Instance Representation
<moki:doctypeDecl
publicID=" xs:string [1]"
systemID=" xs:string [1]"/>
Diagram
Schema Component Representation
<xs:element name="doctypeDecl">
<xs:complexType>
<xs:attribute name="publicID" type=" xs:string " use="required"/>
<xs:attribute name="systemID" type=" xs:string " use="required"/>
</xs:complexType>
</xs:element>
top

Element: element

Name element
Used by (from the same schema document) Element header
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Elements of HTTP headers that are defined as being comma separated lists. Each element of the list is represented by a separate "moki:element" element, and those that have values (e.g. max-age=0) have the "value" attribute set appropriately.

Logical Diagram
h-1762311642
XML Instance Representation
<moki:element
name="anySimpleType [1]"
value=" xs:string [0..1]">
<moki:parameter> ... </moki:parameter> [0..1]
</moki:element>
Diagram
h-1762311642
Schema Component Representation
<xs:element name="element">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:parameter " minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" use="required"/>
<xs:attribute name="value" type=" xs:string "/>
</xs:complexType>
</xs:element>
top

Element: entity

Name entity
Used by (from the same schema document) Element HTTPResponse
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The HTTP entity body (i.e. the raw body of the response). The body of this element can be omitted, if so the "encoding" attribute is omitted too. The size attribute must be present and is the size in bytes of the entity body after any transfer decoding has been applied (e.g. if the transfer coding was gizp, size refers to the exploded version). The encoding attribute must be present if element content is present and is "escaped" for escaped text coding and "base64" for images etc.

At present this is not the way the aplha release works.

Logical Diagram
XML Instance Representation
<moki:entity
size=" xs:integer [1]"
encoding=" xs:string (value comes from list: {'base64'|'escaped'}) [0..1]"/>
Diagram
Schema Component Representation
<xs:element name="entity">
<xs:complexType mixed="true">
<xs:attribute name="size" type=" xs:integer " use="required"/>
<xs:attribute name="encoding">
<xs:simpleType>
<xs:restriction base=" xs:string ">
<xs:enumeration value="base64"/>
<xs:enumeration value="escaped"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
top

Element: error

Name error
Used by (from the same schema document) Complex Type validityType
Type moki:errorWarnType
Nillable no
Abstract no
Documentation

Records a validity error.

Logical Diagram
h-573506543 h2013382412
XML Instance Representation
<moki:error>
<moki:info> ... </moki:info> [1]
<moki:position> ... </moki:position> [1]
</moki:error>
Diagram
h-573506543 h2013382412
Schema Component Representation
<xs:element name="error" type=" moki:errorWarnType "/>
top

Element: header

Name header
Used by (from the same schema document) Element HTTPRequest , Element HTTPResponse
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

An HTTP header. This can take two forms:

The first form take a "name" parameter and a "value" parameter. This is the form used when no structural decomposition of the header can usefully be performed or when the HTTP parameter name is not recognized.

The second form take a "name" has no "value" parameter, but contains a sequence of "moki:element" elements. This is the form used when the parameter has a structure analogous to that specified in RFC 822, where the value of the header can be a comma separated list and where elements of the list may have parameters attached to them with semi-colons, examples being "Accept" (e.g. Accept: application/xhtml+xml, text/html;q=0.1, text/plain;q=0.1) and "Cache-Control" - (e.g. Cache-Contol: max-age=0, no-transform. In these cases, analysis using XSLT or other XML aware processing tools is facilitated by using the "moki:element" and "moki:parameter" elements.

The mobileOK checker uses this form for the HTTP headers listed in HeaderParseMethod as PARSE_AND_NORMALIZE and PARSE_BUT_DO_NOT_NORMALIZE and additionally performs white-space and case normalization on headers shown in that file as PARSE_AND_NORMALIZE.

HTTP header names are normalized to lower case in all cases.

Logical Diagram
h733292729
XML Instance Representation
<moki:header
name=" xs:string [1]"
value="anySimpleType [0..1]">
<moki:element> ... </moki:element> [0..*]
</moki:header>
Diagram
h733292729
Schema Component Representation
<xs:element name="header">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:element " minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type=" xs:string " use="required"/>
<xs:attribute name="value"/>
</xs:complexType>
</xs:element>
top

Element: image

Name image
Used by (from the same schema document) Element images
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Information about the retrieved image, its URI, details of its HTTP retrieval and basic image information.

Logical Diagram
h674216329 h-442935887 h-300291290
XML Instance Representation
<moki:image>
<moki:URI> ... </moki:URI> [1]
<moki:retrieval> ... </moki:retrieval> [1]
<moki:imageInfo> ... </moki:imageInfo> [1]
</moki:image>
Diagram
h674216329 h-442935887 h-300291290
Schema Component Representation
<xs:element name="image">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:URI "/>
<xs:element ref=" moki:retrieval "/>
<xs:element ref=" moki:imageInfo "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: imageInfo

Name imageInfo
Used by (from the same schema document) Element image , Element object
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Information about an image. The "type" attribute denotes the Internet Content Type (mime type) of the image. Validity contains information about whether the document is a valid instance of that image type, transparency denotes whether the whole image is transparent, and actualDimensions determines the actual pixel dimensions of images that have an intrinsic size in pixels. Dimensions may be absent for image types that do not support that features.

The mobileOK Checker incorrectly produces a validity child element instead of the imageValidity element it should produce.

Logical Diagram
h-870727254 h218025915 h-915388706
XML Instance Representation
<moki:imageInfo
type="anySimpleType [1]">
<moki:imageValidity> ... </moki:imageValidity> [1]
<moki:transparency> ... </moki:transparency> [1]
<moki:actualDimensions> ... </moki:actualDimensions> [0..1]
</moki:imageInfo>
Diagram
h-870727254 h218025915 h-915388706
Schema Component Representation
<xs:element name="imageInfo">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:imageValidity "/>
<xs:element ref=" moki:transparency "/>
<xs:element ref=" moki:actualDimensions " minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
top

Element: imageValidity

Name imageValidity
Used by (from the same schema document) Element imageInfo
Type moki:validityType
Nillable no
Abstract no
Documentation

Details of image errors and warnings, if any. Overall validity (no errors) indicated by "valid" attribute being true.

Logical Diagram
h-602396923 h-774391463
XML Instance Representation
<moki:imageValidity
valid=" xs:string (value comes from list: {'VALID'|'INVALID'|'NOT_VALIDATED'|'true'|'false'}) [1]">
Start Choice [0..*]
<moki:error> ... </moki:error> [1]
<moki:warning> ... </moki:warning> [1]
End Choice
</moki:imageValidity>
Diagram
h-602396923 h-774391463
Schema Component Representation
<xs:element name="imageValidity" type=" moki:validityType "/>
top

Element: images

Name images
Used by (from the same schema document) Element moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

A collection of the images that were found in the primary document and in the style sheets associated with the primary document (as background or as list item images. The list contains only one reference for each image, caching considerations being equal.

Ideally each image would contain a list of references that caused its retireval.

Logical Diagram
h-598868392
XML Instance Representation
<moki:images>
<moki:image> ... </moki:image> [1..*]
</moki:images>
Diagram
h-598868392
Schema Component Representation
<xs:element name="images">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:image " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: info

Name info
Used by (from the same schema document) Complex Type errorWarnType
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

A textual description of the error

Probably needs to be elaborated with xml:lang, and potentially a language neutral code

Logical Diagram
XML Instance Representation
<moki:info/>
Diagram
Schema Component Representation
<xs:element name="info">
<xs:complexType mixed="true"/>
</xs:element>
top

Element: line

Name line
Used by (from the same schema document) Element position
Type xs:positiveInteger
Nillable no
Abstract no
Documentation

The line offset into a line oriented resource. Starting from 0.

Logical Diagram
XML Instance Representation
<moki:line> xs:positiveInteger </moki:line>
Diagram
Schema Component Representation
<xs:element name="line" type=" xs:positiveInteger "/>
top

Element: link

Name link
Used by (from the same schema document) Element links
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Information about the retrieval of a document referenced by hyperlink.

Logical Diagram
h674216329 h-442935887
XML Instance Representation
<moki:link>
<moki:URI> ... </moki:URI> [1]
<moki:retrieval> ... </moki:retrieval> [1]
</moki:link>
Diagram
h674216329 h-442935887
Schema Component Representation
<xs:element name="link">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:URI "/>
<xs:element ref=" moki:retrieval "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: links

Name links
Used by (from the same schema document) Element moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

All the targets of anchor (<a>) elements found in the primary document.

Should be one element per target and references to where they were found?

Logical Diagram
h-573421731
XML Instance Representation
<moki:links>
<moki:link> ... </moki:link> [1..*]
</moki:links>
Diagram
h-573421731
Schema Component Representation
<xs:element name="links">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:link " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: method

Name method
Used by (from the same schema document) Element HTTPRequest
Type xs:string
Nillable no
Abstract no
Documentation

The HTTP method (GET, POST etc.) of a request.

Logical Diagram
XML Instance Representation
<moki:method> xs:string </moki:method>
Diagram
Schema Component Representation
<xs:element name="method" type=" xs:string "/>
top

Element: moki

Name moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The root element of a moki document.

Logical Diagram
h1201440706 h-530749191 h-2090629342 h-1385050853 h736480977 h-596204362
XML Instance Representation
<moki:moki
version="anySimpleType [0..1]">
<moki:aboutMe> ... </moki:aboutMe> [0..1]
<moki:primaryDoc> ... </moki:primaryDoc> [1]
<moki:stylesheets> ... </moki:stylesheets> [1]
<moki:images> ... </moki:images> [1]
<moki:objects> ... </moki:objects> [1]
<moki:links> ... </moki:links> [1]
</moki:moki>
Diagram
h1201440706 h-530749191 h-2090629342 h-1385050853 h736480977 h-596204362
Schema Component Representation
<xs:element name="moki">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:aboutMe " minOccurs="0"/>
<xs:element ref=" moki:primaryDoc "/>
<xs:element ref=" moki:stylesheets "/>
<xs:element ref=" moki:images "/>
<xs:element ref=" moki:objects "/>
<xs:element ref=" moki:links "/>
</xs:sequence>
<xs:attribute name="version" default="0.8"/>
</xs:complexType>
</xs:element>
top

Element: name

Name name
Used by (from the same schema document) Element aboutMe
Type xs:string
Nillable no
Abstract no
Documentation

The name of a processing component.

Logical Diagram
XML Instance Representation
<moki:name> xs:string </moki:name>
Diagram
Schema Component Representation
<xs:element name="name" type=" xs:string "/>
top

Element: object

Name object
Used by (from the same schema document) Element objects
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The referrent of an object element in the primary document.

Ideally, each object would reference where it was found in the referring document.

Logical Diagram
h674216329 h-442935887 h1810695600 h-300291290
XML Instance Representation
<moki:object>
<moki:URI> ... </moki:URI> [1]
<moki:retrieval> ... </moki:retrieval> [1]
<moki:objectInfo> ... </moki:objectInfo> [1]
<moki:imageInfo> ... </moki:imageInfo> [0..1]
</moki:object>
Diagram
h674216329 h-442935887 h1810695600 h-300291290
Schema Component Representation
<xs:element name="object">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:URI "/>
<xs:element ref=" moki:retrieval "/>
<xs:element ref=" moki:objectInfo "/>
<xs:element ref=" moki:imageInfo " minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: objectInfo

Name objectInfo
Used by (from the same schema document) Element object
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Contains information about the object:

  • the "loadtype" attribute specifies how the object would be handled by browsers:
    • "RENDERED" means the object would be rendered
    • "TASTED" means the object would not be rendered but would need to be retrieved to render the document
    • "SKIPPED" means the object would not be retrieved
  • the "type" attribute specifies the Internet Content Type found on retrieval of the object.
Logical Diagram
XML Instance Representation
<moki:objectInfo
loadtype=" xs:token (value comes from list: {'RENDERED'|'TASTED'|'SKIPPED'}) [1]"
type="anySimpleType [1]"/>
Diagram
Schema Component Representation
<xs:element name="objectInfo">
<xs:complexType>
<xs:attribute name="loadtype" use="required">
<xs:simpleType>
<xs:restriction base=" xs:token ">
<xs:enumeration value="RENDERED"/>
<xs:enumeration value="TASTED"/>
<xs:enumeration value="SKIPPED"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
top

Element: objects

Name objects
Used by (from the same schema document) Element moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

A collection of objects found in the document - i.e. the referrent of "object" elements. A resource is only contained once in the list, even if it is referred to multiple times, caching considerations being equal. An image that is referred to as an Object is placed under the images element of a moki document.

It would be worth giving some thought as to whether the images list and the objects list should be combined.

It would be worth giving some thought as to how to represent the dependent relationships between objects.

Logical Diagram
h-1223168542
XML Instance Representation
<moki:objects>
<moki:object> ... </moki:object> [1..*]
</moki:objects>
Diagram
h-1223168542
Schema Component Representation
<xs:element name="objects">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:object " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: parameter

Name parameter
Used by (from the same schema document) Element element
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Some elements of HTTP headers (the elements of comma separated lists in the original header value) have parameters which are separated from the list element by a semi-colon. Each parameter is represented by a separate "moki:parameter" element, whose name and value are represented using the repsective attribute (e.g. q=0.1).

Logical Diagram
XML Instance Representation
<moki:parameter
name=" xs:string [1]"
value=" xs:string [1]"/>
Diagram
Schema Component Representation
<xs:element name="parameter">
<xs:complexType>
<xs:attribute name="name" type=" xs:string " use="required"/>
<xs:attribute name="value" type=" xs:string " use="required"/>
</xs:complexType>
</xs:element>
top

Element: position

Name position
Used by (from the same schema document) Complex Type errorWarnType
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Specifies the location in the resource where the error occurs.

Seemingly a simple matter, actually ver difficult to populate given the information that is returned by validity checkers. In principle there are a number if types of position information, e.g. for character validation you'd prefer a character offset, for binary format a byte offset and so on.

Logical Diagram
h-573421737 h-1554637319
XML Instance Representation
<moki:position
type=" xs:string (value comes from list: {'LINE_COLUMN'}) [0..1]">
<moki:line> ... </moki:line> [1]
<moki:column> ... </moki:column> [0..1]
</moki:position>
Diagram
h-573421737 h-1554637319
Schema Component Representation
<xs:element name="position">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:line "/>
<xs:element ref=" moki:column " minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base=" xs:string ">
<xs:enumeration value="LINE_COLUMN"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
top

Element: primaryDoc

Name primaryDoc
Used by (from the same schema document) Element moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

This element contains information about the primary resource, i.e. the resource that is the subject of the moki document. The element contains details of the document's HTTP retrieval followed by details of the document itself.

Logical Diagram
h-442935887 h1872892134
XML Instance Representation
<moki:primaryDoc>
<moki:retrieval> ... </moki:retrieval> [1]
<moki:XHTMLDocInfo> ... </moki:XHTMLDocInfo> [1]
</moki:primaryDoc>
Diagram
h-442935887 h1872892134
Schema Component Representation
<xs:element name="primaryDoc">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:retrieval "/>
<xs:element ref=" moki:XHTMLDocInfo "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: protocol

Name protocol
Used by (from the same schema document) Element HTTPRequest , Element HTTPResponse
Type xs:string
Nillable no
Abstract no
Documentation

HTTP/1.1 and so on.

Logical Diagram
XML Instance Representation
<moki:protocol> xs:string </moki:protocol>
Diagram
Schema Component Representation
<xs:element name="protocol" type=" xs:string "/>
top

Element: rawHeaders

Name rawHeaders
Used by (from the same schema document) Element HTTPRequest , Element HTTPResponse
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The raw content of the HTTP headers as send across the TCP connection.

Logical Diagram
XML Instance Representation
<moki:rawHeaders
size=" xs:integer [0..1]"/>
Diagram
Schema Component Representation
<xs:element name="rawHeaders">
<xs:complexType mixed="true">
<xs:attribute name="size" type=" xs:integer "/>
</xs:complexType>
</xs:element>
top

Element: retrieval

Name retrieval
Used by (from the same schema document) Element primaryDoc , Element stylesheet , Element image , Element object , Element link
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Details of the HTTP interaction involved in retrieving a document. The retrieved URI is the absolute URI retrieved (as opposed to a possibly relative URI referenced in the document). This is followed by the sequence of requests and responses involved in obtaining the resource.

Logical Diagram
h-1359936249
XML Instance Representation
<moki:retrieval>
<moki:retrievedURI> ... </moki:retrievedURI> [1]
Start Sequence [1..*]
<moki:HTTPRequest> ... </moki:HTTPRequest> [1]
<moki:HTTPResponse> ... </moki:HTTPResponse> [1]
End Sequence
</moki:retrieval>
Diagram
h-1359936249 h684868644 h-190974644
Schema Component Representation
<xs:element name="retrieval">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:retrievedURI "/>
<xs:sequence maxOccurs="unbounded">
<xs:element ref=" moki:HTTPRequest "/>
<xs:element ref=" moki:HTTPResponse "/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: retrievedURI

Name retrievedURI
Used by (from the same schema document) Element retrieval
Type xs:anyURI
Nillable no
Abstract no
Logical Diagram
XML Instance Representation
<moki:retrievedURI> xs:anyURI </moki:retrievedURI>
Diagram
Schema Component Representation
<xs:element name="retrievedURI" type=" xs:anyURI "/>
top

Element: status

Name status
Used by (from the same schema document) Element HTTPResponse
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

This is the HTTP response status line with code (e.g. 200) and reason (e.g. OK).

Logical Diagram
XML Instance Representation
<moki:status
code=" xs:integer [1]"
reason="anySimpleType [1]"/>
Diagram
Schema Component Representation
<xs:element name="status">
<xs:complexType>
<xs:attribute name="code" type=" xs:integer " use="required"/>
<xs:attribute name="reason" use="required"/>
</xs:complexType>
</xs:element>
top

Element: stylesheet

Name stylesheet
Used by (from the same schema document) Element stylesheets
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

An aspect of the style sheet information associated with the document - which might be an external style, a style element ("embedded") or "in line" style. The URI element refers to where the reference to the style sheet was found, rather than the URI of the style sheet itself.

POssibly missing here is a more precise reference to where the style was found - especially for "inline".

Logical Diagram
h674216329 h-442935887 h-604558118 h1275785586
XML Instance Representation
<moki:stylesheet
type=" xs:string (value comes from list: {'embedded'|'inline'|'external'}) [1]">
<moki:URI> ... </moki:URI> [1]
<moki:retrieval> ... </moki:retrieval> [0..1]
<moki:chars> ... </moki:chars> [0..1]
<moki:CSSValidity> ... </moki:CSSValidity> [1]
</moki:stylesheet>
Diagram
h674216329 h-442935887 h-604558118 h1275785586
Schema Component Representation
<xs:element name="stylesheet">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:URI "/>
<xs:element ref=" moki:retrieval " minOccurs="0"/>
<xs:element ref=" moki:chars " minOccurs="0"/>
<xs:element ref=" moki:CSSValidity "/>
</xs:sequence>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base=" xs:string ">
<xs:enumeration value="embedded"/>
<xs:enumeration value="inline"/>
<xs:enumeration value="external"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
top

Element: stylesheets

Name stylesheets
Used by (from the same schema document) Element moki
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

A collection of style sheet information associated with the document.

Logical Diagram
h902391665
XML Instance Representation
<moki:stylesheets>
<moki:stylesheet> ... </moki:stylesheet> [1]
</moki:stylesheets>
Diagram
h902391665
Schema Component Representation
<xs:element name="stylesheets">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:stylesheet "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: timestamp

Name timestamp
Used by (from the same schema document) Element aboutMe
Type anyType
Nillable no
Abstract no
Documentation

A timestamp of when the retrieval activity started.

The value should be the number of milliseconds elapsed since January 1, 1970 UTC.

Logical Diagram
XML Instance Representation
<moki:timestamp> ... </moki:timestamp>
Diagram
Schema Component Representation
<xs:element name="timestamp"/>
top

Element: transparency

Name transparency
Used by (from the same schema document) Element imageInfo
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

The "transparent" attribute is true if all the pixels of an image are transparent.

This would probably be better as an attribute.

Logical Diagram
XML Instance Representation
<moki:transparency
transparent=" xs:boolean [1]"/>
Diagram
Schema Component Representation
<xs:element name="transparency">
<xs:complexType>
<xs:attribute name="transparent" type=" xs:boolean " use="required"/>
</xs:complexType>
</xs:element>
top

Element: validity

Name validity
Used by (from the same schema document) Element XHTMLDocInfo
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

This element describes validity aspects of the primary document. The "valid" attribute summarises the validity status - it is true if all aspects of validity are true.

The mobileOK Checker incorrectly produces a validity element as a child element of the imageInfo element. It should rather produce an imageValidity element (whose definition it actually respects).

Logical Diagram
h1287264961 h1198673213 h-1204605513
XML Instance Representation
<moki:validity
valid=" xs:boolean [0..1]">
<moki:UTF-8Validity> ... </moki:UTF-8Validity> [1]
<moki:MarkupValidity> ... </moki:MarkupValidity> [1]
<moki:MobileValidity> ... </moki:MobileValidity> [1]
</moki:validity>
Diagram
h1287264961 h1198673213 h-1204605513
Schema Component Representation
<xs:element name="validity">
<xs:complexType>
<xs:sequence>
<xs:element ref=" moki:UTF-8Validity "/>
<xs:element ref=" moki:MarkupValidity "/>
<xs:element ref=" moki:MobileValidity "/>
</xs:sequence>
<xs:attribute name="valid" type=" xs:boolean "/>
</xs:complexType>
</xs:element>
top

Element: version

Name version
Used by (from the same schema document) Element aboutMe
Type xs:string
Nillable no
Abstract no
Documentation

The version of a processing component.

Logical Diagram
XML Instance Representation
<moki:version> xs:string </moki:version>
Diagram
Schema Component Representation
<xs:element name="version" type=" xs:string "/>
top

Element: warning

Name warning
Used by (from the same schema document) Complex Type validityType
Type moki:errorWarnType
Nillable no
Abstract no
Documentation

Records a validity warning.

Logical Diagram
h-573506543 h2013382412
XML Instance Representation
<moki:warning>
<moki:info> ... </moki:info> [1]
<moki:position> ... </moki:position> [1]
</moki:warning>
Diagram
h-573506543 h2013382412
Schema Component Representation
<xs:element name="warning" type=" moki:errorWarnType "/>
top

Element: xmlDecl

Name xmlDecl
Used by (from the same schema document) Element XHTMLDocInfo
Type Locally-defined complex type
Nillable no
Abstract no
Documentation

Details of the XML declaration of the primary document. "declaration" indicates the presence or otherwise of an XML declaration, encoding indicates the declared character encoding, absent if none.

Missing: version? Absent indicates no version declared, present, the version declared.

Logical Diagram
XML Instance Representation
<moki:xmlDecl
declaration=" xs:boolean [1]"
encoding=" xs:string [1]"/>
Diagram
Schema Component Representation
<xs:element name="xmlDecl">
<xs:complexType>
<xs:attribute name="declaration" type=" xs:boolean " use="required"/>
<xs:attribute name="encoding" type=" xs:string " use="required"/>
</xs:complexType>
</xs:element>
top

Global Definitions

Complex Type: errorWarnType

Super-types: None
Sub-types: None
Name errorWarnType
Used by (from the same schema document) Element error , Element warning
Abstract no
Documentation

The underlying type for moki error and warning details.

Possibly need to allow for more than one info to allow for multi-lingual reporting.

More than one position to allow for multiple errors of same type?

XML Instance Representation
<...>
<moki:info> ... </moki:info> [1]
<moki:position> ... </moki:position> [1]
</...>
Diagram
h-573506543 h2013382412
Schema Component Representation
<xs:complexType name="errorWarnType">
<xs:sequence>
<xs:element ref=" moki:info "/>
<xs:element ref=" moki:position "/>
</xs:sequence>
</xs:complexType>
top

Complex Type: validityType

Super-types: None
Sub-types: None
Name validityType
Used by (from the same schema document) Element CSSValidity , Element imageValidity , Element UTF-8Validity , Element MarkupValidity , Element MobileValidity
Abstract no
Documentation

The underlying type for moki error reporting.

XML Instance Representation
<...
valid=" xs:string (value comes from list: {'VALID'|'INVALID'|'NOT_VALIDATED'|'true'|'false'}) [1]">
Start Choice [0..*]
<moki:error> ... </moki:error> [1]
<moki:warning> ... </moki:warning> [1]
End Choice
</...>
Diagram
h-602396923 h-774391463
Schema Component Representation
<xs:complexType name="validityType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref=" moki:error "/>
<xs:element ref=" moki:warning "/>
</xs:choice>
<xs:attribute name="valid" use="required">
<xs:simpleType>
<xs:restriction base=" xs:string ">
<xs:enumeration value="VALID"/>
<xs:enumeration value="INVALID"/>
<xs:enumeration value="NOT_VALIDATED"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
top

Legend

Complex Type:

Schema Component Type

AusAddress

Schema Component Name
Super-types: Address < AusAddress (by extension)
Sub-types:
  • QLDAddress (by restriction)
If this schema component is a type definition, its type hierarchy is shown in a gray-bordered box.
Name AusAddress
Abstract no
The table above displays the properties of this schema component.
XML Instance Representation
<... country="Australia" >
<unitNo> string </unitNo> [0..1]
<houseNo> string </houseNo> [1]
<street> string </street> [1]
Start Choice [1]
<city> string </city> [1]
<town> string </town> [1]
End Choice
<state> AusStates </state> [1]
<postcode> string <<pattern = [1-9][0-9]{3}>> </postcode> [1] ?
</...>

The XML Instance Representation table above shows the schema component's content as an XML instance.

Schema Component Representation
<complexType name="AusAddress">
<complexContent>
<extension base=" Address ">
<sequence>
<element name="state" type=" AusStates "/>
<element name="postcode">
<simpleType>
<restriction base=" string ">
<pattern value="[1-9][0-9]{3}"/>
</restriction>
</simpleType>
</element>
</sequence>
<attribute name="country" type=" string " fixed="Australia"/>
</extension>
</complexContent>
</complexType>
The Schema Component Representation table above displays the underlying XML representation of the schema component. (Annotations are not shown.)
top

Glossary

Abstract (Applies to complex type definitions and element declarations). An abstract element or complex type cannot used to validate an element instance. If there is a reference to an abstract element, only element declarations that can substitute the abstract element can be used to validate the instance. For references to abstract type definitions, only derived types can be used.

All Model Group Child elements can be provided in any order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-all.

Choice Model Group Only one from the list of child elements and model groups can be provided in instances. See: http://www.w3.org/TR/xmlschema-1/#element-choice.

Collapse Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32). Then, collapse contiguous sequences of space characters into single space character, and remove leading and trailing space characters.

Disallowed Substitutions (Applies to element declarations). If substitution is specified, then substitution group members cannot be used in place of the given element declaration to validate element instances. If derivation methods, e.g. extension, restriction, are specified, then the given element declaration will not validate element instances that have types derived from the element declaration's type using the specified derivation methods. Normally, element instances can override their declaration's type by specifying an xsi:type attribute.

Key Constraint Like Uniqueness Constraint, but additionally requires that the specified value(s) must be provided. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Key Reference Constraint Ensures that the specified value(s) must match value(s) from a Key Constraint or Uniqueness Constraint. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Model Group Groups together element content, specifying the order in which the element content can occur and the number of times the group of element content may be repeated. See: http://www.w3.org/TR/xmlschema-1/#Model_Groups.

Nillable (Applies to element declarations). If an element declaration is nillable, instances can use the xsi:nil attribute. The xsi:nil attribute is the boolean attribute, nil, from the http://www.w3.org/2001/XMLSchema-instance namespace. If an element instance has an xsi:nil attribute set to true, it can be left empty, even though its element declaration may have required content.

Notation A notation is used to identify the format of a piece of data. Values of elements and attributes that are of type, NOTATION, must come from the names of declared notations. See: http://www.w3.org/TR/xmlschema-1/#cNotation_Declarations.

Preserve Whitespace Policy Preserve whitespaces exactly as they appear in instances.

Prohibited Derivations (Applies to type definitions). Derivation methods that cannot be used to create sub-types from a given type definition.

Prohibited Substitutions (Applies to complex type definitions). Prevents sub-types that have been derived using the specified derivation methods from validating element instances in place of the given type definition.

Replace Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32).

Sequence Model Group Child elements and model groups must be provided in the specified order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-sequence.

Substitution Group Elements that are members of a substitution group can be used wherever the head element of the substitution group is referenced.

Substitution Group Exclusions (Applies to element declarations). Prohibits element declarations from nominating themselves as being able to substitute a given element declaration, if they have types that are derived from the original element's type using the specified derivation methods.

Target Namespace The target namespace identifies the namespace that components in this schema belongs to. If no target namespace is provided, then the schema components do not belong to any namespace.

Uniqueness Constraint Ensures uniqueness of an element/attribute value, or a combination of values, within a specified scope. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

top