XSLT Process in fop-2.2-bin.zip

Q

How to run the XSLT process in fop-2.2-bin.zip transform XML files using XSLT templates?

✍: FYIcenter.com

A

which can be used to perform an XSLT process to transform an XML file using XSLT template. The XSLT process reads an XML file and an XSLT file. The output is what ever the XSLT file wants to generate.

See the session below on how to run run the XSLT process:

\fyicenter>cd \local\fop-2.2\fop

\local\fop-2.2\fop>java -cp .\lib\xalan-2.7.2.jar org.apache.xalan.xslt.Process
Xalan-J command line Process class options:

                        -Common Options-
   [-XSLTC (use XSLTC for transformation)]
   [-IN inputXMLURL]
   [-XSL XSLTransformationURL]
   [-OUT outputFileName]
   [-E (Do not expand entity refs)]
   [-EDUMP {optional filename} (Do stackdump on error.)]
   [-XML (Use XML formatter and add XML header.)]
   [-TEXT (Use simple Text formatter.)]
   [-HTML (Use HTML formatter.)]
   [-PARAM name expression (Set a stylesheet parameter)]
   [-MEDIA mediaType (use media attribute to find stylesheet associated with a document.)]
   [-FLAVOR flavorName (Explicitly use s2s=SAX or d2d=DOM to do transform.)]
   [-DIAG (Print overall milliseconds transform took.)]
   [-URIRESOLVER full class name (URIResolver to be used to resolve URIs)]
   [-ENTITYRESOLVER full class name (EntityResolver to be used to resolve entities)]
   (press <return> to continue)
   [-CONTENTHANDLER full class name (ContentHandler to be used to serialize output)]
   [-SECURE (set the secure processing feature to true.)]

                        -Options for Xalan-
   [-QC (Quiet Pattern Conflicts Warnings)]
   [-TT (Trace the templates as they are being called.)]
   [-TG (Trace each generation event.)]
   [-TS (Trace each selection event.)]
   [-TTC (Trace the template children as they are being processed.)]
   [-TCLASS (TraceListener class for trace extensions.)]
   [-L use line numbers for source document]
   [-INCREMENTAL (request incremental DTM construction by setting http://xml.apache.org/...
   [-NOOPTIMIMIZE (request no stylesheet optimization processing by setting http://xml.apache.org/...
   [-RL recursionlimit (assert numeric limit on stylesheet recursion depth.)]

                        -Options for XSLTC-
   [-XO [transletName] (assign the name to the generated translet)]
   (press <return> to continue)
   [-XD destinationDirectory (specify a destination directory for translet)]
   [-XJ jarfile (packages translet classes into a jar file of name <jarfile>)]
   [-XP package (specifies a package name prefix for all generated translet classes)]
   [-XN (enables template inlining)]
   [-XX (turns on additional debugging message output)]
   [-XT (use translet to transform if possible)]

 

Download and Install fop-2.0-bin.zip

"fop" Command in fop-2.2-bin.zip

Download and Installing of FOP 2.x

⇑⇑ FAQ for FOP (Formatting Object Processor)

2018-04-28, 229👍, 0💬