Page 1 of 1

ev3: basic search capability (source code in xslt)

Posted: 26 Oct 2012, 18:59
by jmk
Hi,

you'll find attached an xslt file doing a search of one word in the reportXML.xml file.

As other stylesheets in ev3, this file may be run with the a PMA parameter in the invocation URL.
  • If the PMA parameter is defined then the stylesheet cleans the value, downcases it and then search if the result is used somewhere in the instances of reportXML.xml .
  • It then displays such instances sorted by classnames.
Minimal but it works ...


Regards,

J.-M.

Re: ev3: basic search capability (source code in xslt)

Posted: 02 Nov 2012, 15:49
by neil.walsh
Hi,

Thanks for this. It's quite similar to ideas we've looked at developing. In fact v3 viewer has a hidden search box in the header which is current not linked to anything. This could be tweaked to pass the parameter to the view you've created.

When I downloaded the file, it was actually an XML not an XSL file but I simply changed the file extension.

In case anyone is unsure of how to use this, simply add a search term in the URL after the part that says "PMA=" e.g. "PMA=demand".

Thanks

Neil

Re: ev3: basic search capability (source code in xslt)

Posted: 02 Nov 2012, 17:24
by jmk
NeilWalsh wrote:Hi,

Thanks for this. It's quite similar to ideas we've looked at developing.
As there is no technical roadmap I decided it was better to develop this tool than to wait for a new viewer release :).

The license is similar to the GPL so you may reuse the code in next releases ... Be warned that I'm not an xslt specialist, though.

NeilWalsh wrote: When I downloaded the file, it was actually an XML not an XSL file but I simply changed the file extension.
The forum does not allow to upload xsl/xml files. I did some tries before I had the idea to use a zip upload. It seems I forgot to rename the content in my last attempt.


J.-M.