[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-xml] Another ValidationConsumer Question...

From: Jeff Rafter
Subject: [Classpathx-xml] Another ValidationConsumer Question...
Date: Tue, 12 Mar 2002 18:07:21 -0600

I have a lot of the functionality ported for the ValidationConsumer I have
been working on in Pascal. I am having problems though. VERY simple content
models function perfectly-- for example

<?xml version="1.0"?>
<!DOCTYPE catalog [
  <!ELEMENT catalog (CD*)>

Can be validated. However if there are multiple elements in a sequence
model, the second element (even if there are more than two) causes a
failure-- so the following document

<?xml version="1.0"?>
<!DOCTYPE catalog [
  <!ELEMENT catalog (CD, Album)>
  <!ELEMENT Album (#PCDATA)>

Raises an error: "Element Type 'Album' in element 'catalog' violates content
model (CD,Album). I have tried to trace what is happening but am continually
lost. When the test for Album occurs the current recognizer is an
EmptyRecognizer (which is created in the call to patchNext as the model is
first built). I can't find the bug... but I am assuming that the
EmptyRecognizer that is created in patchNext in the ChildrenRecognizer
constructor is the terminating model and is never intended for actual use
(except in invalid documents). So my bug must be in populate right? Is it
safe to assume that


should generate two ChildrenRecognizers in the the components array and a
third EmptyRecognizer is added as the terminating node in the call to patch

Jeff Rafter
Defined Systems
XML Development and Developer Web Hosting

reply via email to

[Prev in Thread] Current Thread [Next in Thread]