OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Element oriented programming

[ Lists Home | Date Index | Thread Index ]
  • From: Charles Reitzel <creitzel@mediaone.net>
  • To: xml-dev@ic.ac.uk
  • Date: Mon, 28 Sep 1998 10:33:55 -0400 (EDT)

Peter Murray-Rust wrote:
>It would be great if we could standardise on the API for this sort of
>thing. Then element-oriented programming could become really attractive.
>The domain-specific classes could use a standard core facility.

Agree also.  How would the Netscape proposal for "behavior sheets" fit in?
The basic idea of using style sheet-like pattern matching (XEvent?) to map
to method invocation (w/ parameter lists) was viable and would build on the
work already done for style sheets (which presumably builds on XPointer).

For java work, it would seem natural to use XEvent statements to register a
bean with the "behavior processor".  XEvent statements could map elements
matching a pattern with a bean event to "fire".  Further XEvent statements
could map specific events to specific event listeners available in
registered beans.  As each element appears on the input, it is checked
against the list of patterns.  For each pattern matched, the corresponding
event is created and all registered listeners executed.  

Element and attribute data must be mapped to event properties.  Likewise, it
must be possible to fire both when the event when the element is first
encountered (pre-XXX) and after all of its contents have been read in are
available to the event (post-XXX).

Limiting the event input to the current element and its contents seems
reasonable.  If the application needs references to other elements, it can
save the data for later reference as needed.

Something similar can be done for other languages like C++.  It isn't
necessary to recreate the equivalent of Java beans entirely - just event
definition.  Is this an instance of the publisher-subscriber pattern?
Linkage issues for C++ will be platform specific, but not too bad.

To my mind behavior sheets, per se, are not the hardest part.  What is
lacking is better cohesion among the various methods of pattern matching.
Xml, XPointer, XSL, et al need to share a unified view of specifying sets of

My $0.02 worth,
Charlie Reitzel

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS