Interesting. About the success of Examplotron. What excited me about
the original examplotron was that Examples are what people work from.
Making the mark up too complex leads to the need to extract the markup
from the examples in order to show the what is needed.
I also feel that an over formalised approach to things would lead to
looking at examplotron as just another schema language which I have to
learn.
Martin Roberts
xml designer,
BT Exact
e-mail: martin.me.roberts@bt.com
tel: +44(0) 1473 609785 clickdial
fax: +44(0) 1473 609834
Intranet Site :http://twiki.btlabs.bt.co.uk/twiki
-----Original Message-----
From: Jonathan Lang [mailto:dataweaver42@yahoo.com]
Sent: 10 July 2003 22:51
To: examplotron@xmlschemata.org
Subject: [examplotron] Re: What needs to be done?
martin.me.roberts@bt.com wrote:
> Jonathan,
> I took the previous XSLT version of examplotron and provided for
a
> set of extensions.
>
> One major one was for full namespace support using the same
prefixes
> in asserts as used in the examples provided
It shouldn't just be asserts; content could also benefit from full
namespace support, so that you can define prefixes other than eg, xsd,
and dtd for Examplotron, XML Schema Datatypes, and DTD compatability,
respectively.
> The next was to add support for attributes as follows:
>
> If there was an element level attribute (eg:occurs) I introduced
an
> attribute level attribute (eg:occursAttr). The contents of this
> attribute is a list, formatted as follows:
> (attributeName[values])
>
> So you get: <element attr1="example" attr2="example">Example</element>
> could be marked up as:
>
> <element attr1="example" attr2="example"
> eg:occurs="?" eg:occursAttr="attr1[?] attr2[.]">
> Example</element>
>
> From this you can see that using attribute I was able mark up
both
> elements and attributes. I have found this 'less intrusive' on the
> undelying example than the introducing eg:elements.
I assume that, by 'eg:elements', you're referring specifically to
<eg:attribute>, right? If so, you could get a similar effect that's
even less intrusive by allowing an attribute's value to contain
"{lib:type!}" or "{!}" in addition to "{lib:type}"; any attribute with
an exclamation point in the curly braces is required, and any other
attribute is
optional:
<element attr1="example" attr2="{!}example"
eg:occurs="?"/>Example</element>
> I favour this attribute only approach as it means that the Xpath
of
> any element or attribute in the example is not changed in any way,
> including position. I also feel that as soon as you intriduce
> elements you are moving too close to a schema language and you may as
> well use relax first off.
Note that there's exactly one place where I've recommended the use of an
element annotation: to represent a class of elements. Every other
example that I gave dealt either with attribute annotations or value
annotations.
(to clarify: an element annotation would be of the form <eg:name ... />;
an attribute notation would be of the form <element eg:name="..." />;
and a value notation would be of the form <element attribute="{...}" />
or <element> {...} </element>. The last one is the only aspect that
isn't strictly XML; but I think that it, or something like it, is
crucial to the success of Examplotron.)
=====
Jonathan "Dataweaver" Lang
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
Received on Fri Jul 11 10:05:38 2003
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC