473,324 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

DTD Entity replacement problems

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.

Nov 12 '05 #1
0 960

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Paul Miller | last post by:
We've run into minidom's inabilty to handle large (20+MB) XML files, and need a replacement that can handle it. Unfortunately, we're pretty dependent on a DOM, so a pulldom or SAX replacement is...
11
by: Douglas Reith | last post by:
Hi There, Can someone please tell me why the XML spec states that an attribute value with an external entity is forbidden? Or point me to the appropriate document? Or better still, perhaps you...
1
by: Steven Simpson | last post by:
Hello, If an XML processor encounters a 'PEReference' in a 'markupdecl' (but not in 'EntityValue'), are there circumstances where it does not have to include it (i.e. use the replacement text...
5
by: Stephan Hoffmann | last post by:
Hi, I use XML mainly as a source for HTML. HTML browsers 'know' certain entity references like &eacute; or &auml;. When I use XSL to transform XML to HTML or XML, these entities are replaced...
4
by: terry | last post by:
could someone tell me how to add or remove entity to a xml file when i dim xmlentity as new xmlentity it's say it's sube new is private thks
4
by: Max | last post by:
I am writing a XML parser in Javascript and i have difficulty to understand the specifics of some "entities". I would want to understand the way in which the non-validating XML Parsers manage...
6
by: Tuomas Rannikko | last post by:
Hello, I'm currently writing a XML processor for the fun of it. There is something I don't understand in the spec though. I'm obviously missing something important. The spec states that both...
3
by: Tuomas Rannikko | last post by:
Hello! I have a simple question about DTDs: Should this be possible? <!DOCTYPE root > In the XML specification I can't find the spot where it says this would be disallowed; however Xerces...
9
by: Max | last post by:
Hello! I would want to know if attributes values can be entity references and if the parser, during processing, can replace with blank string a non registered entity. Eg: <example...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.