I've applied a patch to DocumentFactory which should fix this problem - its
in CVS now. It would be nice to create a test applet to test this out to be
sure it works. Any takers? Toby could the applet you're working on be
refactored in any way into the src/samples/applet area?
James
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 7:43 AM
Subject: [dom4j-dev] (no subject)
> Hi Bob,
>
> >Seems like DocumentFactory is attempting to read the org.dom4j.factory
> >system property. And property-reading is possibly denied in the applet
> >context.
> >
> >I'm not certain what the correct behaviour should be.
>
> Yes, you are right. Is caused by following lines of code:
>
> static {
> String className = System.getProperty(
> "org.dom4j.factory",
> "org.dom4j.DocumentFactory"
> );
> singleton = createSingleton( className );
> }
>
> It tries to find a property and if this property don't exits it use the
> default value "org.dom4j.DocumentFactory". Although this approachs allows
high
> flexiblity it won't work in unsinged Applets. Because we need XML in a
Swing
> based Applet and have to avoid singed Applets, we need defintly a
solution.
>
> Would it be possible to rewrite the DocumentFactory by dowing following:
>
> <snipplet>
>
> private static transient DocumentFactory singleton;
>
> public static DocumentFactory getInstance()
> {
> if (DocumentFactory.singleton == null)
> DocumentFacotry.singleton =
> createSingleton(
>
> DocumentFactory.class.getName());
>
> return singleton
> }
>
> public static DocumentFactory getInstance(String customizedFactory)
> {
> if (DocumentFactory.singleton == null)
> DocumentFacotry.singleton = createSingleton(customizedFactory);
>
> return singleton
> }
>
> </snipplet>
>
> Forgive me that nasty coding style, but my web based emai-client is not
the
> best ;-)
>
> Hope to hearing form you soon.
>
> Bye & thx.
>
> Toby
>
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
>
> _______________________________________________
> dom4j-dev mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-dev
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev