How to Convert a TEI Document to PDF within the <oxygen/> XML Editor



Similar documents
MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

An Oracle White Paper May Creating Custom PDF Reports with Oracle Application Express and the APEX Listener

Xtreeme Search Engine Studio Help Xtreeme

Building A Very Simple Web Site

Create a PDF File. Tip. In this lesson, you will learn how to:

Setting up Auto Import/Export for Version 7

MICROSOFT EXCEL 2011 MANAGE WORKBOOKS

HOW TO CREATE AN HTML5 JEOPARDY- STYLE GAME IN CAPTIVATE

Adobe Acrobat 9 Pro Accessibility Guide: Creating Accessible PDF from Microsoft Word

Open a PDF document using Adobe Reader, then click on the Tools menu on the upper left hand corner.

Composite.Community.Newsletter - User Guide

Enhancing the SAS Enhanced Editor with Toolbar Customizations Lynn Mullins, PPD, Cincinnati, Ohio

How to install and use the File Sharing Outlook Plugin

Terms and Definitions for CMS Administrators, Architects, and Developers

Umbraco v4 Editors Manual

What is a Mail Merge?

Introduction to XML Applications

Acrobat X Pro Accessible Forms and Interactive Documents

The Application Getting Started Screen is display when the Recruiting Matrix 2008 Application is Started.

Configuring the SST DeviceNet OPC Server

Stored Documents and the FileCabinet

How to Mail Merge PDF Documents

Data Integration through XML/XSLT. Presenter: Xin Gu

Overview... 2 How to Add New Documents... 3 Adding a Note / SMS or Phone Message... 3 Adding a New Letter How to Create Letter Templates...

Composite.Community.Newsletter - User Guide

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

How to create pop-up menus

Enhanced Attendance Reporting for SmartLock Pro Plus OPERATOR GUIDE

OUTLOOK WEB APP (OWA): MAIL

Creating Fill-able Forms using Acrobat 8.0: Part 1

Integrating with BarTender Integration Builder

MadCap Software. Import Guide. Flare 11

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

Witango Application Server 6. Installation Guide for Windows

Content Management System User Guide

About XML in InDesign

Technical Bulletin. SQL Express Backup Utility

GOOGLE DOCS APPLICATION WORK WITH GOOGLE DOCUMENTS

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

Building A Very Simple Website

Outlook Plug-In User Guide

Automate tasks with Visual Basic macros

Novell ZENworks Asset Management 7.5

DocumentsCorePack for MS CRM 2011 Implementation Guide

Managing XML Documents Versions and Upgrades with XSLT

SQL Server 2005: Report Builder

Basics. a. Click the arrow to the right of the Options button, and then click Bcc.

Cascade Server CMS Quick Start Guide

XML Editing with Oxygen. Getting started, tips and tricks

Practice Fusion API Client Installation Guide for Windows

Designing and Implementing Forms 34

HP ARCHIVING SOFTWARE FOR EXCHANGE

Database Forms and Reports Tutorial

Chapter 19: XML. Working with XML. About XML

SPHOL326: Designing a SharePoint 2013 Site. Hands-On Lab. Lab Manual

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Using an external style sheet with Dreamweaver (CS6)

Outlook Plug In User Guide

Adobe Digital Signatures in Adobe Acrobat X Pro

Word 2010: Mail Merge to with Attachments

MONITORING PERFORMANCE IN WINDOWS 7

How to test and debug an ASP.NET application

Scan to PC Desktop: Image Retriever 5.2 for Xerox WorkCentre C2424

Getting Started Guide. Chapter 14 Customizing LibreOffice

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D

Guide to PDF Publishing

SimLab 3D PDF. Settings

Working with Macros and VBA in Excel 2007

Easy Setup Guide for the Sony Network Camera

ITCS QUICK REFERENCE GUIDE: EXPRESSION WEB SITE

DiskPulse DISK CHANGE MONITOR

What's New In DITA CMS 4.0

Microsoft Word Quick Reference Guide. Union Institute & University

OVERVIEW CODEMETER.

How to Create User-Defined Fields and Tables

TABLE OF CONTENTS I. MAIL MERGING...1 II. MAIL MERGE WIZARD...1 III. MAIL MERGE TOOLBAR...4 PRINTING LABELS AND ENVELOPES...4

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

How to Configure Windows 8.1 to run ereports on IE11

MPLAB X + CCS C Compiler Tutorial

UF Health SharePoint 2010 Document Libraries

Commander. The World's Leading Software for Label, Barcode, RFID & Card Printing

To Begin Customize Office

How to code, test, and validate a web page

Kentico CMS User s Guide 5.0

USING WORDPERFECT'S MERGE TO CREATE MAILING LABELS FROM A QUATTRO PRO SPREADSHEET FILE Click on a Step to move to the next Step

This feature allows you to convert a collection of PDFs into EndNote references using the Digital Object Identifier (DOI).

Microsoft Dynamics NAV Connector. User Guide

Creating a Java application using Perfect Developer and the Java Develo...

Data Tool Platform SQL Development Tools

StreamServe Persuasion SP4 StreamServe Connect for SAP - Business Processes

Appendix K Introduction to Microsoft Visual C++ 6.0

How to create and personalize a PDF portfolio

Getting Started Guide

Adding a File Attachment to a CFS Requisition

Using Adobe Dreamweaver CS4 (10.0)

Generating lesson plans with. Adobe Acrobat

Creating Digital Signatures

Transcription:

PDF within the <oxygen/> XML Editor Abstract This article is intended to prove how easy it is to create a TEI XML (Text Encoding Initiative) document and then convert it to the PDF format, all from within the <oxygen/> XML editor. We will use the TEI Lite DTD, the TEI XSL-FO stylesheets and the Apache's FOP, all of which are integrated into the <oxygen/> installation kit. Table of Contents Creating an XML Document Using the TEI Lite DTD... 1 Editing the XML Document... 3 Transforming to PDF... 6 Configuring an external FO processor, or other post processor... 9 Creating an XML Document Using the TEI Lite DTD From the File menu choose New from Templates... The following window will be displayed, allowing you to choose from a list of built-in document templates as starting points for your TEI XML documents: 1

Figure 1. Document templates in <oxygen/> Choose one of the TEI document templates from the list of built-in templates. If you select the TEI Lite template and click on the OK button <oxygen/> will automatically generate and open a skeleton document with a DTD declaration and minimum markup conforming to the declared DTD. The encoding is automatically set to "UTF-8". 2

