[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Advice on Java DocBook DOMSource() to PDF
Also, the directory containing CatalogManager.properties needs to be in the classpath. See the thread entitled "can't get any of the 3 major free xslt processors to work" from today for more details... On 9/8/06, Chris Chiasson <chris@chiasson.name> wrote: > It can be hard to configure a java xslt processor to behave correctly. > See the end of this email for a command line that will call saxon > using xerces and use xinclude. You can probably figure out a way to > make an equivalent call from inside a java program. I'm probably about > to attempt it in ant. > > java -cp "/usr/share/xerces-2/lib/xercesImpl.jar:/usr/share/xerces-2/lib/xml-apis.jar:/usr/share/saxon-bin/lib/saxon.jar:/usr/share/sgml/docbook/xsl-stylesheets-1.70.1/extensions/saxon653.jar:/usr/share/xml-commons/lib/resolver.jar:/etc/xml" > -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl > -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl > -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration > com.icl.saxon.StyleSheet -r > org.apache.xml.resolver.tools.CatalogResolver -x > org.apache.xml.resolver.tools.ResolvingXMLReader -y > org.apache.xml.resolver.tools.ResolvingXMLReader -o > src/Engineering_Optimization.fo src/Engineering_Optimization.xml > xsl/fo.xsl > > On 9/8/06, Don Adams <dga@sgi.com> wrote: > > > > I wrote a Java web application that is packaged in a WAR > > file and runs on a JBoss server. The Java application > > creates a valid, DocBook DOMSource(). I can transform this > > DOMSource() into an XML file and manually run xsltproc > > using the docbook-xsl-1.64.1 stylesheets. Then I manually run > > fop-0.20.5 to generate the PDF I want from it. > > > > But, what I really want to do is to automatically generate PDF > > from the DocBook DOMSource() in my Java web application so that > > users can directly view a PDF file that is generated from a > > database query. > > > > Does anyone have any advice on the best method to do this? > > > > > > As a first step, I tried to use the > > Transformer.transform(Source, Result) > > XSL transformer in Java with the docbook-xsl-1.64.1 > > stylesheets, but I get these errors for xhtml/docbook.xsl: > > > > 11:22:37,434 INFO [STDOUT] SystemId Unknown; Line #85; Column #15; Can not > > load requested doc: C:\Jboss\jboss-4.0.\bin\..\common\l10n.xml > > 11:22:37,434 INFO [STDOUT] SystemId Unknown; Line #95; Column #20; No > > localization exists for "en" or "". Using default "en". > > 11:22:37,434 INFO [STDOUT] Unknown error in XPath. > > > > > > Now I'm stuck and am wondering if this is the > > right path to go down for what I'm trying to do. > > Maybe the docbook-xsl stylesheets aren't designed > > to be usable in a WAR or JAR file and transformed > > using the Java Transformer class? > > > > Thanks, > > Don Adams > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > > > > > > -- > http://chris.chiasson.name/ > -- http://chris.chiasson.name/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]