Diff files, ignore nodes by XPath
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 71
- Joined: Sat Jan 07, 2017 1:23 am
Diff files, ignore nodes by XPath
Another question about the diff files tool (despite the minor issues I've reported, I'm finding it extremely useful).
I'm comparing two HTML files, which I know have only trivial differences in the <img> element @alt attribute value, so I'd like Diff to ignore <img> elements.
I have added "//img" to the "Ignore nodes by XPath" box, but the elements are still highlighted as different:
https://www.dropbox.com/s/0b4aounguan3y ... 4.png?dl=0
Have I entered the XPath expression incorrectly? (And how would I enter multiple nodes to be ignored?)
I'm comparing two HTML files, which I know have only trivial differences in the <img> element @alt attribute value, so I'd like Diff to ignore <img> elements.
I have added "//img" to the "Ignore nodes by XPath" box, but the elements are still highlighted as different:
https://www.dropbox.com/s/0b4aounguan3y ... 4.png?dl=0
Have I entered the XPath expression incorrectly? (And how would I enter multiple nodes to be ignored?)
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Diff files, ignore nodes by XPath
Hi,
In the Diff Files main window there is an "Ignore Nodes by XPath" field in the top right corner of the screen. Just make sure it contains the xpath expression before running the comparison. If it still does not work you can try with an XPath like "//*:img" to ignore the namespace of the elements.
The value you have set in our Diff preferences page is the default value which will be used for that field but it does not automatically propagate to the Diff Files window although it probably should. I will add an issue for it.
Regards,
Radu
In the Diff Files main window there is an "Ignore Nodes by XPath" field in the top right corner of the screen. Just make sure it contains the xpath expression before running the comparison. If it still does not work you can try with an XPath like "//*:img" to ignore the namespace of the elements.
The value you have set in our Diff preferences page is the default value which will be used for that field but it does not automatically propagate to the Diff Files window although it probably should. I will add an issue for it.
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)
- ↳ 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