Prox search using tags
Oxygen general issues.
Prox search using tags
Hi - thanks in advance for the advice. Running Oxygen 22.1
I need to replace one designation - (OS) - with a different designation (A) in *some* cases - namely when the type of the container is "flatfile". We have other OS material for which the OS designation will just be removed.
So:
<container type="flatfile">134 (OS)</container>
becomes
<container type="flatfile">134 (A)</container>
While:
<container type="port">5 (OS)</container>
becomes
<container type="port">5</container>
So my plan was to use a prox search to first replace all the 'flatfile' materials designations (searching: "flatfile OS"~10), and then do a regular search/replace with the OS to simply remove those that are left.
But I'm having some trouble with... well, all proximity searches, to be honest. I figured initially the problem was that I was asking it to find something within a tag and something in the data, but even the basic prox searches I'm doing don't seem to be working. I tried it just within data and it also wasn't working. So not I'm not sure what I'm doing wrong.
Constructed my plan/searches from the documentation:
I need to replace one designation - (OS) - with a different designation (A) in *some* cases - namely when the type of the container is "flatfile". We have other OS material for which the OS designation will just be removed.
So:
<container type="flatfile">134 (OS)</container>
becomes
<container type="flatfile">134 (A)</container>
While:
<container type="port">5 (OS)</container>
becomes
<container type="port">5</container>
So my plan was to use a prox search to first replace all the 'flatfile' materials designations (searching: "flatfile OS"~10), and then do a regular search/replace with the OS to simply remove those that are left.
But I'm having some trouble with... well, all proximity searches, to be honest. I figured initially the problem was that I was asking it to find something within a tag and something in the data, but even the basic prox searches I'm doing don't seem to be working. I tried it just within data and it also wasn't working. So not I'm not sure what I'm doing wrong.
Constructed my plan/searches from the documentation:
Any thoughts on what I'm doing wrong here? Thanks very much.Proximity Searches
Use proximity searches to find words that are within a specific distance away. To perform a proximity search, use the ~ symbol at the end of your search. For example, to search for the word Garden and the word Preparation within 6 words of each other use:
"Garden Preparation"~6
Re: Prox search using tags
Hello,
You've found "Proximity Searches" in the Searching in Content section from the documentation which refers to a feature available in the Open/Find Resource dialog which only works on indexed content from the project.
Also note that Open/Find Resource is just a content locating tool, it does not have replace capabilities.
For replace operations either try Find > Find/Replace (or Find > Find/Replace in Files) or refactoring operations, Tools > XML Refactoring.
If you use Find/Replace (or Find/Replace in Files) try:
Find: (OS)
XPath: //container[@type='flatfile']
Regards,
Adrian
You've found "Proximity Searches" in the Searching in Content section from the documentation which refers to a feature available in the Open/Find Resource dialog which only works on indexed content from the project.
Also note that Open/Find Resource is just a content locating tool, it does not have replace capabilities.
For replace operations either try Find > Find/Replace (or Find > Find/Replace in Files) or refactoring operations, Tools > XML Refactoring.
If you use Find/Replace (or Find/Replace in Files) try:
Find: (OS)
XPath: //container[@type='flatfile']
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)
- ↳ 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