It was an issue with the Maven XML Plugin. I spoke to one of the
developers and know where the problem is. Tomorrow I will create some
IT tests to show the problem, patch it and create an issue for it.

With regards,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl



On Tue, Sep 15, 2009 at 6:20 PM, Sean Hennessy
<[email protected]> wrote:
> try putting a catalogmanager.properties in same folder as your catalog.xml
> edit catalogs to match the path to the catalog.xml on your system.
> <programlisting catalogmanager.properties>
> #CatalogManager.properties
>
> # 1 ..4
> #This controls the screen printout as catalogs are processed. Keep it as low 
> as you need until something goes wrong.
> verbosity=4
>
> #If relative-catalogs is yes, relative catalogs in the catalogs property will 
> be left relative;
> #otherwise they will be made absolute with respect to the base URI of this 
> file.
> relative-catalogs=yes
>
> # Always use semicolons in this list.
> #This is the pointer to the catalog to use
> catalogs=/usr/local/share/sdl/xmlV4.4/catalog.xml
>
> # either public or system
> prefer=public
>
> #this option controls whether or not a new instance of the resolver is 
> constructed for each parse.
> static-catalog=yes
>
> #toggle whether or not the resolver classes obey the
> # <?oasis-xml-catalog?> processing instruction.
> allow-oasis-xml-catalog-pi=yes
>
> catalog-class-name=com.sun.resolver.Resolver
> use.extensions=1
> textinsert.extension=1
> </programlisting>
>
> -----Original Message-----
> From: Nick Stolwijk [mailto:[email protected]]
> Sent: Tuesday, September 15, 2009 8:50 AM
> To: Maven Users List
> Subject: Re: Maven XML Plugin & xml-resolver, using it and debugging it
>
> 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]
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to