|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [RDDL] API Suggestions
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








