The namespace approach is elegant. 
That is how you'd write XSLT or XQuery modules.
Additionally, the namespaces will allow an XML Schemas per factory that will
validate only the portion of the document that fits their namespace. The
framework can apply the each schema before passing to the factory to ensure
fast fail. There are techniques for running multiple schemas during parse time
to make things efficient.

Ivelin




--- Scott M Stark <[EMAIL PROTECTED]> wrote:
> Yes, we need the capability to delegate to different object factories
> during the parse using the dispatcher/registry mechanism. We have
> the pattern of a skeleton xml configuration that allows for replacement
> of behavior (cache, persistence, interceptors, etc.) in many contexts,
> but we don't have a general way to pass an arbitrary configuration to
> the plugin component other than making the component parse the xml
> itself.
> 
> 
> xxxxxxxxxxxxxxxxxxxxxxxx
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Alexey Loubyansky
> Sent: Wednesday, January 21, 2004 8:22 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-dev] New xmbean descriptor schema
> 
> From the new XML metadata framework point of view, yes, it is possible. 
> 
> I'll write a tutorial for this stuff when I am done with
> org.jboss.test.deadlock test.
> 
> Shortly, how it would work right now. You need to provide Java classes
> that represent XML elements and an object model factory that will build
> an object model of XML content.
> Currently, the framework can use ONE object model factory while parsing
> an XML file. For the example you gave it is not acceptable.
> It means either:
> * one factory approach: we have one object model factory that is aware
> of basic xmbean XML content, mypm namespace and xmlbean namespace and
> one pass (parsing) is enough to build the object model. But once you
> switched from mypm:data to anotherpm:data you need to update the factory
> to support anotherpm:data content;
> * many factories: we have namespace-specific object model factories (one
> for basic xmbean content, one for mypm and one for xmlbean contents) but
> since the framework can use only one factory during one pass we end up
> parsing the same XML file as many times as many factories we have.
> 
> I think, it is possible to combine the two by introducing a dispatcher
> that will delegate parsing to the corresponding object model factory
> basing on the namespace.
> This way we get the object model in one pass.
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> JBoss-Development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to