Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Re: XML validation via RCP
Re: XML validation via RCP [message #234154] Sun, 26 July 2009 14:46 Go to next message
Ed Merks is currently offline Ed Merks
Messages: 26149
Registered: July 2009
Senior Member
Martin,

It's best to ask about this on the WTP newgroup, which I've added to the
"to" list of the reply, so no need to repost. You can use PDE to view
the dependencies of a plugin to help answer your own question.


Martin Hargreaves wrote:
> Dear Eclipse Community,
>
> I've recently been tasked with producing an XML validation plugin for
> an RCP project. Fortunately a validation plugin already seems to exist
> in the Eclipse IDE! I believe that the plugins
> org.eclipse.wst.validation and org.eclipse.wst.validation.ui provide
> this functionality.
>
> Please can anyone provide me with some guidance on how I may start to
> wrap these plugins into a bespoke plugin for our RPC?
>
> Also, is it possible to do this or do these plugins require
> functionality that is only available in the RCP (i.e. Workbench Page,
> Perspectives etc)? I've found very little information on how to use
> these plugin extension points.
>
> I'd be very grateful for any help you could provide.
>
> Martin...
>
Re: XML validation via RCP [message #234181 is a reply to message #234154] Mon, 27 July 2009 18:45 Go to previous messageGo to next message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
Hi Martin,

The WTP XML validation logic wraps the underlying XML parser and provides
it in the plug-in org.eclipse.wst.xml.core

You can view the source here:
http://dev.eclipse.org/viewcvs/index.cgi/sourceediting/plugi ns/org.eclipse.wst.xml.core/src-validation/?root=WebTools_Pr oject

You'll probably specifically be interested in the XMLValidator class:
http://dev.eclipse.org/viewcvs/index.cgi/sourceediting/plugi ns/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/x ml/core/internal/validation/XMLValidator.java?root=WebTools_ Project&view=markup

The plug-ins you referenced are the WTP validation framework. It should be
possible to use this framework outside of WTP. The validation framework UI
makes use of the Eclipse workbench and specifically markers to display
messages produced by validators.

Lawrence
Re: XML validation via RCP [message #429728 is a reply to message #234181] Thu, 30 July 2009 15:13 Go to previous messageGo to next message
Martin Hargreaves is currently offline Martin Hargreaves
Messages: 5
Registered: July 2009
Junior Member
lmandel@ca.ibm.com wrote:

> Hi Martin,

> The WTP XML validation logic wraps the underlying XML parser and provides
> it in the plug-in org.eclipse.wst.xml.core

> You can view the source here:
>
http://dev.eclipse.org/viewcvs/index.cgi/sourceediting/plugi ns/org.eclipse.wst.xml.core/src-validation/?root=WebTools_Pr oject

> You'll probably specifically be interested in the XMLValidator class:
>
http://dev.eclipse.org/viewcvs/index.cgi/sourceediting/plugi ns/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/x ml/core/internal/validation/XMLValidator.java?root=WebTools_ Project&view=markup

> The plug-ins you referenced are the WTP validation framework. It should be
> possible to use this framework outside of WTP. The validation framework UI
> makes use of the Eclipse workbench and specifically markers to display
> messages produced by validators.

> Lawrence
Hi Lawrence,

Thank you for your response to my query (and thank you to Ed for
re-posting it).

Thanks for showing me the source code to the XML Validator. I'll try and
see how I can incorporate this in my application.

I take it that because the validation framework UI makes use of the
Eclipse work bench that this module is not RCP friendly and so I am unable
to reuse the UI functionality at the plug-in level? From your last
paragraph, do you think that the org.eclipse.wst.validation plug-in is
re-usable?

Martin...
Re: XML validation via RCP [message #484878 is a reply to message #429728] Wed, 09 September 2009 15:15 Go to previous message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
Hi Martin,

I don't know the specific requirements for the validation framework but I
am confident that it has IDE dependencies.

For generic XML validation in an RCP app you may be interested in rolling
your own (if you can't meet the existing XML validator's dependencies).
The WTP XML validator is based off of Apache Xerces [1]. I wrote an
article a few years ago that discusses creating Eclipse validators. The
article is a little dated and makes use of functionality in the IDE but it
may be helpful [2].

[1] http://xerces.apache.org/
[2] http://www.ddj.com/184405940

Lawrence
Previous Topic:JST Library Provider Framework
Next Topic:Accessing Web Services with WTP
Goto Forum:
  


Current Time: Thu Oct 30 12:19:30 GMT 2014

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

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