You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Anthony Dodd <An...@synergy-fs.com> on 2001/03/23 10:17:16 UTC

FW: DTD Default Values not appearing in document after parsing

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. 


 <<tmt100.xml>>  <<dmt100.dtd>> 
> 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 
> _/_/_/_/     _/     _/    _/  _/_/_/_/  _/    _/   _/_/_/     _/ 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org