[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Element oriented programming

  • From: Charles Reitzel <creitzel@m...>
  • To: xml-dev@i...
  • Date: Mon, 28 Sep 1998 10:33:55 -0400 (EDT)

element of programming
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
elements.

My $0.02 worth,
Charlie Reitzel



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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.