This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Stopping Saxon searching for an external DTD


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]