Re: ITS and XHTML 1.0

Hi Yves,

This looks great! Richard, could you have a look at this, since you are
the XHTML expert?

What we still would need is a modularization XHTML+ITS, like Sebastian
did for ITS and I did it for XML Spec. But that can wait, I guess.
Just a comment below.

Yves Savourel wrote:
> ITS and XHTML 1.0
> 
> Here is a try at XHTML with ITS. I've used the proposed notation. This is a possible ITS documentRule to handle XHTML files: (I
> though I had posted this altready, but can't find it in the mail archives, so here is it)
> 
> 
> <?xml version="1.0"?>
> <its:documentRules xmlns:its="http://www.w3.org/2005/11/its">
> 
>  <!-- Namespace -->
>  <its:ns its:prefix="h" its:uri="http://www.w3.org/1999/xhtml"/>
> 
>  <!-- Elements not to translate -->
>  <its:translateRule its:selector="//h:del" its:translate="no"/>
>  <its:translateRule its:selector="//h:script" its:translate="no"/>
>  <its:translateRule its:selector="//h:style" its:translate="no"/>
> 
>  <!-- Special attributes: Note that some choices are just guess based on personal experience, for example I think hidden <input>
> fields are usually not transltable, but that may not be the case all the time. -->
>  <its:translateRule its:selector="//h:*/@abbr" its:translate="yes"/>
>  <its:translateRule its:selector="//h:*/@accesskey" its:translate="yes"/>
>  <its:translateRule its:selector="//h:*/@alt" its:translate="yes"/>
>  <its:translateRule its:selector="//h:*/@prompt" its:translate="yes"/>
>  <its:translateRule its:selector="//h:*/@standby" its:translate="yes"/>
>  <its:translateRule its:selector="//h:*/@summary" its:translate="yes"/>
>  <its:translateRule its:selector="//h:*/@title" its:translate="yes"/>
>  <its:translateRule its:selector="//h:input/@value" its:translate="yes"/>
>  <its:translateRule its:selector="//h:input[@type='hidden']/@value" its:translate="no"/>
>  <!-- Often-used translatable meta content. -->
>  <its:translateRule its:selector="//h:meta[@name='keywords']/@content" its:translate="yes"/>
>  <its:translateRule its:selector="//h:meta[@name='description']/@content" its:translate="yes"/>
> 
>  <!-- Terminology helper -->
>  <its:termRule its:selector="//h:dt" its:term="yes"/>
>  
>  <!-- XHTML 1.1 bidi markup -->
>  <its:dirRule its:selector="//h:*[@dir='ltr']" its:dir="ltr"/>
>  <its:dirRule its:selector="//h:*[@dir='rtl']" its:dir="rtl"/>
I think to exclude the "bdo" element, you might write
<its:dirRule its:selector="//h:*[not(name()='bdo') and @dir='rtl']"
its:dir="rtl"/>
but strictly speaking it is not necessary, since the order of the
dirRule elements has the same effect.
>  <its:dirRule its:selector="//h:bdo[@dir='ltr']" its:dir="lro"/>
>  <its:dirRule its:selector="//h:bdo[@dir='rtl']" its:dir="rlo"/>
> 
>  <!-- Elements within text -->

Did you decide here to go without the "yes" ("no") attribute?

>  <its:withinTextRule its:selector="//h:abbr | //h:acronym | //h:br | //h:cite"/>
>  <its:withinTextRule its:selector="//h:code | //h:dfn //h:em | //h:strike | //h:u"/>
>  <its:withinTextRule its:selector="//h:kbd | //h:q | //h:samp | //h:span"/>
>  <its:withinTextRule its:selector="//h:strong | //h:var | //h:b | //h:isindex"/>
>  <its:withinTextRule its:selector="//h:big | //h:hr | //h:i | //h:small | //h:sub"/>
>  <its:withinTextRule its:selector="//h:sup | //h:tt" //h:del | //h:ins | //h:bdo"/>
>  <its:withinTextRule its:selector="//h:img | //h:a | //h:font | //h:center | //h:s"/>
> 
>  <!-- Language mapping not sure about the value for langMap, shouldn't it "//*/@lang"? -->
>  <its:langRule its:langMap="@lang" />

I think this should be <its:langRule its:selector="//*"
its:langMap="@lang" />
> 
>  <!-- There is no ruby markup in XHTML 1.0 -->
>  
> </its:documentRules>
> 
> 

Received on Tuesday, 14 March 2006 03:00:22 UTC