You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.eu> on 2009/12/04 19:52:18 UTC

Re: [Xmlgraphics-fop Wiki] Update of "HowTo/XmlCommonsResolver" by JackBates

Hi Jack,

Thanks for this addition. I note that the page originally describes
how to use the catalog resolver for retrieving images. The -catalog
option specifically only works for the conversion from XML to
output. (In such a case FOP sets up the transformation from XML to FO
using XSLT, and in that setup the -catalog option adds a catalog
resolver.) Even with the -catalog option the catalog resolver is not
used for image retrieval. (Maybe it should, but I have not thought of
it.) Your addition should make this distinction clear. Therefore I
think that the section 'Command line option' should be at the end,
followed by the note about the W3C.

Regarding the catalog resolver in Java 6, I am not sure that it is
present in other Java installations than the one from Sun,
specifically in OpenJDK. Note that the class name is Sun's class
name. This should be checked.

Regards, Simon

On Thu, Dec 03, 2009 at 07:53:49PM -0000, Apache Wiki wrote:
> Dear Wiki user,
> 
> You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.
> 
> The "HowTo/XmlCommonsResolver" page has been changed by JackBates.
> http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver?action=diff&rev1=6&rev2=7
> 
> --------------------------------------------------
> 
>   You can download it at: http://xml.apache.org/mirrors.cgi
>   
>   The main website is at: http://xml.apache.org/commons/components/resolver/
> + 
> + XML Commons Resolver is [http://thread.gmane.org/gmane.text.xml.fop.user/29585 included in Java 6], so if you're running Java 6 or later, it's already installed. In Java 6 the catalog resolver class name is, com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver
>   
>   = The Example =
>   
> @@ -31, +33 @@
> 
>   
>    * Run the ExampleFO2PDF!WithResolver class.
>   
> + = Command line option =
> + 
> + Simon Pepping [http://thread.gmane.org/gmane.text.xml.fop.user/29585 added a -catalog option] in [http://svn.apache.org/viewvc?view=revision&revision=825875 revision 825875]. With this option you can render XML with the FOP command and use the catalog resolver:
> + 
> + {{{  $ ./fop -catalog -xml icaatom.html -xsl icaatom.xsl icaatom.pdf}}}
> + 
>   = Notes =
>   
>   You will recognize that the FO file is specified through a "URN", too, not just the image referenced in the FO file. This is simply to make it easier for you to set up the demo. The FO file itself will be loaded directly from the Web.
>   
> + Since the W3C started [http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic blocking abusive request patterns] for DTDs, it may be necessary to use local copies of these DTDs instead. A good way to do this is with the catalog resolver. Errors like the following may happen when you try using a DTD from the W3C's servers:
> + 
> + {{{
> + java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> + }}}
> + 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
> 

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: [Xmlgraphics-fop Wiki] Update of "HowTo/XmlCommonsResolver" by JackBates

Posted by Jack Bates <ms...@freezone.co.uk>.
Thank you Simon - I made these corrections

On Fri, 2009-12-04 at 19:52 +0100, Simon Pepping wrote:
> Hi Jack,
> 
> Thanks for this addition. I note that the page originally describes
> how to use the catalog resolver for retrieving images. The -catalog
> option specifically only works for the conversion from XML to
> output. (In such a case FOP sets up the transformation from XML to FO
> using XSLT, and in that setup the -catalog option adds a catalog
> resolver.) Even with the -catalog option the catalog resolver is not
> used for image retrieval. (Maybe it should, but I have not thought of
> it.) Your addition should make this distinction clear. Therefore I
> think that the section 'Command line option' should be at the end,
> followed by the note about the W3C.
> 
> Regarding the catalog resolver in Java 6, I am not sure that it is
> present in other Java installations than the one from Sun,
> specifically in OpenJDK. Note that the class name is Sun's class
> name. This should be checked.
> 
> Regards, Simon
> 
> On Thu, Dec 03, 2009 at 07:53:49PM -0000, Apache Wiki wrote:
> > Dear Wiki user,
> > 
> > You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.
> > 
> > The "HowTo/XmlCommonsResolver" page has been changed by JackBates.
> > http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver?action=diff&rev1=6&rev2=7
> > 
> > --------------------------------------------------
> > 
> >   You can download it at: http://xml.apache.org/mirrors.cgi
> >   
> >   The main website is at: http://xml.apache.org/commons/components/resolver/
> > + 
> > + XML Commons Resolver is [http://thread.gmane.org/gmane.text.xml.fop.user/29585 included in Java 6], so if you're running Java 6 or later, it's already installed. In Java 6 the catalog resolver class name is, com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver
> >   
> >   = The Example =
> >   
> > @@ -31, +33 @@
> > 
> >   
> >    * Run the ExampleFO2PDF!WithResolver class.
> >   
> > + = Command line option =
> > + 
> > + Simon Pepping [http://thread.gmane.org/gmane.text.xml.fop.user/29585 added a -catalog option] in [http://svn.apache.org/viewvc?view=revision&revision=825875 revision 825875]. With this option you can render XML with the FOP command and use the catalog resolver:
> > + 
> > + {{{  $ ./fop -catalog -xml icaatom.html -xsl icaatom.xsl icaatom.pdf}}}
> > + 
> >   = Notes =
> >   
> >   You will recognize that the FO file is specified through a "URN", too, not just the image referenced in the FO file. This is simply to make it easier for you to set up the demo. The FO file itself will be loaded directly from the Web.
> >   
> > + Since the W3C started [http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic blocking abusive request patterns] for DTDs, it may be necessary to use local copies of these DTDs instead. A good way to do this is with the catalog resolver. Errors like the following may happen when you try using a DTD from the W3C's servers:
> > + 
> > + {{{
> > + java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> > + }}}
> > + 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
> > 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org