Return-Path: Delivered-To: apmail-xml-general-archive@xml.apache.org Received: (qmail 62847 invoked by uid 500); 23 Mar 2001 09:11:02 -0000 Mailing-List: contact general-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: general@xml.apache.org Delivered-To: mailing list general@xml.apache.org Received: (qmail 62821 invoked from network); 23 Mar 2001 09:11:01 -0000 Message-ID: <6565B06C4C6BD311B15F0090279363880A708B@DOMSERV> From: Anthony Dodd To: "Xerces-J-Dev (E-mail)" , "XML General (E-mail)" Subject: FW: DTD Default Values not appearing in document after parsing Date: Fri, 23 Mar 2001 09:17:16 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi I got to the bottom of this problem. If you look at a particular node and call getAttributes() you can see the default attributes and values as applied by the dtd. If you use XMLSerialiser or copy the document to a new document using importNode() then you lose these default attributes and values. I assume the problem is that the attributes are remaining deferred. Is there any way of realising these attributes. Thanks for any help in advance. Tony Dodd -----Original Message----- From: Anthony Dodd [mailto:AnthonyDodd@synergy-fs.com] Sent: 22 March 2001 15:03 To: Xerces-Dev (E-mail) Subject: DTD Default Values not appearing in document after parsing Forgot to attach the files. <> <> > Hi > > I'm wondering if someone could possibly help me. I'm using XercesJ > 1.2.0 "org.apache.xerces.parsers.DOMParser" to parse and validate a > document against a dtd. The following features are set on the DOMParser > instance. > > parser.setFeature( "http://xml.org/sax/features/validation", > true); > > parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-wh > itespace", false); > > parser.setFeature("http://apache.org/xml/features/dom/create-entity-ref-no > des", false); > parser.setIncludeIgnorableWhitespace(false); > > The dtd contains default values for the attributes none of which > appear when I parse the document. I've attached the xml document and > the dtd, I've implemented an EntityResolver to locate the dtd and all that > works successfully. There are no errors reported by the parser. > > Thanks for any help in advance. > Anthony Dodd > > -- > _/_/_/_/ _/ _/ _/ _/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ > Anthony Dodd - Software Development > _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ > Phone: 0115 9677990 > _/_/_/_/ _/_/ _/ _/ _/ _/_/_/ _/_/_/ _/ _/_/ _/_/ > Email: anthonydodd@synergy-fs.com > _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ > Synergy Financial Systems Limited > _/_/_/_/ _/ _/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ > > --------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: general-unsubscribe@xml.apache.org For additional commands, e-mail: general-help@xml.apache.org