You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Neeraj Bajaj <Ne...@Sun.COM> on 2004/02/17 12:26:29 UTC

Proposal: Factory APIs in XNI

Hi All,

	I think we need Factory APIs just like JAXP for getting 
XMLParserConfiguration. Xerces lookup mechanism  for 
XMLParserConfiguration object is also quiet similar like JAXP.

Now, XNI samples use ObjectFactory to get required configuration.  It is 
very very uncomfortable for user to write their own lookup mechanism for 
finding the appropriate configuration. I think we should have an 
AbstractFacotry by which application can get required 
XMLParserConfiguration. This would make dynamic loading of configuration 
  quite convenient.

What do others think about it ?

Neeraj



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposal: Factory APIs in XNI

Posted by Andy Clark <an...@apache.org>.
Neeraj Bajaj wrote:
> Now, XNI samples use ObjectFactory to get required configuration.  It is 
> very very uncomfortable for user to write their own lookup mechanism for 
> finding the appropriate configuration. I think we should have an 

Most users are not writing their own configurations and if
they are (like myself), the only way for the application to
use the right one is to construct it manually. And if they
want to use their configuration in *all* Xerces parsers in
the JVM, then they can supply the appropriate services file.
Neither way sounds very uncomfortable considering that I do
it myself regularly.

> AbstractFacotry by which application can get required 
> XMLParserConfiguration. This would make dynamic loading of configuration 
>  quite convenient.

Another point is that XNI is a low-level API so I'm not
quite sure if I believe a generic factory mechanism should
be implemented. Do you have specific examples of how adding
XNI factories would help users? What are you trying to do
that would be easier with factories?

-- 
Andy Clark * andyc@apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org