Find dialog, XPath, and attributes
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 51
- Joined: Fri Jan 27, 2006 12:51 am
Find dialog, XPath, and attributes
I love being able to limit searches using XPath in the find dialog. However, either I'm using it wrong, or I can't use it to limit the search to values in attributes.
Here's the kind of thing I'm doing. First the source:I'd like to change the \ character in the href attribute to a / but leave the \ in "foo\bar" alone.
If I do a find/replace and use //@href, the example code isn't found. If, instead, I do //*[@href], it is found. However, the replace would change the string "foo\bar" to "foo/bar".
Any tips on how to do this in oxygen?
Here's the kind of thing I'm doing. First the source:
Code: Select all
<relcell>
<topicref href="..\homepage\home_taskbar.xml">foo\bar</topicref>
</relcell>
If I do a find/replace and use //@href, the example code isn't found. If, instead, I do //*[@href], it is found. However, the replace would change the string "foo\bar" to "foo/bar".
Any tips on how to do this in oxygen?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Find dialog, XPath, and attributes
Post by sorin_ristache »
Hello,
The precision of the XPath filter is not so high. You can filter only at the element level, not at the attribute level as you can read in the tooltip of the XPath field. This is why the query //*[@href] worked for you. If you want to find matches also inside the XML tags (attribute names, attribute values) just make sure the option Search also in tags is selected in the Find/Replace dialog.
Regards,
Sorin
The precision of the XPath filter is not so high. You can filter only at the element level, not at the attribute level as you can read in the tooltip of the XPath field. This is why the query //*[@href] worked for you. If you want to find matches also inside the XML tags (attribute names, attribute values) just make sure the option Search also in tags is selected in the Find/Replace dialog.
Regards,
Sorin
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