Return-Path: Delivered-To: apmail-xml-xalan-j-users-archive@www.apache.org Received: (qmail 21965 invoked from network); 17 May 2004 18:04:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 May 2004 18:04:57 -0000 Received: (qmail 60681 invoked by uid 500); 17 May 2004 18:05:15 -0000 Delivered-To: apmail-xml-xalan-j-users-archive@xml.apache.org Received: (qmail 60576 invoked by uid 500); 17 May 2004 18:05:14 -0000 Mailing-List: contact xalan-j-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list xalan-j-users@xml.apache.org Received: (qmail 60555 invoked by uid 98); 17 May 2004 18:05:14 -0000 Received: from igorh@ca.ibm.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(32.97.182.103):. Processed in 0.124467 secs); 17 May 2004 18:05:14 -0000 X-Qmail-Scanner-Mail-From: igorh@ca.ibm.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(32.97.182.103):. Processed in 0.124467 secs) Received: from unknown (HELO e3.ny.us.ibm.com) (32.97.182.103) by hermes.apache.org with SMTP; 17 May 2004 18:05:13 -0000 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e3.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i4HI4khL705638; Mon, 17 May 2004 14:04:46 -0400 Received: from d25ml01.torolab.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i4HI5JNi106442; Mon, 17 May 2004 14:05:19 -0400 In-Reply-To: <40A4DE3C.4090506@tin.it> Subject: Re: Processing xml without dtd To: Marco Cc: xalan-j-users@xml.apache.org X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Igor Hersht Date: Mon, 17 May 2004 14:04:43 -0400 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 6.0.2CF1|June 9, 2003) at 05/17/2004 14:04:45 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I think this question should be redirected to xerces-j-user@xml.apache.org As far as I remember Xerses has options to ignore unreachable (or unavailable) DTD. Igor Hersht XSLT Development IBM Canada Ltd., 8200 Warden Avenue, Markham, Ontario L6G 1C7 Office D2-260, Phone (905)413-3240 ; FAX (905)413-4839 Marco To 05/14/2004 10:57 xalan-j-users@xml.apache.org AM cc Subject Processing xml without dtd Is it possible to process xml files with unreachable (or unavailable) DTDs? Even using a non-validating sax parser as source, xalan still throws the javax.xml.transform.TransformerException: java.io.FileNotFoundException: office.dtd where office.dtd is the input file dtd. Here's the source: SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setValidating(false); spf.setNamespaceAware(true); XMLReader xmlr = spf.newSAXParser().getXMLReader(); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf.newTransformer(new StreamSource("notes.xsl")); t.transform(new SAXSource(xmlr, new InputSource("content.xml")), new StreamResult("output.html")); Thanks in advance, Marco