RE: [xsl] Stopping Saxon searching for an external DTD

Subject: RE: [xsl] Stopping Saxon searching for an external DTD
From: "Robert C. Lyons" <boblyons@xxxxxxxxxx>
Date: Mon, 12 Feb 2001 18:47:07 -0500
Jim wrote:
	"My best bet is to s/// the DOCTYPE string out
	when I grab it with Perl/LWP."

I had to do this once. I used the following command
from the shell prompt to put the document type
declaration into a comment:

perl -pe 's/(<!DOCTYPE[^>]*>)/<!-- $1 -->/' doc.xml > doc_no_doctype.xml

At the DOS command prompt, the command would be:

perl -pe "s/(<!DOCTYPE[^>]*>)/<!-- $1 -->/" doc.xml > doc_no_doctype.xml

Note that these perl commands assume that the document type
declaration appears on a single line and does not contain
any ">" characters before the ">" character that terminates
the document type declaration.

Best regards,

Bob

<sig name    = 'Bob Lyons'
     title   = 'E-Commerce Consultant'
     company = 'Unidex, Inc.'
     phone   = '+1-732-975-9877'
     email   = 'boblyons@xxxxxxxxxx'
     url     = 'http://www.unidex.com/'
     product = 'XML Convert: transforms flat files to XML and vice versa' />


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread