[examplotron] What needs to be done?

From: Jonathan Lang <dataweaver42@yahoo.com>
Date: Thu Jul 10 2003 - 05:21:47 UTC

Looking over the Relax NG patterns, I note that Examplotron has analogs to
most of them. The exceptions are:

<element> {nameClass} {pattern+} </element>
<attribute name="QName"> {pattern} </attribute>
  (this _has_ been defined for <attribute name="QName"/>)
<attribute> {nameClass} {pattern?} </attribute>
<choice> {pattern+} </choice>
<list> {pattern+} </list>
<parentRef name="{NCName}"/>
<value type?="{NCName}"> {string} </value>
<data type="{NCName}"> {param* exceptPattern?} </data>
  (this _has_ been defined for <data type="{NCName}"/>)
<notAllowed/>
<externalRef href="{anyURI}"/>
<grammar> {grammarContent*} </grammar>

The following have Examplotron analogs, but said analogs aren't as
powerful as their RNG counterparts:

<group> {pattern+} </group>
<interleave> {pattern+} </interleave>
<mixed> {pattern+} </mixed>
  (these operate on an all-or-nothing basis with respect to the element's
   content)

IMHO, the limitations on <group>, <interleave>, and <mixed> are
acceptable; <choice>, <list>, <notAllowed>, and <grammar> are part of the
"non-iconic 20%", and can be reasonably handled simply by creating
"eg:"-prefixed duplicates for Examplotron. The current discussion
involving attributes looks like it might resolve the issues of <attribute
name="QName"> {pattern} </attribute>, and partially resolve the issues
with <value> and <data> - that is, it would fully resolve those issues
when dealing with the contents of attributes. That leaves:

partially accounted for:
  <value type?="{NCName}"> {string} </value>
  <data type="{NCName}"> {param* exceptPattern?} </data>
not accounted for:
  <element> {nameClass} {pattern+} </element>
  <attribute> {nameClass} {pattern?} </attribute>
  <parentRef name="{NCName}"/>
  <externalRef href="{anyURI}"/>

Datatypes in elements
=====================
  <value type?="{NCName}"> {string} </value>
  <data type="{NCName}"> {param* exceptPattern?} </data>

You could handle this by interleaving valueMarkup (from the other
discussion) with elements in the current element's contents - for
instance,

<root>
  true {'true' | 'false' | 'maybe'}
  <sub/>
  {(xsd:integer(maxInclusive=5) - xsd:integer 3)*}
  2
  4
</root>

NameClasses
===========
  <element> {nameClass} {pattern+} </element>
  <attribute> {nameClass} {pattern?} </attribute>

Introduce <eg:element> and @eg:attribute. For <eg:element>, the nameClass
resides (in RNG compact notation) in an optional name attribute; for
@eg:attribute, the nameClass (again in RNG compact form) is incorporated
into its value - for example, @eg:attribute="{nameClass valueMarkup}".

Far References
==============
  <parentRef name="{NCName}"/>
  <externalRef href="{anyURI}"/>

@content can be one of
  "eg:parent {identifier}"
  "eg:externalRef {uri inherit?}"

Less bulky, and only if URIs can always be distinguished from identifiers:
  "::{identifier}"
  "{uri inherit?}"

=====
Jonathan "Dataweaver" Lang

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
Received on Thu Jul 10 07:21:50 2003

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC