This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.
|
Previous: | ![]() | Desktop Publishing | (See printing version) |
Next: | ![]() | The Learning Zone |
Michel Goossens , IT/API
Several new tools related to XML have become available lately. I have installed a few that are Java-based at CERN. I plan to add new interesting XML-related applications as they are developed. Please send your suggestions for adding such packages to the author.
Below you find the packages that have been added recently. For each of them there is a brief description. More information is available in the documentation.
The possible command parameters are discovered by just typing the xerces command. Examples of using xerces are
xerces -saxcount -v invitationfr.xml invitationfr.xml: 2003 ms (14 elems, 0 attrs, 18 spaces, 384 chars) xerces -saxcount invitationfr.xml invitationfr.xml: 1693 ms (14 elems, 0 attrs, 18 spaces, 384 chars)
The first version with the -v switch verifies the file and counts the elements, while the version without that switch merely checks the file for well-formedness.
A transformation of an XML file by an XSL stylesheet is obtained as follows:
xalan invitationfr.xml invlat1fr.xsl a.tex ========= Parsing file:invlat1fr.xsl ========== Parse of file:invlat1fr.xsl took 3406 milliseconds ========= Parsing invitationfr.xml ========== Parse of invitationfr.xml took 439 milliseconds ============================= Transforming... transform took 494 milliseconds XSLProcessor: done
A transformation of an XML file by an XSL stylesheet is obtained as follows:
saxonxsl -t invitationfr.xml invlat1fr.xsl > a.tex SAXON from Michael Kay of ICL Version 5.2 Elapsed time: 2235 milliseconds
A transformation of an XML file by an XSL stylesheet is obtained as follows:
oraxsl -v invitationfr.xml invlat1fr.xsl a.tex 1 XML document will be transformed using XSLT stylesheet specified in invlat1fr.xsl with 1 thread Parsing file invlat1fr.xsl Parsing file invitationfr.xml Transforming XML document specified in invitationfr.xml
fop invitation.xml invfo1.xsl a.pdf FOP 0.12.1 using SAX parser org.apache.xerces.parsers.SAXParser using renderer org.apache.fop.render.pdf.PDFRenderer using element mapping org.apache.fop.fo.StandardElementMapping using element mapping org.apache.fop.svg.SVGElementMapping building formatting object tree setting up fonts formatting FOs into areas [1] rendering areas to PDF writing out PDF
The PDF file a.pdf can be viewed with acroread and printed if needed.
A series of four lectures on XML in the framework of the Academic Training Program is planned for Monday 22nd to Thursday 25th of May.
For matters related to this article please contact the author.
Cnl.Editor@cern.ch