a 'mooh' point

clearly an IBM drone

Now I get it - ODF and MathML

(see updated content below) 

Some time ago I wrote an article about ODF and usage of mathematical content by MathML. One of the quirks I couldn't get my head around was why the XML-file containing the MathML-document had to be named "content.xml". I used the phrasing

This was a bit more tricky, since somehow it seems that the mathical formula can only be contained in a file called "content.xml" - otherwise OpenOffice.org simply shuts down.

Well ... the answer came to me almost in a dream - or at least in the evening in one of those semi-awake-states. Basically the answer lies in the answer I never got on my question on which parts in an ODF-poackage are mandatory and if there are any parts with pre-defined names. The ODF-specification  section 9.3.3 says for embedding objects:

  • The xlink:href attribute links to the object representation, as follows:
    • For objects that have an XML representation, the link references the sub package of the object. The object is contained within this sub page exactly as it would as it is a document of its own.
    • For objects that do not have an XML representation, the link references a sub stream of the package that contains the binary representation of the object.

Now, in ODF MathML clearly has an XML-representation and MathML is also a "real" "OpenDocument representation". So a MathML is stored as a "sub package" within the ODF-package itself. And that brings me back to my original question.  You see, even though a piece of MathML is not a OpenDocument file per se, it still has to be embedded as an entire ODF-package (without the ZIP-structure). Section 2.1 clearly states this as

A document root element is the primary element of a document in OpenDocument format. It contains the entire document. All types of documents, for example, text documents, spreadsheets, and drawing documents use the same types of document root elements. The OpenDocument format supports the following two ways of document representation: 

  • As a single XML document.
  • As a collection of several subdocuments within a package (see section 17), each of which stores part of the complete document. Each subdocument has a different document root andsstores a particular aspect of the XML document. For example, one subdocument contains the style information and another subdocument contains the content of the document. All types of documents, for example, text and spreadsheet documents, use the same document and subdocuments definitions.

And since an ODF-package requires the main part to be called "content.xml" the MathML-file needs to be called "content.xml" as well. There is also no manifest file in the sub-package to tell the name of the package part - hence the requirement to have a fixed part name for the main part.  I wish this information was more clearly described in ODF and not simply implied in the text.

... did I mention that I prefer the relationship-model of OPC?

Smile

(update  2008-05-16)

A bit down in the comment track of this post I promised to make an ODT-file with MathML embedded inline as opposed to the "regular" OOo-way of embedding it as a seperate object. Today I finally got around to doing it. It was actually really easy - I just took the embedded MathML-object from the ODF-package and pasted in into the correct location in the content.xml-file. A good thing is that with this approach you don't have to worry about specifying a DOCTYPE (the OOo-dependancy), so I would say this is highly recommendable. The XML looks like this:

[code=xml]<draw:frame
  draw:name="Objekt1"
  text:anchor-type="as-char"
  svg:width="2.972cm"
  svg:height="1.138cm"
  draw:z-index="0">
  <draw:object>
    <math:math>
      <math:mrow>
        <math:mtext>cos</math:mtext>
        <math:mo>(</math:mo>
        <math:mfrac>
          <math:mi>pi</math:mi>
          <math:mn>4</math:mn>
        </math:mfrac>
        <math:mo>)</math:mo>
        = <math:mo>(</math:mo>
        <math:mfrac>
          <math:msqrt>
            <math:mn>2</math:mn>
          </math:msqrt>
          <math:mn>2</math:mn>
        </math:mfrac>
        <math:mo>)</math:mo>
      </math:mrow>
    </math:math>
</draw:object>
</draw:frame>[/code]

When opened in OOo (2.4 DA) the result looks like this:

 


Only remaining quirk is the missing "equals-sign", but I haven't had time to dig into those details yet.

If anyone can help and contribute here, that would be great.

 

T-Shirts for everyone

On the last day of the BRM I posted an image emailed to me during the very last minutes of the meeting. This image has now made it to CaféPress. Now this's one for the beaches this summer!

Check it out ... 

 

Update 2008-03-23:

If you have pictures - please send them to me ... I'll post them here.

Smile


(notice sticker) 

BRM aftermath

Sitting in the airport in Geneva waiting for my home-bound fight I finally have a couple of hours to do nothing but reflect on what happened through last week.

