I'm trying to use Xerces 2.11.0 in an Eclipse RCP application, but from everything I've tried, I'm at a loss to figure out how. To complicate matters, I'm also trying to use Batik 1.7.

I've created my own bundles for Xerces and the xml-apis, I've added the additional W3C DOM interfaces that Batik uses to my xml-apis bundle.

The first problem that occurs within Batik

```
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

```

The fundamental reason for this appears to be because org.w3c.dom is contained in the JRE and exposed through org.eclipse.osgi (the system.bundle). This appears to trump any other bundle that wants to provide the package.

Trying to influence the system using require-bundle with my bundle before any others or using import-package with an explicit version leads to errors like

```
java.lang.LinkageError: loader constraint violation: loader
       (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) 
        previously initiated loading for a different type with name
        "org/w3c/dom/Document"

```

Changing the *org.osgi.framework.system.packages* and *org.osgi.framework.bootdelegation* parameters to remove org.w3c.dom and adding my bundle to *osgi.framework.extensions*, leads to erros like

```
java.lang.LinkageError: loader constraint violation in interface itable
       initialization: when resolving method 
       "javax.xml.parsers.DocumentBuilder.setErrorHandler(
                 Lorg/xml/sax/ErrorHandler;)V" the class loader 
       (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
       of the current class, org/apache/log4j/xml/DOMConfigurator, and the 
       class loader (instance of <bootloader>) for resolved class, 
       javax/xml/parsers/DocumentBuilder, have different Class objects for the
       type rrorHandler;)V used in the signature

```

I've also tried using the java.endorsed.dirs, which makes things break very quickly.

Any ideas what I've missed or may be doing wrong?