Hey Shaun,<br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 9:17 AM, Shaun McCance <span dir="ltr"><<a href="mailto:shaunm@gnome.org">shaunm@gnome.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi folks,<br>
<br>
I'd like to change some details of how the RNG schema is defined.<br>
I want to split out definitions for attributes and content. For<br>
example, this is the current definition for block media:<br>
<br>
mal_block_media = element media {<br>
attribute type { "image" | "video" | "audio" | "application" } ?,<br>
attribute mime { text } ?,<br>
attribute src { text },<br>
attribute height { text } ?,<br>
attribute width { text } ?,<br>
attribute style { xsd:NMTOKENS } ?,<br>
mal_attr_external *,<br>
<br>
mal_block *<br>
}<br>
<br>
What I'm proposing is this:<br>
<br>
mal_block_media = element media {<br>
mal_block_media_attr,<br>
mal_block_media_cont<br>
}<br>
mal_block_media_attr = (<br>
attribute type { "image" | "video" | "audio" | "application" } ?,<br>
attribute mime { text } ?,<br>
attribute src { text },<br>
attribute height { text } ?,<br>
attribute width { text } ?,<br>
attribute style { xsd:NMTOKENS } ?,<br>
mal_attr_external *<br>
)<br>
mal_block_media_cont = (<br>
mal_block *<br>
)<br>
<br>
This has no effect on the validity of existing documents. It's<br>
semantically equivalent. What it does is make it easier to write<br>
extensions. For example, I did some work on embedding TTML into<br>
Mallard for video captions:<br>
<br>
<a href="http://blogs.gnome.org/shaunm/2010/11/08/mallardttml-video-captions/" target="_blank">http://blogs.gnome.org/shaunm/2010/11/08/mallardttml-video-captions/</a><br>
<br>
With this proposal, the extension schema for Mallard+TTML would<br>
have something like this:<br>
<br>
mal_block_media_cont |= element tt:tt { ... }<br>
<br>
Without this proposal, we'd have to add tt:tt to the mal_block<br>
choice, which would allow TTML in all sorts of places.<br>
<br>
The one downside is that it does make the schema a bit harder<br>
to read. I don't know how many people read the schema to learn<br>
Mallard, versus reading the notes and examples. I'm a schema<br>
person.<br>
<br>
Any objections?<br>
<br>
--<br>
Shaun<br>
<br></blockquote></div><br>+1<br><br>I think the separation makes sense, and the schema is still easily readable to me, too. Thanks for your work!<br><br>Jim<br>