I tried adding the rewrites to no avail. Trying something more with
the xml-resolver and doctypes (It seems for doctypes xml-resolver
needs public or system identifier and not the url)
# java -cp
/home/nick/.m2/repository/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
org.apache.xml.resolver.apps.resolver -d 2 -c catalog.xml -p
"-//W3C//DTD XHTML1.0 Strict//EN" doctype
Cannot find CatalogManager.properties
Loading catalog: ./xcatalog
Loading catalog: catalog.xml
Resolve DOCTYPE (name, publicid, systemid):
public id: -//W3C//DTD XHTML 1.0 Strict//EN
Result: file:/home/nick/projects/example/src/main/xslt/catalog/xhtml1-strict.dtd
It should find the dtd file based on the doctype and my catalog. So it
seems my configuration of the Maven XML plugin is wrong (Or that the
plugin is broken, but that is just a last resort)
My current configuration:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<executions>
<execution>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
<configuration>
<catalogs>
<catalog>src/main/xslt/catalog/catalog.xml</catalog>
</catalogs>
<transformationSets>
<transformationSet>
<dir>src/main/xslt/example</dir>
<stylesheet>src/main/xslt/printversion.xsl</stylesheet>
</transformationSet>
</transformationSets>
</configuration>
</plugin>
Any more tips?
With regards,
Nick Stolwijk
~Java Developer~
IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl
On Tue, Sep 15, 2009 at 5:23 PM, Sean Hennessy
<[email protected]> wrote:
> in your catalog.xml I don't see where you specify rewrite?
>
> <?xml version="1.0" ?>
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
> <group xml:base="file:///c:/usr/local/share/sdl/xmlV4.2/" >
>
> <rewriteURI
> uriStartString="http://docbook.org/xml/4.2/"
> rewritePrefix="file:///c:/usr/local/share/sdl/xmlV4.2/" />
> <rewriteSystem
> systemIdStartString="http://docbook.org/xml/4.2/"
> rewritePrefix="file:///c:/usr/local/share/sdl/xmlV4.2/" />
> [snip]
> -----Original Message-----
> From: Nick Stolwijk [mailto:[email protected]]
> Sent: Tuesday, September 15, 2009 7:06 AM
> To: Maven Users List
> Subject: Maven XML Plugin & xml-resolver, using it and debugging it
>
> Hi,
>
> I am trying to use the Maven XML Plugin to transform an xhml file to another
> xhtml file with help of an xslt file. I've got my xslt file setup and the
> plugin using it.
>
> However, XHTML files uses a Doctype like:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
> When I run the transformation, I get the following error:
>
> Server returned HTTP response code: 503 for URL:
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
>
> I have read the w3 policy on this files and understand they don't serve them
> to applications. Applications should use a catalog file and provide the dtd's
> themself.
>
> I've tried to supply a catalog file to the XML plugin, according to the
> documentation, which points to the dtd's, which are also on my system.
>
> <?xml version="1.0"?>
> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog
> V1.0//EN"
>
> "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
>
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
> prefer="public" xml:base="file:///home/nick/projects/example-project">
>
> <public publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
> uri="/src/main/xslt/catalog/xhtml1-strict.dtd" />
> <system systemId="urn:http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
> uri="/src/main/xslt/catalog/xhtml1-strict.dtd"/>
> </catalog>
>
> I've tried this with multiple xml:base and or uri parts, but it still keeps
> throwing the error. I've read about the system properties which should be
> read by the xml resolver to debug this. [1] It does not seem to give any more
> output than just the error.
>
> Is there some way to debug the xml-resolver or to just get the thing to work?
>
> [1] http://xml.apache.org/commons/components/apidocs/resolver/index.html
>
> With regards,
>
> Nick Stolwijk
> ~Java Developer~
>
> IPROFS BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> http://www.iprofs.nl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]