> I've included an xml and a dtd file in my Resources folder (This is a
> Winforms VB project in VS2005.) I'm planning on using the xml in Resources
[quoted text clipped - 5 lines]
>
> Given that, is it possible to use a DTD in Resources to validate the XML?
That should be possible by using a custom implementation of XmlResolver
that ensures that the system identifier is resolved by loading the DTD
from the resource.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
B. Chernick - 03 Jul 2008 18:08 GMT
That's just it. The basic ref states that it 'Resolves external XML
resources named by a Uniform Resource Identifier (URI). ' Does this apply to
this situation?
> > I've included an xml and a dtd file in my Resources folder (This is a
> > Winforms VB project in VS2005.) I'm planning on using the xml in Resources
[quoted text clipped - 9 lines]
> that ensures that the system identifier is resolved by loading the DTD
> from the resource.
Martin Honnen - 04 Jul 2008 12:13 GMT
> That's just it. The basic ref states that it 'Resolves external XML
> resources named by a Uniform Resource Identifier (URI). ' Does this apply to
> this situation?
Based on your previous post where you have
<!DOCTYPE BDD SYSTEM "EAI.dtd">
the EAI.dtd is a (relative) URI that needs to be resolved to load the
external DTD. If you put that into a .NET assembly as a resource then
you need to provide a custom implementation of XmlResolver so that the
XML parser finds the DTD in the assembly.
See
http://www.hanselman.com/blog/LoadingXmlSchemaFilesOutOfAssemblyResources.aspx
for an example, it deals with schemas but the mechanism is the same
whether the parser needs to access a referenced DTD or a referenced schema.

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