Thanks, however the error isn't on the system parameter, which was a typo by
the way. That should have been the fourth parameter.
The error I get when running the following variant is:
CreateDocumentType("procedure", "-//LMSSC//DTD XML//CAEWriter Minimal
Revisable Units 2.0.2//Vulcan//EN", null,null);
An unhandled exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Additional information: The path is not of a legal form.
This text works fine when loading the document with the declaration
pre-existing in the document. Now I'm trying to build the document.
Scott
[quoted text, click to view] "Martin Honnen" wrote:
>
>
> scottl wrote:
>
>
> > The document type declaration is:
> > <!DOCTYPE procedure PUBLIC
> > "-//LMSSC//DTD XML//CAEWriter Minimal Revisable Units 2.0.2//Vulcan//EN"
> > "vulcan-cae.dtd">
>
> You need e.g. C# (with no line break inside of the string literals)
>
> XmlDocument xmlDocument = new XmlDocument();
> XmlDocumentType documentTypeDeclaration =
> xmlDocument.CreateDocumentType(
> "procedure",
> "-//LMSSC//DTD XML//CAEWriter Minimal Revisable Units 2.0.2//Vulcan//EN",
> "vulcan-cae.dtd",
> null
> );
>
> Note that the system id (e.g. vulcan-cae.dtd) needs to point to an
> existing file.
>
>
> --
>
> Martin Honnen --- MVP XML
>
http://JavaScript.FAQTs.com/
[quoted text, click to view] scottl wrote:
[quoted text, click to view] > The document type declaration is:
> <!DOCTYPE procedure PUBLIC
> "-//LMSSC//DTD XML//CAEWriter Minimal Revisable Units 2.0.2//Vulcan//EN"
> "vulcan-cae.dtd">
You need e.g. C# (with no line break inside of the string literals)
XmlDocument xmlDocument = new XmlDocument();
XmlDocumentType documentTypeDeclaration =
xmlDocument.CreateDocumentType(
"procedure",
"-//LMSSC//DTD XML//CAEWriter Minimal Revisable Units 2.0.2//Vulcan//EN",
"vulcan-cae.dtd",
null
);
Note that the system id (e.g. vulcan-cae.dtd) needs to point to an
existing file.
--
Martin Honnen --- MVP XML
[quoted text, click to view] scottl wrote:
[quoted text, click to view] > The error I get when running the following variant is:
> CreateDocumentType("procedure", "-//LMSSC//DTD XML//CAEWriter Minimal
> Revisable Units 2.0.2//Vulcan//EN", null,null);
>
> An unhandled exception of type 'System.ArgumentException' occurred in
> mscorlib.dll
> Additional information: The path is not of a legal form.
Hmm, I see that error here with .NET 1.1. When I compile and run with
..NET 2.0 I don't get any error.
I am not sure there is anything wrong with that public id, it rather
looks like you have hit a bug with CreateDocumentType in .NET 1.1.
--
Martin Honnen --- MVP XML