[ http://jira.codehaus.org/browse/MOJO-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252813#action_252813 ]
Jochen Wiedmann commented on MOJO-1413: --------------------------------------- Robert, regarding your project, I found the following problems: - You are mismatching publicId and systemId. The systemId is a files physical location. For example, if you have the following: <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform http://www.w3.org/1999/XSL/Transform.xsd http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml.xsd"> then you have the public ID's http://www.w3.org/1999/XSL/Transform and http://www.w3.org/1999/xhtml (namespace URI) and the system ID's http://www.w3.org/1999/XSL/Transform.xsd and http://www.w3.org/1999/xhtml.xsd. Basically, system ID's are physical location. - Consequently, your catalog file should not look like <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <system systemId="http://www.w3.org/2001/XMLSchema" uri="src/test/resources/XMLSchema.dtd"/> <system systemId="http://www.w3.org/1999/XSL/Transform" uri="schema-for-xslt20.xsd"/> </catalog> but like this: <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <public publicId="http://www.w3.org/2001/XMLSchema" uri="src/test/resources/XMLSchema.dtd"/> <public publicId="http://www.w3.org/1999/XSL/Transform" uri="src/test/resources/schema-for-xslt20.xsd"/> </catalog> - Next problem is, that the Apache resolver takes the catalog files location as the base directory. (Have to admit, that I was unaware of that myself.) In other words, your final catalog file should look like this: <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <public publicId="http://www.w3.org/2001/XMLSchema" uri="XMLSchema.dtd"/> <public publicId="http://www.w3.org/1999/XSL/Transform" uri="schema-for-xslt20.xsd"/> </catalog> In order to ease diagnose of such problems, I have enabled logging messages by the resolver in 1.0-beta-4. Your example works fine for me with the above catalog file. Now, how about contributing a peace of documentation, aka a simple apt file? > xml:validation needs local copy of w3c for validation. (validation fails) > ------------------------------------------------------------------------- > > Key: MOJO-1413 > URL: http://jira.codehaus.org/browse/MOJO-1413 > Project: Mojo > Issue Type: Bug > Components: xml > Environment: <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>xml-maven-plugin</artifactId> > <version>1.0-beta-3-SNAPSHOT</version> > <executions> > <execution> > <goals> > <goal>validate</goal> > </goals> > </execution> > </executions> > <configuration> > <validationSets> > <validationSet> > <dir>src/main/java/com/amplafi/web</dir> > <includes> > <include>**/*.html</include> > </includes> > <excludes> > <exclude>**/package.html</exclude> > </excludes> > </validationSet> > </validationSets> > </configuration> > </plugin> > Reporter: Patrick Moore > Assignee: Jochen Wiedmann > Priority: Critical > Attachments: catalog.xml, xml-validate.log, xmlvalidation.zip > > > xml-maven-plugin cannot validate html files because > http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic . > xml-maven-plugin must have a local copy of the w3c definitions for html, and > xhtml in order to be useful for validating xml files. > Other global dtds like the various RSS dtds need to have a local copy that is > shipped with the plugin. > (copied from : MOJO-1381 -- couldn't figure out a way to update the component > on that bug ) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email