Lines 31-36
Link Here
|
31 |
import javax.xml.transform.stream.StreamResult; |
31 |
import javax.xml.transform.stream.StreamResult; |
32 |
import javax.xml.transform.stream.StreamSource; |
32 |
import javax.xml.transform.stream.StreamSource; |
33 |
import org.openide.ErrorManager; |
33 |
import org.openide.ErrorManager; |
|
|
34 |
import org.openide.util.Lookup; |
34 |
import org.w3c.dom.DOMException; |
35 |
import org.w3c.dom.DOMException; |
35 |
import org.w3c.dom.DOMImplementation; |
36 |
import org.w3c.dom.DOMImplementation; |
36 |
import org.w3c.dom.Document; |
37 |
import org.w3c.dom.Document; |
Lines 375-382
Link Here
|
375 |
} |
376 |
} |
376 |
} |
377 |
} |
377 |
// XXX should try to use org.w3c.dom.ls.LSSerializer if it exists... |
378 |
// XXX should try to use org.w3c.dom.ls.LSSerializer if it exists... |
|
|
379 |
// XXX #66563 workaround |
378 |
ClassLoader orig = Thread.currentThread().getContextClassLoader(); |
380 |
ClassLoader orig = Thread.currentThread().getContextClassLoader(); |
379 |
Thread.currentThread().setContextClassLoader(XMLUtil.class.getClassLoader()); // XXX #66563 workaround |
381 |
ClassLoader global = (ClassLoader) Lookup.getDefault().lookup(ClassLoader.class); |
|
|
382 |
ClassLoader target = XMLUtil.class.getClassLoader(); |
383 |
try { |
384 |
Class clazz = global.loadClass("org.netbeans.core.startup.SAXFactoryImpl"); |
385 |
if (clazz != null) target = clazz.getClassLoader(); |
386 |
} catch (Exception e) {} // ignore |
387 |
Thread.currentThread().setContextClassLoader(target); |
388 |
|
380 |
try { |
389 |
try { |
381 |
Transformer t = TransformerFactory.newInstance().newTransformer( |
390 |
Transformer t = TransformerFactory.newInstance().newTransformer( |
382 |
new StreamSource(new StringReader(IDENTITY_XSLT_WITH_INDENT))); |
391 |
new StreamSource(new StringReader(IDENTITY_XSLT_WITH_INDENT))); |