Re: Re: Including Aelfred2 in DOM4J

Maarten Coene <[email protected]> Fri, 19 Mar 2004 17:21:50 +0100
Newsgroups gmane.comp.java.classpath.extensions.discuss
Organization QMedit
Message-ID <[email protected]>
OK, it isn't a bug, I guess I didn't look good enough at the mixed 
content-specification of XML. But wouldn't it be nice if in this case 
the parser didn't normalize things and just passed the (#PCDATA) as 
content-model (like Xerces does) ?

Anyway, I'll have to change my code which compares the content model of 
ELEMENT declarations.

thanks,
Maarten

David Brownell wrote:

>> Maarten Coene <[email protected]> writes:
>>
>>>
>>> The problem is: if I have an ELEMENT declaration like:
>>> <!ELEMENT name (#PCDATA) >
>>> the XmlParser changes the content-model to (#PCDATA)*
>>
>
> That is, it normalizes things.  Why should that be a problem?
> They're equivalent, and SAX2 explicitly allows content models
> to be normalized.
>
> If you have any code that doesn't treat the two identically,
> that'd seem to be where the bug lies.
>
> - Dave
>