DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6200>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6200 Parser failure with validate=true when processing stylesheet ------- Additional Comments From [EMAIL PROTECTED] 2003-10-07 07:20 ------- I can certainly re-produce some problem, though it is not what this bug started with. Either this bug has been morphing, or there are new issues which disguise it. Anyway here is what i did today ... * Ignored "validate.xdocs=true" in build.properties as it has no effect. It is deliberately disabled, and we let Forrest do the validation (watch the build messages from 'build xdocs'). * Made a deliberate error in xdocs/index.html (comment-out author/person). * Ran 'build clean' and 'build'. * Ran 'build xdocs' ... yes, Forrest confirms the error. * Ran 'cocoon.sh servlet' and view the webapp doco. * Look at WEB-INF/logs/* for a validation errors ... none, as expected. * Tweak src/webapp/WEB-INF/cocoon.xconf set xml-parser "validate=true" and entity-resolver "verbosity=2" * Ran 'build clean' and 'build'. * Ran 'cocoon.sh servlet' and view the webapp http://localhost:8888/ ... Bang! ---------- Message: Document is invalid: no grammar found. Description: org.apache.cocoon.ProcessingException: Failed to load sitemap from file:/usr/local/cvs/cocoon-2.1/build/webapp/sitemap.xmap: file:/usr/local/cvs/cocoon-2.1/build/webapp/sitemap.xmap:15:21:org.xml.sax.SAXParseException: Document is invalid: no grammar found. Message: Document is invalid: no grammar found. Description: org.apache.cocoon.ProcessingException: Failed to load sitemap from file:/usr/local/cvs/cocoon-2.1/build/webapp/sitemap.xmap: file:/usr/local/cvs/cocoon-2.1/build/webapp/sitemap.xmap:15:21:org.xml.sax.SAXParseException: Document is invalid: no grammar found. ---------- That sounds like it is complaining because the sitemap.xmap does not have a document type declaration. Yeah, i know, DTDs are not good for defining the complexity of our sitemap, but we seem to be forced to declare one. I suppose that when this bug report was opened, we were using the compiled sitemap. Now that we use the tree processor, we see other problems earlier. It would be good to get around this problem so that we can get back to the original bug, but i cannot see how. I tried Vadim's suggested workaround to use a fake DTD: <!DOCTYPE map:sitemap [ <!ELEMENT map:sitemap ANY> <!ATTLIST map:sitemap xmlns:map CDATA #REQUIRED> ]> ... but then we encounter the next error about "map:components" and so on. Perhaps we could specify the complete loose content model. It seems that we need to talk about validation in general. Should we detect when they set validate=true in their cocoon.xconf and switch it back to "false"? Then maybe we could provide some other validation infrastructure, e.g. RELAX NG. Or do we stick to our default policy (not really discussed) that validation is not Cocoon's concern. Anyway, that does not help us get back to the original things that this bug was trying to tell us. --David
