[REBOL] Re: Enhancement - parse-[scheme] word
From: brett:codeconscious at: 13-Feb-2001 12:16
> I don't understand the topic of making parsers/serializers/tokenizers at
> yet, so I can be wrong here, but looking at 'import-email, 'xml-language,
> - what about having some kind of parse rules available, grouped in related
> areas? e.g. if some protocol is derived from XML, it will probably (in
> contain some rules which comply to parsing XML itself, no? :-)
My understanding of xml is that is a generic data format (w3c org has
referred to it has an interchange syntax). That is it provides a foundation
for other stuff. So yes, considering the attention xml is receiving having
tools in Rebol to deal with it and the stuff that is built on it would be
useful. Parse-xml is a simplistic way to interpret the xml at the most
basic level. It provides a way to represent the basic xml structure using
To deal with something that is derived from xml. You have to know the
structure of the derivation. People have been using DTDs for this. So once
you have read the DTD you go away and write a program (parser) that uses
that knowledge to deal with information. A more sophisticated approach could
be to write a program that reads the DTD and generates the parse rules for
the original document automatically. Such parse rules might aim to read it
from scratch or instead parse the results from parse-xml.
I gather that there is a push to move away from DTDs and instead use schemas
(xml based of course :) ) to represent the structures, apparently because
dealing with DTDs is too complex for wide uptake.
> let's find some general ideas thru various protocols/parse-rules, of
> if they do exist ....
So yes there is stuff that can be done. Maybe the experienced XML hands on
the list can point the way as to what Rebol tools should be written that
give most bang-for-buck.
Ultimately though once you've extracted your "information" out of these
formats you have to process it. This is why I find it amazing that there
seems to be so much hype about XML. XML doesn't solve an arbtrary problem it
is merely aimed at getting through step 1 of computing easier - getting an
My AUD 0.05 worth.
In Oz 2c was taken out of circulation years ago - strangely enough probably
equals about USD 0.02 :)