[ http://jira.codehaus.org/browse/MSITE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219785#action_219785 ]
Peter Runge commented on MSITE-440: ----------------------------------- This problem was holding me up, but I found a workaround. Since [AbstractXmlParser's validate()|https://maven.apache.org/doxia/doxia/doxia-core/xref/org/apache/maven/doxia/parser/AbstractXmlParser.html#611] method uses simple pattern matching for finding whether an XML schema is used in an XML file, I tricked it into thinking there was no XML schema for a file by putting a comment before the main root element, e.g.: {noformat} <?xml version="1.0" encoding="UTF-8"?> <!-- Fool Maven's validator: (see http://jira.codehaus.org/browse/MSITE-440) <document blah="true"> </document> --> <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd" xmlns="http://maven.apache.org/XDOC/2.0"> <body> <section name="Introduction"> <p> ... </p> </section> </body> </document> {noformat} This way Maven builds the site or PDF without validation but I still get full XML validation and auto-completion in my XML editor. > Site document validation fails if unable to retrieve schema (in offline mode) > ----------------------------------------------------------------------------- > > Key: MSITE-440 > URL: http://jira.codehaus.org/browse/MSITE-440 > Project: Maven 2.x Site Plugin > Issue Type: Bug > Components: doxia integration > Affects Versions: 2.1 > Environment: Maven 2.2.1 > Site Plugin 2.1-SNAPSHOT > Doxia 1.1.2 > Reporter: Dave Meibusch > Priority: Critical > Fix For: 2.1.1 > > > The changes included DOXIA-263 to validate XML documents retrieves the > DTD/Schema to validate the document. > For example, for FML, xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 > http://maven.apache.org/xsd/fml-1.0.1.xsd" the Doxia FML parser will retrieve > http://maven.apache.org/xsd/fml-1.0.1.xsd before validating the document. > If in offline mode, or in an environment without connectivity to apache.org, > site generation will appear to hang until the HTTP client code times out > (which is many minutes for each retry) then fail. > Workaround: remove the schema definition from the document (and lose > validation when online and IDE editing support). > Perhaps each Doxia parser should have some embedded schemas (for FML, at > least http://maven.apache.org/FML/1.0.1) so the entities can be resolved > locally. > Or at least a property for disabling document validation. > I don't think v2.1 can be released with this issue unresolved. -- 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