Revelling parser writers (was Rebelling)
Paul Prescod
papresco at technologist.com
Mon Dec 1 03:55:58 GMT 1997
> Some people seem to use 'processor' to mean an XML parser. Others
> seem to use 'processor' as a piece of software 'after' the parser.
I do not think that the latter people have a basis in the XML
standard.
> I think some
> people use 'parser' to mean a piece of software that reads in an XML
> document (and associated components and transforms them into some
> other information structure or sets of actions. the 'Parsers' at
> present appear to be able to emit event Streams and/or build trees.
I think that most software developers would build trees *from* the
event stream. This separation allows you to plug in another parser
(reader/event generator) without changing your tree-building software.
Maybe I'm just extrapolating incorrectly from SP's design and my
design of my own systems.
In Jade, there is a parser (SP) that outputs events that are read by a
grovebuilder (GroveBuilder.cxx) that serves as the source grove for a
DSSSL process. My PyGrove uses the same system.
> >Building a grove is not the job of a
> ^^^^^^^^^^^^^^^^^
> >parser. Typically the parser outputs the events and some other process
> >builds the grove from the information. The only way a parser could be
> >not written to create groves is if the parser did not output sufficient
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Is there a difference between 'build' and 'create'? I don't understand how
> a parser can 'not build a grove' and 'be not written to create groves'.
That tortuous prose is my attempt to integrate your text about parsers
being "not written to create a grove." The only way I could imagine a
parser being unfit to create a grove is if it did not output enough
information for the grovebuilder to do so.
> Earlier on XML-DEV we discussed at length what the API to a 'parser' (or
> was it a 'processor') was. I thought that this could have included building
> a grove.
I think that the grovebuilder would be a *client* of the parser API.
Then
it could build groves from (e.g.) XML or full SGML or even something
else,
as long as the various parsers exported the same API.
> If I rephrase my statement as 'no-one has written any XML-based software
> which interfaces with the current crop of (mainly java-based) parsers to
> generate groves'.
This statement makes more sense to me than your previous one.
Paul Prescod
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list