Actions
Bug #5884
closed![Author: Martin Honnen](https://www.gravatar.com/avatar/3ea75023c3c487f36257090d420b7c50?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
SaxonCS 12 doesn't find elements in HTML DOM based on [@class = 'foo'] predicate
Start date:
2023-02-16
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET
Description
I get a strange failure by SaxonCS to select elements with predicates based on the class
attribute in HTML DOMs (i.e. returned by saxon:parse-html
or fn:parse-html
); a query like 'C:\Program Files\Saxonica\SaxonCS-12.0\SaxonCS.exe' query -q:.\saxon-parse-html-test1.xq !indent=yes
returns nothing but <?xml version="1.0" encoding="UTF-8"?>
.
XQuery sample
saxon:parse-html(unparsed-text('test2.html'))//*:h2[contains(@class, 'foo')]
HTML document:
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<h2>h2 1</h2>
<h2 class=foo>h2 2</h2>
</body>
</html>
Saxon EE 12.0 Java finds e.g.
<?xml version="1.0" encoding="UTF-8"?>
<h2 xmlns="http://www.w3.org/1999/xhtml" class="foo">h2 2</h2>
Please register to edit this issue
Actions