distinct-values on project folder
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 37
- Joined: Mon Jan 23, 2017 11:20 am
distinct-values on project folder
Hi oXygen team,
I was trying to get distinct values from all xml files in a specific project folder by using Path/XQuery Builder. It's set to Path 2.0 Scope is set to selected project resources. The folder is selected.
My Path is
the result list though returns this XPath applied to each document. So I still get duplicate entries, i.e. one for each file containing a specific value. Is this intentional? Are there any settings I can change to prevent this behaviour?
Many thanks,
Benjamin
I was trying to get distinct values from all xml files in a specific project folder by using Path/XQuery Builder. It's set to Path 2.0 Scope is set to selected project resources. The folder is selected.
My Path is
Code: Select all
distinct-values(//settlement/text())
Many thanks,
Benjamin
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: distinct-values on project folder
Hi,
Unfortunately the scope does not behave as an XML collection(). XPath is simply applied on each file from the scope. I've logged an improvement request on our issue tracking tool to accommodate the need for a collection.
Meanwhile, you can use something like this: Scope doesn't matter for this one, so it should be applied on just a file (does not matter which).
Regards,
Adrian
Unfortunately the scope does not behave as an XML collection(). XPath is simply applied on each file from the scope. I've logged an improvement request on our issue tracking tool to accommodate the need for a collection.
Meanwhile, you can use something like this:
Code: Select all
distinct-values(collection('file:/path/to/my/folder?select=*.xml')//settlement/text())
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
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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