When I open XSD file in Eclipse( in XSD Editor), it download all xsd:import
's are contained in file. But if I don't have internet, editor cannot download, it's obvious. In preferences(Window -> Preferences
) is XML-> XML Catalog
. Is possible add my xsd:import
(xsd files) to catalog and Eclipse will use it in offline mode?
Asked
Active
Viewed 1,729 times
1

Janusz Lece
- 133
- 9
1 Answers
2
Yes you can add your xsd/dtd file to the catalog.
I did it like this (for test) and eclipse does not complain:
Entry element: URI
Location: C:\Users\me\Desktop\log4j.dtd
URI: file:///C:/Users/me/Desktop/log4j.dtd
Key type: URI
Key: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd
I used the native URL in my log4j.xml afterwards
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
I suppose this should also work with xsd files.
This comes from another answer from me.
-
Using this trick, validation is much faster in offline mode (0.1 second with the local XSD compared to 21 seconds without the XSD). – Julien Kronegg May 16 '13 at 11:23