OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: [relax-ng] trang instance input module

> About Examplotron, I plan to add some additional features to get to the
> 80/20 point (probably including simple types, control over attributes,
> mixed contents and interleave) and then "import" the RNG patterns in the
> Examplotron namespace for users who would like to stay with Examplotron
> for the remaining 20%.

This seems like a good approach to me.  I think there should be a 
bidirectional mapping between RNG and Examplotron: any RNG schema should be 
straightforwardly transformable into Examplotron.  By "importing" the RNG 
patterns, you almost get this.  I think the only missing thing would be the 
ability to do annotation elements.  One way to solve this would be to add 
an eg:annotation element to Examplotron:


which would be transformed into RNG simply by removing the eg:annotation 

As for the 80%, I would want:

a) Control over whether an attribute is required or optional.  One approach 
would be to have 3 attributes: an inherited attribute saying whether 
attributes are by default required or optional; an attribute that lists the 
names of attributes that are optional for this element (when the default is 
required); an attribute that lists the names of attributes that are 
required for this element (when the default is optional).

b) Datatyping.  This is crucial but I don't immediately see a good design. 
It would be nice to be able to write:

<th align="left|center|right" valign="middle|top|bottom" colspan="Number" 
rowspan="Number" abbr="Text">

and have it turn into:

element th {
  attribute align { "left" | "center" | "right" }?,
  attribute valign { "middle" | "top" | "bottom" }?,
  attribute colspan { Number },
  attribute rowspan { Number },
  attribute abbr { Text }

On the other hand, in some cases it might be preferable to stick to a purer 
example metaphor:

<th align="left" valign="middle" colspan="2" rowspan="2" abbr="any old 

But then you need some way to specify a mapping from example values into 
datatypes, and that starts to get complicated for the user.  One way might 
be to point to a file containing a list of datatype definitions (ordered 
from least general to most general), and you use the first one that matches 
the example value.  This would be hard to implement in pure XSLT though. 
One thing I think is important if users are going to maintain there schemas 
in Examplotron: I think they need be able to conveniently reference 
definitions not just builtin datatypes.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC