W3C home > Mailing lists > Public > www-math@w3.org > July 2010

Re: What tools do you use for working with rnc?

From: Roger Martin <mathmldashx@yahoo.com>
Date: Mon, 12 Jul 2010 06:04:29 -0700 (PDT)
Message-ID: <434167.36210.qm@web37901.mail.mud.yahoo.com>
To: David Carlisle <davidc@nag.co.uk>
Cc: www-math@w3.org

I appreciate the spec is the source document for the rnc.  Makes sense. 
 I wasn't able to get as far as I wanted this weekend; it will take 

For mathml4 I'll come back with some proposed additions such as a 
binomial coefficient and some matrix operations particularly 
decompositions.  But later for these.

For the xsd I'm looking at it with Netbeans views and the binding by 
jaxb.  At many places the possible children of an element are unbounded 
choices and any order is allowed.  This leaves much of the schema 
unrestrained compared to the spec if I'm reading it right.

For example








validates.  Many other non spec or non-math combinations pass jing 
validation.  The binding becomes element objects with every getter/setter for 
the children where the next layer of code must check through, look for 
non-null's and apply its own constraints and decide what to do for each
 combination to make mathematical sense.

I'll need more time though to come up with more rnc/xsd testing and 
examples of xsd for possible constraints useful for binding.  The 
netbeans (multi)viewer is very helpful in seeing the effects of 
unbounded choices.

--- On Tue, 7/6/10, David Carlisle <davidc@nag.co.uk> wrote:

From: David Carlisle <davidc@nag.co.uk>
Subject: Re: What tools do you use for working with rnc?
To: "Roger Martin" <mathmldashx@yahoo.com>
Cc: www-math@w3.org
Date: Tuesday, July 6, 2010, 10:09 AM

On 05/07/2010 18:00, Roger Martin wrote:
> Hi,
> I'm experimenting with mathml3 schema binding as it was generated from
> rnc. To communicate on mathml I guess I should write in terms of rnc?

The rnc file is (mostly) generated by XSLT from the tables in the working draft of the MathML3 specifcation, so while it's good to refer to secific parts of the rnc schema if there are problems with the schema itself, if you want to talk in general terms about properties of the MathML elements just referring to sections in the spec is just as good and probably better than referring to the schema.

> What tools do you use to write the mathml3 rnc files

Parts are written by hand but the majority is extracted by XSLT from the xml source of the working draft, as noted above.

> and validate them?
> I've been using googlecode jing for some validation.

The RelaxNG tools I use most are jing (a bit), rnv (my usual tool for validating xml files against the schema from a commandline) and emacs nxml-mode (It's hard to imagine a life without nxml-mode).

> If I want to propose extra operators, are rnc file diff's and patches a
> good way to specify them?

As noted above, the spec may be a better thing to refer to than the schema. Also note that at this stage in the MathML3 specification procedure we are very constrained in the changes that we can make, fixing typos etc, but the idea is to show that the features specified are implementable so that we can (very soon) progress to proposed recommendation and recommendation stage. Clearly if additions are made at this stage they are likely to invalidate implementations.

That said, please do make suggestions, even if they are too late for MathML3 they can form part of the requirements for v4 (or we can suggest ways of achieving the requirements using existing elements)

> Jaxb binding (https://jaxb.dev.java.net/) of mathml3.xsd produces
> bindings where the calling code needs to complete constraints or loop
> and check inefficiently. I'm testing what could make this better yet
> need to become more familiar with rnc.

Unlike the specification and the RelaxNG, the XSD schema is something we can probably change at this stage if there is good implementation reason to do so. It is generated by using some XSLT to simplify the RelaxNG schema to the point that trang can convert the simplified rng to xsd. If the resulting XSD could be improved to work better with
XSD based data binding tools this would be good to know, and is something we could try to fix.

Hope this helps,

thanks for the comments,


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 Monday, 12 July 2010 13:05:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:43 UTC