Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Adding XML Catalog contributions programmatically
Adding XML Catalog contributions programmatically [message #754220] Tue, 01 November 2011 09:41 Go to next message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
How can I add new entries to Eclipse's XML Catalog programmatically (instead of using org.eclipse.wst.xml.core.catalogContributions extension point)? The reason I need this is that I have multiple plugins providing XSDs, which can't depend on WTP.

[Updated on: Tue, 01 November 2011 09:42]

Report message to a moderator

Re: Adding XML Catalog contributions programmatically [message #755033 is a reply to message #754220] Mon, 07 November 2011 00:16 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
Registered: July 2009
Senior Member
If they can't depend on WTP, or rather the XML plug-ins from WTP, how would they make use of such an API? That is one of the reasons it is an extension point--there is no code dependency forced upon you.

---
Nitin Dahyabhai
Eclipse WTP, IBM

[Updated on: Mon, 07 November 2011 00:18]

Report message to a moderator

Re: Adding XML Catalog contributions programmatically [message #755083 is a reply to message #755033] Mon, 07 November 2011 05:30 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
Of course the plugins which contain XSDs can't use it on their own. However, I have another plugin which listens to BundleEvent, checks if the bundle contains an .xsd resource under a specific path, and adds them to the Catalog.
Re: Adding XML Catalog contributions programmatically [message #756996 is a reply to message #755083] Tue, 15 November 2011 16:47 Go to previous messageGo to next message
David Carver is currently offline David Carver
Messages: 174
Registered: July 2009
Senior Member
You can alway create an XML Catalog entry that can be used externally as well as used by the WTP XML Catalog. Here is some more information.

http://www.oasis-open.org/committees/entity/spec-2001-08-06.html#d0e533

The WTP XML Catalog support importing and exporting the catalog entries in the above format.
Re: Adding XML Catalog contributions programmatically [message #756997 is a reply to message #756996] Tue, 15 November 2011 16:49 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey Romanov
Messages: 263
Registered: May 2010
Senior Member
Does it support importing them programmatically?
Re: Adding XML Catalog contributions programmatically [message #756999 is a reply to message #756997] Tue, 15 November 2011 16:50 Go to previous message
David Carver is currently offline David Carver
Messages: 174
Registered: July 2009
Senior Member
Alexey Romanov wrote on Tue, 15 November 2011 16:49
Does it support importing them programmatically?


You should be able to. Take a look at the code for the XML Catalog import wizard. It should have what you need, or can show you how to do it.
Previous Topic:XSD, XML Catalog, schemaLocation vs noNamespaceSchemaLocation
Next Topic:When do deployed classes get deleted?
Goto Forum:
  


Current Time: Sat Aug 30 12:34:02 EDT 2014

Powered by FUDForum. Page generated in 0.01735 seconds