Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Adding XML Catalog contributions programmatically
Adding XML Catalog contributions programmatically [message #754220] Tue, 01 November 2011 13:41 Go to next message
Alexey Romanov is currently offline Alexey RomanovFriend
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 13:42]

Report message to a moderator

Re: Adding XML Catalog contributions programmatically [message #755033 is a reply to message #754220] Mon, 07 November 2011 05:16 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
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 Web Tools Platform

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

Report message to a moderator

Re: Adding XML Catalog contributions programmatically [message #755083 is a reply to message #755033] Mon, 07 November 2011 10:30 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey RomanovFriend
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 21:47 Go to previous messageGo to next message
David Carver is currently offline David CarverFriend
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 21:49 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey RomanovFriend
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 21:50 Go to previous message
David Carver is currently offline David CarverFriend
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 Apr 20 01:45:08 GMT 2024

Powered by FUDForum. Page generated in 0.03398 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top