Hi,
I'm trying to use a Entity replacement with a DTD file, and I'm getting
this error while processing with the "XmlValidatingReader" component:
"The parameter entity replacement text must nest properly within markup
declarations. An error occurred at http://localhost/test/dtds/test.dtd, (3,
24)."
I've revised the DTD and I think its correct. This is a little example
that repro the bug:
<!ENTITY % par1 ",test2">
<!ELEMENT test (test1 %par1;)>
<!ELEMENT test1 (#PCDATA)>
<!ELEMENT test2 (#PCDATA)>
And the XML that generates the error message is this:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE test SYSTEM
"http://localhost/test/dtds/test.dtd">
<test>
<test1>123</test1>
<test2>123</test2>
</test>
The code I'm using is:
cadReader = New IO.StringReader(cadXml)
reader = New Xml.XmlTextReader(cadReader)
validator = New Xml.XmlValidatingReader(reader)
AddHandler validator.ValidationEventHandler, AddressOf
ValidationEventHandler
doc.Load(validator)
Does anyone know where the problem can be?
Thanks in advance.