It truly has been a magnificent week. About 120 people from a bit more than 35 countries from around the world participated in the technical discussion in improving the OOXML-spec (DIS 25000). It was a monstrous task and I think we all felt a bit nervous on the first day – at least I can see Tim Bray was as nervous as I. The task at hand – to reach consensus on the 1000 odd responses from ECMA – was an impossible task given the 5 working days we had, so I was anxious to find out what the convener Alex Brown had up his sleeve. We, the delegates at the BRM, have naturally been talking a great deal in the corridors between sessions, in the hotel lobbies and everywhere else we got together about how to solve this “Gordian knot” and countless emails have been exchanged between us about this very subject. We have also talked a lot about this afterwards and have tried to do some evaluations on the process chosen by the BRM. It is always nice to do this – hind-sight is 20/20-vision.

Smile

Let me also note that I was deeply impressed about the technical level of the delegates. We had some really good and in-depth discussions during the week. Countries that particularly impressed me were Canada, UK, USA, Germany, Israel and The Czech Republic. I appologize to those I forgot.

I think the process chosen was the best process given the circumstances. All alternatives were in my opinion worse than the one chosen – and I think it is important to emphasize that the process was chosen by the BRM and not chosen for the BRM. The way the BRM works is normally this: When a DIS fails it is evaluated if the countries voting had a desire to approve the specification – but that they didn’t feel the specification was good enough. If this is the case a BRM is scheduled and the purpose of the BRM is to improve the specification so that the countries can change their vote from “No” to “Yes” (or any other way). The result of the BRM is a list of improvements or changes to the DIS. These improvements have to be presented and approved (preferably by consensus) by the BRM itself. So the rules governing the BRM essentially meant this: If a piece of text is not presented to the BRM, it cannot get approved and hence incorporated into the failed DIS. A side note is that at the BRM the member-status of SC34 does not count, so O-members are not treated differently than P-members (at least that was my understanding).

When talking to the other delegates we more or less agreed that the number of Responses not dealt with would be something in the area of 800-850 in total. So we basically had two choices:

  • Do nothing
  • Do something

The BRM chose to do something. We didn’t all agree to what to do and as it has been reported all over the blog-sphere, most parts of a whole day was spent discussing what to do. I think most of the delegates disliked the position we were put in – but regardless of this we were in this situation whether we liked it or not. We had to do something.

That “something” was to do a vote on each of the remaining responses from ECMA. It was not a bulk-vote as reported on various sites – it was a vote on each and every single response.

I will not comment on what individual countries (including my own) voted and their reasons for it, but it seemed to be from discussing this, that the various reasons given for a specific vote fell into these categories:

  • We think the responses from ECMA are generally an improvement to the DIS and therefore we approve all responses not dealt with during the BRM
  • As a principle we cannot do anything but disapprove responses that have not been dealt with
  • We think the BRM is about reaching consensus and this vote bypasses this process and we therefore disapprove  all responses we haven’t dealt with
  • We will vote “yes” or “no” to those responses we have a qualified opinion about and we will abstain on the rest. This effectively means that the “fate” of these responses is left to those countries that actually have an opinion on them
  • We don’t want to participate in this vote at all

… and the rest, as they say, is history.

Smile

Within minutes of after Friday 29th of February at 17:00 rumors started to flow that “The BRM failed” or “ISO failed”. I honestly disagree to this. We were facing an impossible task but we dealt with it according to the purpose of the BRM: To change and improve the DIS. There is really nothing more to say about it. Now the national bodies can sit down and look at the result of the BRM and see if the DIS is now in a position to be approved. That process has always been aside to the BRM itself and whatever was voted on and how the votes were distributed is really not relevant in terms of approving the DIS. The DIS is now what it is and that is what is to be decided 29 days from now.

And now for a few quotes from inside the BRM:

“We need a precise definition of inaccuracy”

“The <country omitted> would like to note that there are actually ‘normal’ people that don’t speak English natively”

“Convener: <country omitted>, you had a comment?
Country: I have absolutely no idea“

Smile

(and now my plane is delayed for at least two hours)

Namedropping in Geneva

So - that was it ... it really was. The BRM ended a bit less than an hour ago and I am now back at my hotel. I have previously been accused of name-dropping too much, but I'm glad to be able to say, that I have now been name-dropped. At least Dough Mahugh was kind enough to mention me yesterday before rambling about burning his suit. It has been a pleasure to work with all these 120 people frm 37 countries in the last week and it has been great to finally get to meet Rob Weir, Tim Bray, Charlez H. Schultz (who attended the OFE-meetings down-stairs) and of course Alex Brown.

I will be back with more info lter this weekend ... when I am no longer as sleep-deprived as now.

Smile

I love BRM

 

 

Thanks to the Portugeese delegation Smile