cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ken Barozzi" <>
Subject Re: problems parsing xml from a foreign source in c2.0.0
Date Thu, 07 Mar 2002 07:27:21 GMT
From: "Donald Ball" <>

>  tried to figure out how to disable validation to ignore
> the issue completely. well, it seems that in c2.0.0, you cannot configure
> the parser's validation behavior in the cocoon.xconf file. i looked in the
> source for JaxpParser, and was surprised to note the parser factory's are
> configured to create non-validating parsers:
>     public JaxpParser ()
>     throws SAXException, ParserConfigurationException {
>         this.factory.setNamespaceAware(true);
>         this.factory.setValidating(false);
>         this.docfactory.setNamespaceAware(true);
>         this.docfactory.setValidating(false);
>     }
> if this is right, why is the parser trying to validate?

Hi Donald! :-)

When a DTD is declared, it is needed by the parser even if it's not
Take for example how it parses whitespaces: if an element is declared in the
DTD to contain only other elements, the whitespace between itself and the
children is not sent; otherwise it is, since the parser doesn't know if it
is needed (has a meaning) or not.

Nicola Ken Barozzi         
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message