Re: [xsl] Ignoring a DTD with document()

Subject: Re: [xsl] Ignoring a DTD with document()
From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Apr 2024 23:07:19 -0000
On 19/04/2024 21:46, Mark Giffin m1879@xxxxxxxxxxxxx wrote:
I'm using XSLT 2.0, trying to open an XML file with document(), the
XML file references a DTD that is not available, and document()
fails. How can I get document() to ignore the DTD?

My immediate reaction is just to edit the document and remove the document type declaration so that the document starts with the root element type on the first line.


If it is impossible to edit the document, and none of the other solutions here work, you could use Trang or similar to create a nonce DTD that satisfies all the element types and attributes that occur in the document.

Peter

Current Thread