Figure 2. Skeleton TEI document If you wish to use a customized special-purpose TEI schema of type DTD, RELAX NG and W3C XML Schema (for example generated with the Roma program [http://tei.oucs.ox.ac.uk/roma/], available on the TEI website [http://www.tei-c.org/software/]) you can manually modify the default document type declaration at the beginning of the document. Note The encoding can be changed at any time by editing the XML prolog, for instance, changing to UTF-16: <?xml version="1.0" encoding="utf-16"?> Editing the XML Document The editor will scan the DTD file and will initialize the content completion assistant. By pressing the "<" key, it is displayed a window containing all the elements that can be inserted at that point in the document. Notice that the window appears also when adding new attributes or when an attribute has default values you can choose from. In the first case the content completion window is triggered by pressing the SPACE key or the TAB key, in the later by pressing ' or " keys. A simple TEI document can be: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TEI.2 PUBLIC "-//TEI Consortium//DTD TEI Lite XML ver. 1//EN" "http://www.tei-c.org/lite/dtd/teixlite.dtd" [ <!ENTITY % TEI.XML 'INCLUDE'> 3

]> <TEI.2> <teiheader type="text"> <filedesc> <titlestmt> <title type="main">main title goes here</title> <title type="sub">subtitle goes here</title> <author>syncro soft Ltd.</author> </titlestmt> <editionstmt> <edition/> </editionstmt> <extent> <seg type="size">filesize uncompressed: 10 Kbytes.</seg> <seg type="format">xml TEI Lite</seg> <seg type="location">online</seg> </extent> <publicationstmt> <distributor> <address> <addrline> <name type="organisation">syncro soft Ltd.</name> </addrline> <addrline>170 Nicolae Titulescu Street</addrLine> <addrline> <name type="place">craiova</name> </addrline> <addrline>1100</addrline> <addrline>support@oxygenxml.com</addrline> </address> </distributor> <availability status="restricted"> <p>freely available for non-commercial use provided that this header is included in its entirety with any copy distributed</p> </availability> <date>2003-05-27</date> <pubplace>craiova, Romania</pubPlace> <publisher> 2003, syncro soft Ltd</publisher> </publicationstmt> <notesstmt> <note>this is a prototype header</note> </notesstmt> <sourcedesc> <p>compiled from existing internal syncro documents.</p> </sourcedesc> </filedesc> <encodingdesc> <editorialdecl> <p>paragraph, page divisions and punctuation have been checked before publication. Unless otherwise indicated (by a REND attribute) all EMPH elements should be rendered in italics, and all SOCALLED elements should be enclosed by quotation marks.</p> </editorialdecl> <refsdecl> <p>div sections bear IDs in the form Sn.</p> </refsdecl> 4

</encodingdesc> <revisiondesc> <change> <date>2003-05-25</date> <respstmt> <name>syncro soft staff</name> <resp>edt (Editor)</resp> </respstmt> <item>created the initial version of the article</item> </change> <change> <date>2003-05-26</date> <respstmt> <name>syncro soft staff</name> <resp>pfr (Proofreader)</resp> </respstmt> <item>check text</item> </change> <change> <date>2003-05-27</date> <respstmt> <name>syncro soft staff</name> <resp>cvt (Converter)</resp> </respstmt> <item>convert to PDF using TEI XSL-FO stylesheets and Apache FOP</item> </change> </revisiondesc> </teiheader> <text> <front> <titlepage> <doctitle> <titlepart type="main">main title to be displayed on screen</titlepart <titlepart type="sub">subtitle to be displayed on screen</titlepart> </doctitle> <docauthor> <name>syncro soft</name> </docauthor> <docdate>may 27, 2003</docDate> </titlepage> </front> <body> <divgen type="toc"/> <div id="s0" rend="italic" type="abstract"> <head rend="italic">abstract</head> <p rend="italic"> This template is intended to prove how easy it is to create a TEI XML (Text Encoding Initiative) document and then convert it to the PDF or HTML format, all from within the <oxygen/> XML editor. We can use the TEI Lite DTD, the TEI XSL-FO stylesheets and the Apache's FOP, all of which are integrated into the <oxygen/> installation kit. </p> </div> <div id="s1" type="sect"> <head>title of first section</head> <p>first para</p> 5

<p>second para</p> <p>third para</p> <note> <p>the encoding can be changed at any time by editing the XML prolog, for instance, changing to UTF-16:</p> <p> <?xml version="1.0" encoding="utf-16"?></p> </note> </div> <div id="s2" type="sect"> <head>title of second section</head> <p>first para of second section</p> <p>second para of second section</p> <p id="s3" rend="roman">third para of second section</p> </div> </body> </text> </TEI.2> Transforming to PDF Before proceeding to the FO transformation you need to check the validity of the document. For this, press the Validate Document button from the Validate toolbar, or use the shortcut of the Validate Document action, by default CTRL-SHIFT-V (COMMAND-SHIFT-V on Mac). The validity report will be displayed in the status bar. If there are errors, they will be listed in a special panel at the bottom of the <oxygen/> window. Figure 3. Validation errors Procedure 1. Configuring the XSL-FO transformation 1. Press the Configure Transformation Scenario button from the Transformation toolbar. This will open the Configure Transformation Scenario dialog where you can create a new transformation scenario or edit an existing one. Also you can use one of the predefined scenarios, for example the TEI PDF one which transforms a TEI XML document to PDF. 6

Figure 4. The XSL-FO transformation configuration dialog 2. On the XSLT tab of the Edit scenario dialog in the XSL URL field choose the tei.xsl file. You can find it by browsing to the folder ${frameworks}/tei/xml/teip4/stylesheet/fo/tei.xsl, where ${frameworks} is the frameworks subfolder of the <oxygen/> install folder. An XML FO document is generated when applying this stylesheet. Next, the FO processor can process it in order to generate output in the PDF format. Figure 5. The XSLT configuration tab 3. On the FO Processor tab of the dialog make sure that the Perform FOP checkbox is selected. 7

Figure 6. The FO configuration tab 4. Make sure that the XSLT result as input radio button is selected. 5. Let the FO processor set to Built-in (Apache FOP). 6. Let the method set to pdf. 7. On the Output tab of the dialog choose the output file name and press the OK button. 8

Figure 7. The Output configuration tab Press the Apply Transformation Scenario button from the Transformation toolbar or use CTRL-SHIFT- T (COMMAND-SHIFT-T on Mac) shortcut. This way the XSLT and FO processing is started. In the status bar is presented the current processing state. It will be displayed FO transformation successful when the FO processor ends. You can inspect the generated PDF file using the Acrobat Reader program. Configuring an external FO processor, or other post processor The built-in FO processor is based on the Apache project, and is under development. Problems may occur, depending on the complexity of the intermediate FO file. To avoid this kind of difficulties it is possible to configure one or more external FO processors. (In other situations, you may need to run other post processors, not necessarily FOP.) Go to Options Preferences XML XSLT / FO / XQuery FO Processors to set up a post processor. 9

Figure 8. The external FO configuration dialog By default, the list is empty. By pressing the New button it can be created a new FO entry. The entry consists of: Name - This is the name that must be selected in the Processor combo box of the Edit scenario dialog when this processor is used in a transformation. Description - A text description of the processor displayed in the FO Processors preferences panel. Output encoding - The encoding of the output stream of the processor. Error encoding - The encoding of the error stream of the processor. Working directory - The start directory of the command that runs the FO processor. Command line template - The command line is specifying the name of the FOP executable and the command line parameters. Try not to use environment variables in its expression, since those will not be expanded. Four editor variables can be used: The FO method (the ${method} editor variable) - this being replaced by the editor with pdf, ps or txt; The FO input file (the ${fo} editor variable) - this can be the edited file or the result of an XSLT transformation; The file in which the result is stored (the ${out} editor variable). The directory of the current oxygen project (the ${pd} editor variable). 10

Figure 9. Adding an external FO processor Note Your editor may take as argument just one or two of the possible parameters. It is not required to use all the macros in the command line. 11