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

[RDDL] API Suggestions

  • From: Leigh Dodds <ldodds@i...>
  • To: xml-dev <xml-dev@l...>
  • Date: Mon, 12 Feb 2001 12:44:45 +0000

instantiate a factory class
A useful extension to the RDDL API would be a means 
to retrieve Java implementation classes suitable for 
processing a particular document.

Use case:

Imagine a situation were we're parsing an XHTML document 
containing SVG elements. We want to build a DOM tree 
for the document, but want to use SVG DOM specific 
classes if available, otherwise defaulting to a standard 
DOM impl.

Suggestion:

1. Have a network class loader for retrieving the appropriate 
JAR files from the network, the key for this could be a 
startPrefixMapping callback during a SAX2 parse.

2. Instantiate a factory class ready to create appropriate 
objects from the parsed elements.

3. Invoke the factory during the parse, resulting in construction 
of the DOM.

This seems to mandate a class loader integrated with a XMLFilter; 
a factory framework for instantiating objects during parse; and a  
'well-known' factory implementation associated with each JAR 
(e.g. using a naming convention).

I'm generally thinking of cases where we want to be able to attempt 
some kind of processing on XML documents, even if we've never 
encountered them before. e.g. the fabled XML browser.

Thoughts?

L.

-- 
Leigh Dodds, Systems Architect       | "Pluralitas non est ponenda
http://weblogs.userland.com/eclectic |    sine necessitate"
http://www.xml.com/pub/xmldeviant    |     -- William of Ockham

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.