Sorry it's taken me so long to respond to this.
The idea of having a schema and validating against it is slowly getting some
traction in my workplace. But as I've mentioned, I can't be asking people to
learn a new language just for this purpose.
Basically, either I make it super easy to use, or I'm going to have to do it
myself, which isn't really acceptable either, for practical reasons. (This
isn't the primary focus of my job, and having people come to me to edit the
schema defeats the purpose.)
Enters Examplotron: if 80% of the schema validation can be done in "iconic"
style, and there remains 20% I have to help out with, that's a lot more
palatable to everyone. I've gotten a good handle on how to work with
Examplotron, but there remains some specific use-cases not covered. Eg. this
choice compositor.
> Now, that doesn't seem very "iconic" and we're transforming Examplotron
> into a "classical" schema language such as RELAX NG.
> Generally speaking, that would be real easy to accept RNG elements in
> Examplotron... But is it really a good solution?
Maybe it is. Examplotron is already sort of a pre-processor to RNG anyway.
Maybe there's 80% iconic, 15% that requires "eg:*" stuff, and 5% that
requires RELAX to be done right. I like the way Schematron rules can be
embedded, it's sort of the same idea.
Oh, another question. I've validated the generated Relax schema using
different open source validators I've come across, and the results were very
disappointing, abysmal even. I mean, I get better messages out of my C
compiler!
I understand this isn't Examplotron's fault... Are there any validators out
there that make an effort at being user-friendly?
I've tried the following validators:
Jing
SVM, the Sun thing
libxml
Tenuto
RNC
and by far the best (least bad) was RNC.
--Renaud
----- Original Message -----
From: "Eric van der Vlist" <vdv@dyomedea.com>
To: <examplotron@xmlschemata.org>
Sent: Thursday, January 12, 2006 12:41 PM
Subject: [examplotron] Re: Choice Compositor?
> Hi,
>
> Le jeudi 12 janvier 2006 � 11:48 -0800, Renaud Waldura a �crit :
>> Dear Examplotron Users:
>>
>> I work for the University of California at San Francisco. My department,
>> the
>> Center for HIV Information, manages a large set of XML documents about
>> HIV
>> research and prevention. Most XML documents are processed using XSL into
>> HTML and displayed on our Web sites. XML is also used to store
>> information
>> about HIV providers and researchers. No schemas are used anywhere, the
>> document structure is meant to be self-documenting, with the associated
>> problems -- i.e. it isn't self-documenting, variants are rarely
>> documented,
>> and it takes a while for new people to pick the structure.
>>
>> I'm investigating how schema validation could help us manage and document
>> schemas and their variants. Our staff typically does not have a technical
>> background, and training them on a schema language is a big issue. (W3C
>> Schema was immediately eliminated because of its complexity -- frankly it
>> scared me off.) But Examplotron, thanks to its iconic properties, seems
>> like
>> a gentle way to introduce schema usage. Any comments?
>
> That's the goal!
>
>> I've started using Examplotron 0.7 myself, and quickly ran into the lack
>> of
>> a choice compositor. The manual says "The last Relax NG compositors
>> (choice)
>> has not been implemented since it doesn't seem very useful as a
>> compositor
>> for the whole content of an element."
>
> Yep... What I meant is that the control we have right now is done
> through attributes such as in:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <order no="1234" date="2003-02-01"
> eg:content="eg:interleave" xmlns:eg="http://examplotron.org/0/">
> <quantity>1</quantity>
> <ref>AZERTY</ref>
> <item>Tee shirt</item>
> <price unit="USD">10.</price>
> </order>
>
> Using the same approach would lead to :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <order no="1234" date="2003-02-01"
> eg:content="eg:choice" xmlns:eg="http://examplotron.org/0/">
> <quantity>1</quantity>
> <ref>AZERTY</ref>
> <item>Tee shirt</item>
> <price unit="USD">10.</price>
> </order>
>
> which doesn't make sense since that would mean that the complete content
> of the "order" element is one of either <quantity/>, <ref/>, <item/> or
> <price/>.
>
> What we often need a choice operator is to chose between two elements,
> such as if we wanted to include either a <ref/> or a <name/> element in
> the content of the <order/> element.
>
>> Any ideas on how this could be done if one needed it?
>
> Any suggestion would be welcome!
>
> The easy way to do so would be to add an "eg:choice" element:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <order no="1234" date="2003-02-01"
> eg:content="eg:choice" xmlns:eg="http://examplotron.org/0/">
> <quantity>1</quantity>
> <eg:choice>
> <ref>AZERTY</ref>
> <name>TShirt</name>
> </eg:choice>
> <item>Tee shirt</item>
> <price unit="USD">10.</price>
> </order>
>
> Now, that doesn't seem very "iconic" and we're transforming Examplotron
> into a "classical" schema language such as RELAX NG.
>
> Generally speaking, that would be real easy to accept RNG elements in
> Examplotron... But is it really a good solution?
>
> What do you think?
>
> Eric
>
> --
> Curious about Relax NG? Read my book online.
> http://books.xmlschemata.org/relaxng/
> ------------------------------------------------------------------------
> Eric van der Vlist http://xmlfr.org http://dyomedea.com
> (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
> (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
> ------------------------------------------------------------------------
>
>
>
Received on Fri Jan 27 19:01:44 2006
This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 14:51:01 UTC