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

Re: EOC/SOX: element<->class mapping

  • From: james anderson <James.Anderson@m...>
  • To: "xml-dev@i..." <xml-dev@i...>
  • Date: Mon, 05 Oct 1998 20:26:42 +0200

sox classes
David Brownell wrote:
> 
> james anderson wrote:
> ...
> 
> >        For this purpose [1st stage] it
> > suffices to declare a relation between java packages and xml
> > namespaces and to use introspection to map from element name
> > to class. One would have standard java packages appropriate
> > for and associated with standard elements.
> 
> Of course with this sort of solution you prevent many-to-one
> mappings. Those can be convenient to work with.  If one must
> take well formed XML and emit an HTML vocabulary, the ability
> to have one class handle all of HTML's empty-element printing
> syntax (e.g. <BR> or <BR /> but never <BR/>) is a time saver,
> certainly at the "encoding" level and possibly higher up too.
> 
> Many other solutions for this exist.  For now, I'm assuming
> a factory method createElement(uri,tag) that can have many
> implementations, including the one james sketched above.
> 

I would agree, in principal, on the need for the above method for a factory instance.

(In prior posts re namespaces I have argued that there is no use in separating
the URI from the tag name, but I neglect that issue for the moment.)

I advocate further, that the number of additional calls and the amount of
anscilliary data be kept at a minimum. If I were to program in java, I would
be concerned with the bulk and complexity of calls to specify the location of,
and the need to administer the content of external mapping files and or other
external specifications. Not to mention the need to distribute and maintain
this meta-data with applets. This when, with judicious application of existing
meta-object capabilities, the only call needed is one to match an xml
namespace with a java package. 

While there may be EOC-requirements which extend beyond the need to specify an
arbitrary class <-> element mapping, the namespace-based mechanism is
sufficient for that, and therefore also sufficient for the problem which Mr.
Brownell described. The application need only specify appropriate type
relations between classes specific to HTML-elements and a parent class which
comprises the desired behaviour and/or storage. One may well need to define
interface classes and a package for this purpose. 1-N relations in the other
direction are (as discussed earlier) a problem which extends beyond EOC.


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.