Target Namespace | http://www.w3.org/2007/05/moki |
---|---|
Element and Attribute Namespaces |
|
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. |
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 |
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. |
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. |
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 |
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 |
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 |
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 |
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 |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
Name | error |
---|---|
Used by (from the same schema document) | Complex Type validityType |
Type | moki:errorWarnType |
Nillable | no |
Abstract | no |
Documentation |
Records a validity error. |
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. The mobileOK checker uses this form for the HTTP headers listed in HeaderParseMethod as HTTP header names are normalized to lower case in all cases. |
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. |
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. |
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. |
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. |
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 |
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. |
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. |
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? |
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. |
Name | moki |
---|---|
Type | Locally-defined complex type |
Nillable | no |
Abstract | no |
Documentation |
The root element of a moki document. |
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. |
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. |
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:
|
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. |
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). |
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. |
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. |
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. |
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. |
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. |
Name | retrievedURI |
---|---|
Used by (from the same schema document) | Element retrieval |
Type | xs:anyURI |
Nillable | no |
Abstract | no |
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). |
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". |
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. |
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. |
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. |
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). |
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. |
Name | warning |
---|---|
Used by (from the same schema document) | Complex Type validityType |
Type | moki:errorWarnType |
Nillable | no |
Abstract | no |
Documentation |
Records a validity warning. |
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. |
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? |
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. |
Super-types: | Address < AusAddress (by extension) |
---|---|
Sub-types: |
|
Name | AusAddress |
---|---|
Abstract | no |
The XML Instance Representation table above shows the schema component's content as an XML instance.
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.