Proposed RNG Changes

Jim Campbell <jwcampbell at gmail.com>
Thu Feb 17 14:46:50 EST 2011

Hey Shaun,

On Wed, Feb 16, 2011 at 9:17 AM, Shaun McCance <shaunm at gnome.org> wrote:

> Hi folks,
>
> I'd like to change some details of how the RNG schema is defined.
> I want to split out definitions for attributes and content. For
> example, this is the current definition for block media:
>
> mal_block_media = element media {
>  attribute type { "image" | "video" | "audio" | "application" } ?,
>  attribute mime { text } ?,
>  attribute src { text },
>  attribute height { text } ?,
>  attribute width { text } ?,
>  attribute style { xsd:NMTOKENS } ?,
>  mal_attr_external *,
>
>  mal_block *
> }
>
> What I'm proposing is this:
>
> mal_block_media = element media {
>  mal_block_media_attr,
>  mal_block_media_cont
> }
> mal_block_media_attr = (
>  attribute type { "image" | "video" | "audio" | "application" } ?,
>  attribute mime { text } ?,
>  attribute src { text },
>  attribute height { text } ?,
>  attribute width { text } ?,
>  attribute style { xsd:NMTOKENS } ?,
>  mal_attr_external *
> )
> mal_block_media_cont = (
>  mal_block *
> )
>
> This has no effect on the validity of existing documents. It's
> semantically equivalent. What it does is make it easier to write
> extensions. For example, I did some work on embedding TTML into
> Mallard for video captions:
>
> http://blogs.gnome.org/shaunm/2010/11/08/mallardttml-video-captions/
>
> With this proposal, the extension schema for Mallard+TTML would
> have something like this:
>
> mal_block_media_cont |= element tt:tt { ... }
>
> Without this proposal, we'd have to add tt:tt to the mal_block
> choice, which would allow TTML in all sorts of places.
>
> The one downside is that it does make the schema a bit harder
> to read. I don't know how many people read the schema to learn
> Mallard, versus reading the notes and examples. I'm a schema
> person.
>
> Any objections?
>
> --
> Shaun
>
>
+1

I think the separation makes sense, and the schema is still easily readable
to me, too.  Thanks for your work!

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projectmallard.org/pipermail/mallard-list/attachments/20110217/d7d2465b/attachment.html>