You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Benson Cheng <Be...@viacore.net> on 2003/06/11 23:47:58 UTC

schema validation with DTD in the xml

Hi All,

I am doing the schema validations on the incoming xml documents, and most of the documents contain the DOCTYPE line in the document, currently I remove this line from the document before pass it to Xerces with a schema name for the schema validation.  I am wondering  is there a property in Xerces that we can set, so it will not try to load the DTD?  Or is there other way such as use the EntityResolver.resolveEntity() method return an empty InputSource or null, so Xerces does not report any errors regarding to the DTD is not present?

thanks in advance,
Benson.


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


[OT] viewing DTD in browser

Posted by Chris Cheshire <cc...@bigredwire.com>.
This is somewhat OT but I can't seem to find an answer to this anywhere, 
so hopefully someone here can shed some light on the situation.

In my javadocs for my app, I have linked to the DTDs used. If the DTDs 
contain absolutely no comments at all, then the DTDs can be viewed in a 
browser (I have tried NS 7 and IE 6 installed on Win2K, and Sun's 
Mozilla 1.2.1 on Solaris/x86 2.8). As soon I link to a DTD with comments 
in it, the browser shows a blank page, yet viewing the source shows the 
entire contents of the DTD. If I create a copy of the DTD and give it a 
txt extension the page is rendered properly. I don't like this scenario 
at all :(

Has anyone seen this behaviour before? Is there any way around it? Is 
there something I can put in the DTD to stop it?

Thanks

Chris



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