This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Stopping Saxon searching for an external DTD
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Stopping Saxon searching for an external DTD
- From: "Robert C. Lyons" <boblyons at unidex dot com>
- Date: Mon, 12 Feb 2001 18:47:07 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@unidex.com'
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