Re: DTD validation without DOCTYPE in xml




YewMing wrote:

I have some XML files that needs to be validated with a DTD but the xml files does not have the DOCTYPE tag that reference to the dtd file. Is there any way to tell XmlValidatingReader to specifically use that DTD file even when DOCTYPE is not in the xml file?

No, I don't think so, but it is possible to use XSLT or other tools to make a copy of the incoming XML where the DOCTYPE declaration is added and then you can do validation on the copy.



--

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
.



Relevant Pages

  • Re: Problem with minidom and special chars in HTML
    ... >> doctype. ... it's minidom that cann't fetch DTD from remote ... Download this DTD file to your local machine (it lies at ...
    (comp.lang.python)
  • Re: XmlValidatingReader DTD validation
    ... > resolver code never gets called and the validation does not occur at all. ... > the DTD even if the icoming XML file does not specify the DTD file? ... No Doctype - no validation. ...
    (microsoft.public.dotnet.xml)
  • Re: DTD validation without DOCTYPE in xml
    ... >> I have some XML files that needs to be validated with a DTD but the xml ... >> files does not have the DOCTYPE tag that reference to the dtd file. ... > and then you can do validation on the copy. ...
    (microsoft.public.dotnet.xml)
  • Re: DOCTYPE
    ... I created a helper utility that reads the message into XMLDocument and deletes the DOCTYPE node. ... This could be done in the send pipeline. ... pipeline wants to access the dtd file and in fact looks for it in the ...
    (microsoft.public.biztalk.general)
  • Re: CreateDocumentType file not found
    ... referencing a certain dtd file. ... So far I resorted to building the document without doctype, ... to string and injecting the declaration string into it; ... You can either have dummy DTD file or handle DTD file resolving yourself. ...
    (microsoft.public.dotnet.xml)