Re: [MathML3-last-call] Improving MathML internationalization capabilities

Jirka, ITS IG,

Thank you for your comments.


> 
> 
> Despite MathML content usually contains only language neutral
> mathematical expression there are few issues related to
> internationalization which we would like to see improved before going to
> recommendation.
> 
> 1. It should be possible to specify/change directionality of text on
> mtext element using dir attribute (currently attribute is not allowed
> there).
> 
> For more background information see http://www.w3.org/TR/xml-i18n-bp/#Dev=
> Dir


Our thought here was that the provision of dir to set the direction of
the layout direction and initial text direction, together with the
Unicode Bidi algorithm handling text runs would be sufficient.
When in very rare edge cases you need to set the initial direction of
text you may use <mrow dir="rtl"><mtext>....</mtext></mrow>, however 
adding dir to mtext would make this a little less verbose so we
propose to add dir to the attributes shared by all token elements.


> 2. It should be possible to specify language of content using xml:lang
> attribute at least on mtext and math elements.
> 
> For more background information see
> http://www.w3.org/TR/xml-i18n-bp/#DevLang


This is already allowed as xml:anything is allowed on every MathML element.
Any namespaced attribute is allowed and of course the xml: attributes
are particularly  easy as the xml namespace is pre-declared. We will
add a sentence to the specification where it is discussing common
attributes highlighting this and giving xml:lang as an example.

This comment has also highlighted that while the current RelaxNG and
XSD schemas currently allow xml: attributes, the DTD does not. This is
a bug in the Relax to DTD conversion used that will be fixed. The DTD
is non normative and not in TR space so we can fix this inline,
possibly this week.

> 
> 3. It should be possible to specify directionality and language not only
>  for whole mtext element but also for parts of text inside the element.
> For example for cases when mtext contains English text with foreign
> phrase inside etc. This can be easily accomplished by adding child
> element to mtext (e.g. span, mspan, phrase, ...) which can have dir,
> xml:lang and any number of other foreign attributes (e.g. ITS local
> markup). Such element should allow nesting to handle rare cases where
> more scripts are mixed at the same time.
> 
>
> 4. It should be possible to specify Ruby annotation inside mtext. This
> can be accomplished by allowing ruby markup inside mtext:
> 
> http://www.w3.org/TR/xml-i18n-bp/#DevRuby
> 

Both 3 and 4 are related comments, proposing extending the content
model of mtext.

There are competing pressures to allow markup inside mtext for all
sorts of reasons and allowing MathML specific markup would complicate
this extension point greatly.  Chapter 6 currently states that if you
are using a compound document format with MathML embedded in some
larger document type that you are advised to open up token elements to
allow foreign namespaced elements. So in xhtml+mathml you could allow
xhtml spans and ruby markup. If there were MathML specific markup
inline as well this would complicate the interaction, similarly in
MathML+docbook one would want to use docbook inline elements for
marking up text, not mathml.

We plan to revise the text in chapter 6 

http://www.w3.org/TR/MathML3/chapter6.html#world-int-combine-other

to make this clearer and could add Ruby as an example here.

As an alternative to allowing xhtml+ruby inside mtext via an extended
schema as discussed section 6.4, one could use an xhtml+ruby
annotation in the unextended schema.

<semantics>
  <mtext>basic fallback text</mtext>
  <annotation-xml encoding=...>
   <span xhtml="http://www.w3.org/1999/xhtml">
     ... xhtml + Ruby markup ...
   </span>
  </annotation-xml>
</semantics>

We hope that you will agree that these two mechanisms to provide the
required functionality here.


David Carlisle
For the Math WG

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Received on Tuesday, 3 November 2009 21:56:34 UTC