Page 1 of 1

Extract search results into an new project

Posted: Mon Apr 15, 2013 8:12 pm
by Ute
Hi,
whenever getting search results from a certain source (project) it would be helpful I could export these found sources into a new project to work on that. Is that possible (maybe I did not find it yet :) ) or could you imply this feature for us?

Thanx, Ute

Re: Extract search results into an new project

Posted: Tue Apr 16, 2013 5:20 pm
by adrian
Hello,

Currently you can only export the results themselves to a file.
I've submitted a request on our issue tracking tool to allow exporting the results in other formats.

Note that with a simple XSLT you can already obtain an Oxygen project (.xpr) out of the results file.

First Select All (Ctrl+A) the results from the results panel, right click on the selection and from the contextual menu choose Save Results as XML and save the file.
On the saved XML file apply a transformation with the following XSLT and you will obtain an Oxygen project file.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:output method="xml" indent="yes"></xsl:output>
<xsl:template match="/">
<project version="14.2">
<meta>
<filters directoryPatterns="" filePatterns="" positiveFilePatterns=""
showHiddenFiles="false"/>
<options/>
</meta>
<projectTree name="newProject.xpr">
<xsl:for-each select="distinct-values(//*:systemID/text())">
<file name="{.}"/>
</xsl:for-each>
</projectTree>
</project>
</xsl:template>
</xsl:stylesheet>
Make sure the output file has the .xpr extension and you can then open it in Oxygen as a project.

Regards,
Adrian