[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RDDL] API Suggestions
- From: Leigh Dodds <firstname.lastname@example.org>
- To: xml-dev <email@example.com>
- Date: Mon, 12 Feb 2001 12:44:45 +0000
A useful extension to the RDDL API would be a means
to retrieve Java implementation classes suitable for
processing a particular document.
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
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.
Leigh Dodds, Systems Architect | "Pluralitas non est ponenda
http://weblogs.userland.com/eclectic | sine necessitate"
http://www.xml.com/pub/xmldeviant | -- William of Ockham