Bug 21386 - Help uses xerces implementation classes instead of APIs
Summary: Help uses xerces implementation classes instead of APIs
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 minor with 1 vote (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Konrad Kolosowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 22270
Blocks: 37696
  Show dependency tree
 
Reported: 2002-07-08 17:26 EDT by Konrad Kolosowski CLA
Modified: 2003-10-14 18:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Kolosowski CLA 2002-07-08 17:26:11 EDT
Help uses org.apache.xerces packages instead of APIs (javax.xml.parsers 
packages).
Comment 1 Dorian Birsan CLA 2002-07-09 09:31:02 EDT
The eclipse runtime also uses org.apache.xerces.parsers.* classes.
It would be worth investigating the move to the javax.xml.parsers.* classes, as 
it could solve some of the infoset problems caused by different jdk/xml 
versions.
Comment 2 Konrad Kolosowski CLA 2002-08-07 14:48:45 EDT
Targeted for 2.1.
Comment 3 Konrad Kolosowski CLA 2002-08-08 12:49:25 EDT
At the moment, the switch to use APIs is breaking.

When changing help code to use
	SAXParserFactory factory=SAXParserFactory.newInstance();
	factory.setFeature("http://apache.org/xml/features/nonvalidating/load-
external-dtd", false);
	parser.parse(inputSource,this);
help will not work using jdk >= 1.4.

The reason is that Xerces parcer is no longer used when using jdk1.4.  The JAXP 
provided by jdk will load Crimson implementation by default.  I think, Eclipse 
platform set a property to be available to VM, to cause parser implementation 
provided by Eclipse to be used.
Comment 4 Konrad Kolosowski CLA 2003-10-14 16:23:17 EDT
The new requirement is to not only stop calling Xerces implementation, but 
also not call Xerces APIs directly as Xerces is tried to be removed from 
Eclipse.  Instead plug-ins should use JAXP APIs in Java 1.4, and the actual 
prarser may vary depending on the configuration.  See bug 37696.

The issue of preventing the parser from loading external DTD can be solved by 
providing Handler with overridden EntityResolver.resolveEntity method that 
will return not null InputSource without consulting any external URL.
Comment 5 Konrad Kolosowski CLA 2003-10-14 18:02:28 EDT
Removed dependencies on Xerces from org.eclipse.help, org.eclipse.help.webapp, 
org.eclipse.tomcat.