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.

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

Editor: Jo Rabin

Date: 22 October 2007

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

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

Previous Version: (none)

Status: Editor's Draft

$Id: moki.xsd.html,v 1.1 2007-10-22 18:21:07 JoRabin Exp $

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



HTTP Related



Validity Reporting

Declared Namespaces

Prefix Namespace
xml http://www.w3.org/XML/1998/namespace
xs http://www.w3.org/2001/XMLSchema
moki http://www.w3.org/2007/05/moki
xhtml http://www.w3.org/1999/xhtml
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 valdity (no errors) indicated by "valid" attribute being true.

Logical Diagram
h-602396923 h-774391463
XML Instance Representation
<moki:CSSValidity
valid=" xs:boolean [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:boolean [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:boolean [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:boolean [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.

In the alpha release of the checker this information is absent and the element is optional.

In future versions of this schema additional elements will be introduced identifying various validation and other components.

Logical Diagram
h-573369874 h674216329 h-1547229547 h-458813592
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:aboutMe>
Diagram
h-573369874 h674216329 h-1547229547 h-458813592
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: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
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="