Buggy Find/Replace in Files with long lines and XPath
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 125
- Joined: Mon Jun 09, 2003 6:02 pm
- Location: Charlottesville, Virginia USA
Buggy Find/Replace in Files with long lines and XPath
I have just discovered that some XPath searches on project files are returning incomplete results, and I have identified the cause (or "a cause" at least) as long lines in the source XML.
Description:
I want to search through all files in a project for a regular expression \d\s+\d (match digits separated by space) within the XML element <pg>. My XML files contain elements like this:
where the regex search should match the final <pg> element in the given <entry>.
Running Find/Replace in my project files failed to match this data.
I then tried format-and-indent on the source, to produce
saved the file, and then I ran the project search again. This time the final <pg> was correctly matched.
The *only* thing I changed in the file was whitespace in the formatting. So this appears to be a bug in the oXygen search in cases of long lines.
Description:
I want to search through all files in a project for a regular expression \d\s+\d (match digits separated by space) within the XML element <pg>. My XML files contain elements like this:
Code: Select all
<entry><head>House, Mrs. Mary</head><pgW><pg>2</pg><pg>13 and n.</pg><pg>55</pg><pg>173–74 n. 1</pg><pg>178</pg><pg>196</pg><pg>272 n. 1</pg><pg>308</pg><pg>345 n.1 449</pg></pgW></entry>
Running Find/Replace in my project files failed to match this data.
I then tried format-and-indent on the source, to produce
Code: Select all
<entry>
<head>House, Mrs. Mary</head>
<pgW>
<pg>2</pg>
<pg>13 and n.</pg>
<pg>55</pg>
<pg>173–74 n. 1</pg>
<pg>178</pg>
<pg>196</pg>
<pg>272 n. 1</pg>
<pg>308</pg>
<pg>345 n.1 449</pg>
</pgW>
</entry>
The *only* thing I changed in the file was whitespace in the formatting. So this appears to be a bug in the oXygen search in cases of long lines.
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Buggy Find/Replace in Files with long lines and XPath
Hi David,
I can confirm this was a bug in the Find Replace in Files with XPath filters.
Only the first element on the line matching the XPath was considered.
We fixed this about a week ago due to another report and the fix will be available in Oxygen 12.1 (in a couple of weeks).
If you want to test an Oxygen 12.1 beta kit just write us on the support email address and we'll try to provide you with a download link.
Regards,
Radu
I can confirm this was a bug in the Find Replace in Files with XPath filters.
Only the first element on the line matching the XPath was considered.
We fixed this about a week ago due to another report and the fix will be available in Oxygen 12.1 (in a couple of weeks).
If you want to test an Oxygen 12.1 beta kit just write us on the support email address and we'll try to provide you with a download link.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
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