Using XPath toolbar with HTML5 in v.22
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
Using XPath toolbar with HTML5 in v.22
According to the "What's New" information for oXygen 22.0, "You can use the XPath Toolbar or XPath Builder View to quickly query HTML documents using XPath expressions." I tried to test this out on a minimal HTML 5 file:
This is valid HTML 5 and oXygen's Validate function reports that it is valid. But if I try to search on any XPath, like //p, I get the error message:
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<div>
<p>This is a very simple test of <a href="https://www.oxygenxml.com">oXygen</a> support for XPath in HTML 5</p>
</div>
</body>
</html>
Am I doing something wrong? I thought the idea was that XPath would be possible on valid HTML5 even if it is not well-formed XML?XPath failed due to: The element type "link" must be terminated by the matching end-tag "</link>"
-
- Posts: 389
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Using XPath toolbar with HTML5 in v.22
Hello,
Thanks for your feedback.
Unfortunately I cannot reproduce de problem. I tested with <oXygen/> XML Editor 22.0, build 2020021016, I created a new HTML file and pasted the content you provided, then run the XPath //p. The XPath result was returned correctly for the HTML5 document.
Maybe you associated the HTML files with the XHTML editor. You can verify this in the Preferences dialog, go to Options->Preferences->File Types options page, and search for "html" extension. In case the extension is associated with the "XHTML Editor", change it to "HTML Editor". Then reopen the file and run the XPath expression again.
Best Regards,
Octavian
Thanks for your feedback.
Unfortunately I cannot reproduce de problem. I tested with <oXygen/> XML Editor 22.0, build 2020021016, I created a new HTML file and pasted the content you provided, then run the XPath //p. The XPath result was returned correctly for the HTML5 document.
Maybe you associated the HTML files with the XHTML editor. You can verify this in the Preferences dialog, go to Options->Preferences->File Types options page, and search for "html" extension. In case the extension is associated with the "XHTML Editor", change it to "HTML Editor". Then reopen the file and run the XPath expression again.
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 125
- Joined: Mon Jun 09, 2003 6:02 pm
- Location: Charlottesville, Virginia USA
Re: Using XPath toolbar with HTML5 in v.22
Yes, your guess was correct. I had changed the file type preference at some time in the past and forgot about that. After changing the preference as suggested, XPath works. Thanks!
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