A Microformat for ITS 1.0

Please send comments to felix.sasaki@fh-potsdam.de , or - even better - to the W3C ITS IG mailing list (subscribe).

This draft is a first, *incomplete* proposal for a microformat for data categories defined in the ITS 1.0 specification.

General approach

The general approach is as follows:

  1. Define class attributes for global rules and for local markup
  2. Define a RELAX NG schema for validating the structure of the class attribute for global rules. For local rules the validation is not possible (yet, see section "open questions" below).
  3. Define two XSLT stylesheets, one to convert ITS 1.0 into a microformat representation and another one for the reverse transformation.

The general approach is implemented for the Translate data category below.

Implementation for the "Translate" data category

1) Class attributes

For global rules (the its:translateRule element) the microformat would be as follows.

<span class="translateRule">

<span class="selector">//code</span>:

<span class="translate">no</span>

</span>

2) RELAX NG schema

The schema (in compact syntax) for the above fragment would look as follows:

default namespace = "http://www.w3.org/1999/xhtml"

start = mf-translateRule

mf-translateRule = element span { attribute class { "translateRule" }, selector, translateGlobal }

selector = element span { attribute class { "selector" }, text }

translateGlobal = element span { attribute class { "translate" }, ("yes" | "no") }

3) XSLT Stylesheet

The XSLT itself is not given here, but the result of applying one stylesheet (its2itsmf.xsl) to the input given at 1) would be below.

<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">

<its:translateRule selector="//h:code" translate="no" xmlns:h="http://www.w3.org/1999/xhtml"/>

</its:rules>

The result of applying the complementary stylesheet (itsmf2its.xsl) to the <its:rules> element would be the microformat presented at 1).

Open questions

As mentioned above, the approach is incomplete. Before moving forward the following questions need to be answered.

a) How to represent locally a/v pairs with values which are not a fixed set in HTML without introducing a new element? E.g. how to represent a reference to a term definition in

<a href="someLinke" class="term">

with native ITS markup this would be

<a href="someLinke" its:term="yes" its:termInfoRef="referenceToTermdefinition">

b) How to validate a microformat representation of local ITS markup, e.g. the class attribute with the value "translateno", which corresponds to the local ITS markup “its:translate='no'”. Validating e.g. <span class=”translateno”>, i.e. restricting the value of the class attribute, would cause conflicts with other values of class.