Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » XPAth search(A feature request to search workspace for structured content)
XPAth search [message #542377] Thu, 24 June 2010 12:13 Go to next message
Alessandro Carraro is currently offline Alessandro Carraro
Messages: 27
Registered: July 2009
Junior Member
[sorry, I crossposted here because I got no replies in the WTP incubation forum]

Hi to all.
I've the following feature request. It is not an 'official' feature request, since I do not know if there is some functionality in Eclipse or in some 3rd party plugin that offers this feature. Just an attempt to discuss an idea for a new XML plugin.

The feature I'm looking for is a search page analogous to the normal textual search page. The purpose is to look into xml documents in a certain scope (workspace, resource and children, working set) for text and structure (for example using XPath).
The reason behind this is that plugins I found work only on one resource at a time, while I'd like to search in the wole context. Textual search is what I'm using now, but sometimes I need to do searches like:

tell me what docs have tag X with prop a=10 and prob b=20. The problem is that matching
<X a="10" .... b="20">
<X a="10" .... b="20"/>
<X .... a="10" b="20">
<X .... a="10" b="20" ....>
<X a="10" b="20" ....>
<X b="20" a="10">

is rather easy for an XML lib but rather difficult to do with regular expressions.

I'd also love to have this both as UI and as core API do use it in custom XML plugin like mine (it is a 'normal' StructuredTextViewerConfigurationXML extension)

what do you think about?

thanks
Alex
Re: XPAth search [message #543894 is a reply to message #542377] Wed, 30 June 2010 20:35 Go to previous message
David Carver is currently offline David Carver
Messages: 174
Registered: July 2009
Senior Member
Alessandro Carraro wrote on Thu, 24 June 2010 12:13
[sorry, I crossposted here because I got no replies in the WTP incubation forum]

Hi to all.
I've the following feature request. It is not an 'official' feature request, since I do not know if there is some functionality in Eclipse or in some 3rd party plugin that offers this feature. Just an attempt to discuss an idea for a new XML plugin.

The feature I'm looking for is a search page analogous to the normal textual search page. The purpose is to look into xml documents in a certain scope (workspace, resource and children, working set) for text and structure (for example using XPath).
The reason behind this is that plugins I found work only on one resource at a time, while I'd like to search in the wole context. Textual search is what I'm using now, but sometimes I need to do searches like:

tell me what docs have tag X with prop a=10 and prob b=20. The problem is that matching
<X a="10" .... b="20">
<X a="10" .... b="20"/>
<X .... a="10" b="20">
<X .... a="10" b="20" ....>
<X a="10" b="20" ....>
<X b="20" a="10">

is rather easy for an XML lib but rather difficult to do with regular expressions.

I'd also love to have this both as UI and as core API do use it in custom XML plugin like mine (it is a 'normal' StructuredTextViewerConfigurationXML extension)

what do you think about?




We could do this pretty easily using PsychoPath XPath 2.0 processor within eclipse so that it gathers all the XML content-type files and does a collection()/x[@a=10 and @b=10]

With the XPath View we might be able to also create some functionality so that you can specify a collection as an input if using the XPath 2.0 processor.

Please open a enhancement request and we can look at adding this during the WTP 3.3 release time frame. You'll want open this against the wst.xsl component in WTP Source Editing as that is where the XPath functionality is maintained. If you install the XSL Tools editor and debugger you'll get the XPath view.


Previous Topic:Can't get XSLT debugger to use local DTDs (get HTTP 503 to w3.org)
Next Topic:How to get list of Java J2EE Module Dependency programmatically ?
Goto Forum:
  


Current Time: Wed Aug 20 06:48:26 EDT 2014

Powered by FUDForum. Page generated in 0.01507 seconds