The XML Schema compiler
[1/7] from: maarten::koopmans::surfnet::nl at: 8-Nov-2002 20:56
The XML Schema compiler, XSDC.
xsdc compiles a XML schema definition to a Rebol parse definition that
knows how to compile and validate documents for the specified xsd.
The output parser is thus much faster than a generic XML parser.
xsdc speeds up the implementation of formats in XML/XSD unbelievable!
You can implement XML based formats in hours where it would have taken
days or weeks in traditional languages like Perl, Java, or C/C#/C++.
The programmer itself can provide handler based functions, just like in a
SAX based XML parser, to handle specific tags with their content and
attributes.
Now, that is our killer application. Where can I download it?
--Maarten
[2/7] from: robert:muench:robertmuench at: 9-Nov-2002 12:39
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 6>>
> definition that knows how to compile and validate documents
> for the specified xsd.
Hi, nice idea :-)).
> The output parser is thus much faster than a generic XML
> parser. xsdc speeds up the implementation of formats in
> XML/XSD unbelievable! You can implement XML based formats in
> hours where it would have taken days or weeks in traditional
> languages like Perl, Java, or C/C#/C++.
I haven't thought about how to do it (yet) but my feelings are that this
should quite be possible. XML parsing isn't that hard, and the XSD stuff
is mostly a grammar describing the structural variances an XML can have.
> The programmer itself can provide handler based functions,
> just like in a SAX based XML parser, to handle specific tags
> with their content and attributes.
This will be the easiest part :-).
> Now, that is our killer application. Where can I download it?
:-) From my brain? ;-)) Robert
[3/7] from: joel:neely:fedex at: 9-Nov-2002 8:12
Hi, Robert,
Robert M. Muench
wrote:
> > The XML Schema compiler, XSDC.
> >
> > xsdc compiles a XML schema definition to a Rebol parse
> > definition that knows how to compile and validate documents
> > for the specified xsd.
>
> Hi, nice idea :-)).
>
...
> > Now, that is our killer application. Where can I download it?
>
> :-) From my brain? ;-)) Robert
>
Igor! Bring me the big sharp saws and the electrodes!
8-0
-jn-
--
; Joel Neely joeldotneelyatfedexdotcom
REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip
do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] {
| e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]
[4/7] from: robert:muench:robertmuench at: 11-Nov-2002 13:46
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 4>>
> NOOOOOO! Sorry to get so agitated but I must start in on this
> before it goes much further. XSD sucks!
Hi, I can second that ;-) and most XML and XSLT stuff sucks too. People
don't get what XML is for and what it's not. Anyway...
> 1. It is difficult to author, the specification is basically
> built for E-Commerce applications that need to use Xml, since it was
> felt in that community that Xml's typeless structure made it
> too difficult to work with in their particular problem domain.
Ironically, the eCommerce community never made it to work with a as much
as possible typeless structure. I always show the REBOL way for
serializing data. It's very easy, very pragmatic and it just works. But
it needs some open-minded people to understand and see this possibility.
> 2. It will not support every possible Xml structure. No doubt
> caused by it's intended use for E-commerce XSD is not
> flexible enough, or at least no one to my knowledge has made
> it work, to describe formats as complex as XSLT.
?? You can wrappe every data-structure into XML if you want. It just
depends on how you "serialize" the datastructure.
> 3. The datatypes supported via XSD, or the datatypes you can
> easily build with it, are extremely limited.
Again, I would use the REBOL way.
> Xml are people trying to validate Money and Dates. What are
> the problems there, well since XSD does not have a currency
> datatype people generally do one of the following:
The question is: Is data-format-validation a XML property or a
reader/emitter property? I vote for the second option.
> 4. There are some complaints from very clever people, such as
> Tim Bray, James Clark, not just that XSD sucks but that parts
> of the specification are incomprehensible and that as a
> consequence one should worry that Schemas written that take
> advantage of the more ersatz elements of the spec will
> perhaps not be portable between different Schema processors.
Oh, remindes me of C++ ;-)) If a standard is so complicated (no matter
if by design-faults or intended) that no-one can make a compliant
processor without great effort, it's time to delete it ;-)).
> Xml schemas are basically Object-Oriented in structure, the
> only situation in which I see an actual benefit to XSD is in
> systems such as .Net where one can do runtime translation
> between the XML Schema datatypes and the supported
> environment datatypes, if we did this in Rebol it might be useful.
IMO that's always necessary, and it's OK. Why should we agree on so much
things? Post your data, let me know what's your understanding (semantic)
of your date, I read it and transform it into my domain.
> If there were to be any sort of code generator I would think
> one for Relax-NG would be preferable -
> http://www.oasis-open.org/committees/relax-ng/.
I have a look, thanks for the tip.
> 2. It will support every possible XML structure including
> complex structures with variant content such as XSLT. May be
> of some use if we want to build an XSLT processor in Rebol ;)
We have REBOL :-). Robert
[5/7] from: bry:itnisk at: 11-Nov-2002 16:22
>> 2. It will not support every possible Xml structure. No doubt
>> caused by it's intended use for E-commerce XSD is not
>> flexible enough, or at least no one to my knowledge has made
>> it work, to describe formats as complex as XSLT.
>?? You can wrappe every data-structure into XML if you want. It just
>depends on how you "serialize" the datastructure.
Right, unfortunately as I was trying to clarify you cannot describe
every possible XML data-structure using XSD.
The first time I every used XSD it was for a Human Rights project where
we were sending SOAP messages describing Human Rights abuses, I won't go
into the tedious details but in twenty minutes I came across a situation
in which my rather mundane xml design pattern could not be matched via
XSD. This was not caused by my unfamiliarity with the language as
several experts acknowledged that it could not be done using straight
XSD and I could always try to extend the language using Schematron(as
what I wanted required a correlation between various xpaths on
elements).
This has undoubtedly colored my opinion of XSD, any language that fails
me in a simple situation such as this one most definetly was in less
than an hour of working with it, while at the same time being defined in
a specification of several hundred pages is obviously not the tool for
the job. The job in my opinion being to describe xml structures.
As the original post in the thread was about the advisability of
building an XSD to Rebol compiler my post on the subject is a perhaps
overlong rant against the idea. :)
>> 3. The datatypes supported via XSD, or the datatypes you can
>> easily build with it, are extremely limited.
>Again, I would use the REBOL way.
Agreed, I would rather use Rebol's datatypes than XSD, hence my argument
against an XSD to Rebol compiler.
>The question is: Is data-format-validation a XML property or a
>reader/emitter property? I vote for the second option.
Hey I vote for the second option as well.
>> 2. It will support every possible XML structure including
>> complex structures with variant content such as XSLT. May be
>> of some use if we want to build an XSLT processor in Rebol ;)
>We have REBOL :-).
I understand that a lot of people don't like XSLT, it most certainly
takes a good deal of time to learn to use it to it's best abilities. I
think once people have learned this they will find it an extremely
useful tool for processing Xml trees.
[6/7] from: robert:muench:robertmuench at: 11-Nov-2002 16:47
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 5>>
> of building an XSD to Rebol compiler my post on the subject
> is a perhaps overlong rant against the idea. :)
Hi, no problem ;-) But wasn't it XSD to Rebol? What I don't like about
all this XML stuff is: It's bloated! And everyone is coming along with
mega-heavy Java solutions to the simplest problems... I will never
understand it.
> Agreed, I would rather use Rebol's datatypes than XSD, hence
> my argument against an XSD to Rebol compiler.
Yep. Using the Rebol typesystem as base for other implementations that
need to serialize data is a very good idea :-)) I have done it myself.
No need to think about it once again. And the nice side-effect? You can
directly use it with Rebol :-))
> I understand that a lot of people don't like XSLT, it most
> certainly takes a good deal of time to learn to use it to
> it's best abilities. I think once people have learned this
> they will find it an extremely useful tool for processing Xml trees.
IMO the idea about XSLT is OK. I don't like to much the syntax etc.
Again, here I think the Rebol guys have done a great job to simplify
quite complex problems. IMO XSLT is a bit to complex for what it's
intended. But hey, it could be that I just don't know enough about XSLT.
I don't vote against it because XSLT is set in the market. So we better
support it today than tomorrow. But using Rebol as a hidden-wappon to do
XSLT faster and better than others is a very promising solution. I just
don't want to touch XSLT directly. Robert
[7/7] from: maarten:koopmans:surfnet:nl at: 14-Nov-2002 14:38
Bryan,
Point taken and understood, Relax-NG lokks much better indeed.
--Maarten
bryan wrote:
>>The XML Schema compiler, XSDC.
>>xsdc compiles a XML schema definition to a Rebol parse definition that
<<quoted lines omitted: 94>>
> If we did have an XSLT implementation I could write rewrite the
> skeleton1-5.xsl to output Rebol code no problem.
--
Maarten Koopmans
Innovation manager tel: +31 30 2 305 324
SURFnet bv fax: +31 30 2 305 329
P.O.Box 19035 email: [maarten--koopmans--surfnet--nl]
NL-3501 DA Utrecht http://www.surfnet.nl
The netherlands
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted