The Java Crypto Extensions allow you to request
a generic implementation of an algorithm or a specific implementation. This is
bases on having a set of "Providers" and a set of engine classes
(essentially class factories). When calling getInstance() on the appropriate
engine class you can specify either that you want any implementation of the
algorithm or that you want a specific implementation from a specific provider.
Providers are installed by editing a configuration file or by adding them
dynamically using Security.addProvider(). Providers are ordered so a request for
a generic implementation will be serviced by the first provider found which
offers that algorithm.
It might be possible to do such a thing for SAX
parsers, but you would really have to have an agreed set of functions that
parsers did or did not implement. If you would then be able to say:
"give me an instance of
a parser that at minimum does this, this and this"
or
"give me an instance of
the IBM parser"
you should also be able to say
"give me an instance of
the IBM parser that does this, that and the other"
This raises two questions:
1/ Could everybody agree on the set of functions?
2/ Is there a real need for a general solution to the problem
of working with several parsers?
-----Original Message----- From:
Andrew n marshall <amarshal@usc.edu> To:
Xml-Dev List <xml-dev@ic.ac.uk> Date: 16
April 1998 16:15 Subject: SAX: Parser Factory
class
While it is great that there are so many SAX parsers available, the
thing that bothers me is that my application has to know what Parser to load
in just to use SAX. And this means that even is a SAX parser is
available on the users machine, they may still have to download the one I
use to to run my application.
If
there is already a solution for this, then please let me
know.
|