Project

Profile

Help

Bug #5952

closed

unparsed-text-available throws an un-catchable IllegalCharsetNameException

Added by Nico Kutscherauer about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2023-04-02
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
Java

Description

If I try to read the following non-wellformed XML document with the function unparsed-text():

<?xml version="1.0" encoding="foo"?>
<foo/>

I get an IllegalCharsetNameException. It was suprising to me, but understandable. The problem is that I can't catch this error. If I try to check before with unparsed-text-available() if the document is readable I get the same error.

Even with <xsl:try> I can not prevent that the process is terminated by this exception.

This is not the desired behaviour, is it?

(I tried it in several versions of Saxon-HE 10.6, 11.5, 12.1 - all the same behavior.)

Please register to edit this issue

Also available in: Atom PDF