xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Dodd <AnthonyD...@synergy-fs.com>
Subject FW: DTD Default Values not appearing in document after parsing
Date Fri, 23 Mar 2001 09:17:16 GMT

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 
> _/_/_/_/     _/     _/    _/  _/_/_/_/  _/    _/   _/_/_/     _/ 
> 
> 

---------------------------------------------------------------------
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


Mime
View raw message