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

Re: Machine readable information about elements and attributes

From: Christoph LANGE <ch.lange@jacobs-university.de>
Date: Tue, 2 Feb 2010 14:04:28 +0100
To: David Carlisle <davidc@nag.co.uk>
Cc: Urs Holzer <urs@andonyar.com>, "www-math@w3.org" <www-math@w3.org>
Message-Id: <201002021404.35365.ch.lange@jacobs-university.de>
2010-02-02 13:24 David Carlisle <davidc@nag.co.uk>:
> On 02/02/2010 12:05, Urs Holzer wrote:
> > My MathML editor needs the following information about MathML elements
> > and their attributes:
> > - Whether an element is considered Content MathML or Presentation MathML
> > (or both)

The RELAX NG is organized in a modular way, separating Content from
Presentation.  Otherwise a simple heuristics may help, such as: anything
starting with "c" is Content, anything starting with "m" (except known
Pragmatic Content MathML symbols) is Presentation, and the rest is – no idea.

> > - Number of children
> > - List of all attributes of an element

David has already answered these.  Still I don't know whether there are any
usable libraries that allow you to parse e.g. RELAX NG into an internal
representation that you can not just use for validation but also query in the
desired way.  I mean more easily than e.g. XQuerying RNG.  There should be
something, as any good XML editor would need it.

> > - Default value of an attribute

Technically this can also be implemented in a DTD, but not everybody
recommends doing so, and I don't recall whether it is done for MathML.  So I'd
follow David's approach here, as for the inheritance you need to process the
spec anyway.

Cheers,

Christoph

-- 
Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701

Received on Tuesday, 2 February 2010 13:04:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:13:06 GMT