[XML-SIG] yet another question.

Michael Sobolev mss@transas.com
Tue, 8 Sep 1998 22:47:27 +0400

Let's suppose the following DTD.

    <!ELEMENT foo (bar+)>

    <!ELEMENT bar (#PCDATA)>

I believe that the following text conforms the above specification:


If I run pyexpat parser on the above text, I will get something like:

    start_element foo
    pcdata \n
    pcdata '   '
    start_element bar
    pcdata 1
    end_element bar
    pcdata \n
    pcdata '   '
    start_element bar
    pcdata 2
    end_element bar
    pcdata \n
    end_element foo

This is fine since expat is not a validating parser.  What should I expect from
a validating one?  After the declaration, foo cannot have any pcdata at all.