Copy column data from XPath results viewer?
Oxygen general issues.
-
- Posts: 1
- Joined: Fri Aug 03, 2012 2:32 am
Copy column data from XPath results viewer?
I would like to be able to select values from my XPath expressions but the results viewer only allows me to copy all the columns... XPath Location, Resource, System ID, etc. So then I end up having to paste the results into a text editor and strip out the non-value text.
Is there any way to do this? Any new features coming to allow this? Its painful. I just want to be able to copy the Description column values so that I can preferably paste as a list somewhere else.

Is there any way to do this? Any new features coming to allow this? Its painful. I just want to be able to copy the Description column values so that I can preferably paste as a list somewhere else.

-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Copy column data from XPath results viewer?
Hello jmajcen,
There is an workaround to your problem. Instead of executing your XPath expression using the XPath Toolbar from <oXygen/> you will have to write a small XSLT file containing the following:
You will just have to replace the value of the 'select' attribute ("{xpath-expression}") from the 'xsl:for-each' instruction with your XPath expression. Then you will have to create a Transformation Scenario that applies the newly created XSL file over your XML(s). Run the scenario and you will obtain the desired values in the Results view.
You can find more about how to define a new transformation scenario here: http://oxygenxml.com/doc/ug-editor/inde ... nario.html
Regards,
Alin
There is an workaround to your problem. Instead of executing your XPath expression using the XPath Toolbar from <oXygen/> you will have to write a small XSLT file containing the following:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:for-each select="{xpath-expression}">
<!-- Prints the value -->
<xsl:value-of select="node()"/>
<!-- New line -->
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
You can find more about how to define a new transformation scenario here: http://oxygenxml.com/doc/ug-editor/inde ... nario.html
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 1
- Joined: Tue Aug 21, 2012 5:58 pm
Re: Copy column data from XPath results viewer?
How can I just display the value in Description column?
Here is my xml:
and my xpath expression:
Description is being displayed as
Here is my xml:
Code: Select all
<entityAttribute dataType="System.String">
<value>
<rows>
<row>
<value>CVA Base</value>
<value>Mtm</value>
</row>
<row>
<value>CVA Base</value>
<value>Cva</value>
</row>
<row>
<value>CVA Base</value>
<value>Dva</value>
</row>
...
Code: Select all
entityAttribute/value/rows/row/value[2]
Code: Select all
/entityAttributtes[1]/value[1]/rpws[1]/row[1]/value[2] - Mtm
/entityAttributtes[1]/value[1]/rpws[1]/row[2]/value[2] - Cva
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Copy column data from XPath results viewer?
Hello,
@Jay:
In Oxygen v13.2 and earlier the Description column contains both the XPath of the node and the value("XPath - value"). In v14.0 and later these are separated in two distinct columns(Description and XPath location).
You're probably using v13.2 or older and want to see just the value. In that case, you can hide the XPath information by casting the XPath value to xs:string.
Try this XPath:
Regards,
Adrian
@Jay:
In Oxygen v13.2 and earlier the Description column contains both the XPath of the node and the value("XPath - value"). In v14.0 and later these are separated in two distinct columns(Description and XPath location).
You're probably using v13.2 or older and want to see just the value. In that case, you can hide the XPath information by casting the XPath value to xs:string.
Try this XPath:
Code: Select all
/entityAttribute/value/rows/row/value[2]/xs:string(text())
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Copy column data from XPath results viewer?
Hi,
While it's not yet possible to copy a single column directly from the results (request is logged), note that there's a much simpler workaround in using the Grid mode:
1. After obtaining the XPath results, right click in the results panel and Save Results as XML.
2. Open the results file (XML) and switch to Grid mode (Document > Edit Mode > Grid or press the Grid button at the bottom of the editor).
3. Expand the grid until you reach the tabular structure.
4. You can now copy from the grid any single column, etc (description, xpath_location, etc).
Regards,
Adrian
While it's not yet possible to copy a single column directly from the results (request is logged), note that there's a much simpler workaround in using the Grid mode:
1. After obtaining the XPath results, right click in the results panel and Save Results as XML.
2. Open the results file (XML) and switch to Grid mode (Document > Edit Mode > Grid or press the Grid button at the bottom of the editor).
3. Expand the grid until you reach the tabular structure.
4. You can now copy from the grid any single column, etc (description, xpath_location, etc).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Copy column data from XPath results viewer?
Post by sorin_carbunaru »
Hello everyone,
I just wanted to let you know that in the recently released oXygen 20, the contextual menu of the "Results" panel, there is now an action that copies the description text of the selected items (Copy description).
Best wishes,
Sorin Carbunaru
oXygen XML
I just wanted to let you know that in the recently released oXygen 20, the contextual menu of the "Results" panel, there is now an action that copies the description text of the selected items (Copy description).
Best wishes,
Sorin Carbunaru
oXygen XML
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service