SlideShare una empresa de Scribd logo
1 de 26
Overview of Dost.jar and FO.jar Aryeh Sanders, Suite Solutions
Who Are We? Our Mission To increase our customers’ profitability by significantly improving the efficiency of their  information development and delivery processes. Qualitative Advantage Content Lifecycle Implementation (CLI) is Suite Solutions’   comprehensive approach – from concept to publication – to maximizing the value of your information assets. Our professionals are with you at every phase, determining, recommending and implementing the most cost-effective, flexible and long term solution for your business.
Clients and Partners 3 Private and Confidential Suite Solutions©2009
Introduction We will discuss what exactly are dost.jar and fo.jar and the role they play in the DITA-OT Quick answers: dost.jar holds the Java code for the DITA-OT as a whole fo.jar holds the Java code for the FO plugin (otherwise known as PDF output) In both cases, the JAR files are simply a place to store Java code.  As such, they each have a collection of different functions. We will discuss why you usually will NOT want to customize them, and some exceptions
Overview How to Build a New dost.jar Overview of Functions of dost.jar Changing dost.jar to Detect New Image Types Overview of Functions of fo.jar How to Build a New fo.jar
Dost.jar Source Code Not available in the default DITA-OT download Available via CVS (the source control system) from SourceForge Available as a separate download from SourceForge Current stable version available here:http://sourceforge.net/projects/dita-ot/files/DITA-OT%20Stable%20Release/DITA%20Open%20Toolkit%201.5.1/DITA-OT1.5.1_src.zip/download You may have to hunt for it; the name isn’t consistent between versions
Building dost.jar Unzip the source code over an existing copy of the DITA-OT You may prefer to download a clean copy of the DITA-OT for this Not all of the tools needed are included in the source code package, but they are in the full DITA-OT download Some files will overwrite each other, but this will create a copy of the DITA-OT with the source code Run startcmd.bat This sets up various environment variables so that, for instance, you can run Ant Build dost.jar ant -f buildPackage.xml package-java You’ll get some warnings, but if you get a successful build, that’s it
Overview of Functions of dost.jar
Layout of dost.jar Source Code
Layout of dost.jar Source Code Although we can broadly define three different functions in dost.jar, they’re not organized that way in the source code. Instead it’s organized by specific function – the code is invoked through one of the files in the invoker folder; logging is done by code in the log folder, and so on
Dost.jar Functions (1) Java Invoker Implemented in the invoker folder in CommandLineInvoker.java Not related to the other files in that folder (ExtensibleAntInvoker doesn’t seem to be used?) Does rely on other Java code for logging and so on If you use the Java command line, and needed to add a command line parameter to the DITA-OT, then this is where to do it If you wanted to add a new parameter /myparam:value, so you could use it like so:java -jar libost.jar /i:inputfile /transtype:xhtml /myparam:special Just add:paramMap.put("/myparam", “my.ant.parameter");in the section with the rest of the parameters
Downside to Modifying dost.jar dost.jar is not designed to be modified or extended.  You have no easy way to upgrade dost.jar and retain your changes. Unlike most other parts of the toolkit, which support plugins There’s an easier way to achieve the same goal as the previous example: set ANT_OPTS="%ANT_OPTS% -Dmy.ant.parameter=value" This is usually true for most other changes you would want The DITA-OT still has known bugs, so even if you are satisfied with the current functionality, you may want to preserve your ability to upgrade to get bug fixes DITA itself gets updated, and you may want to benefit from new DITA 1.2 or eventually DITA 1.3 features when they come along
Basic Flow of CommandLineInvoker First, validate the parameters Modify certain parameters to have a full path instead of a relative path Write the parameters to a temporary properties file Call integrator Call Ant via the command line, with a custom logger and the properties file as parameters
Dost.jar Functions (2) Integrator Java implementation for supporting plugins Searches demo and plugins subfolders for folders that contain a file called plugin.xml If it has one, then it’s a plugin Each plugin.xml file has a list of plugin points it modifies Example: demoita11lugin.xml:<feature extension="dita.specialization.catalog.relative”value="catalog.xml" type="file"/>This will take the contents of demoita11atalog.xml and put it into the dita.specialization.catalog.relative extension point. Plugin points are defined in many different files, all including _template in their names Example: dita.specialization.catalog.relative is defined in catalog-dita_template.xml Integrator will take catalog-dita_template.xml, and generate catalog-dita.xml, inserting the appropriate data from the dita11 plugin
More About Integrator We’re not going into much more detail now – in short, Integrator reads plugin.xml from each plugin, and rewrites each _template file to create the “real” version of the file. catalog-dita_template.xml -> catalog-dita.xml build_template.xml -> build.xml build_general_template.xml -> build_general.xml build_dita2eclipsehelp_template.xml -> build_dita2eclipsehelp.xml build_preprocess_template.xml -> build_preprocess.xml resource/messages_template.xml -> resource/messages.xml xsl/common/allstrings_template.xml -> xsl/common/allstrings.xml xsl/dita2xhtml_template.xsl -> xsl/dita2xhtml.xsl xsl/dita2rtf_template.xsl -> xsl/dita2rtf.xsl xsl/dita2odt_template.xsl -> xsl/dita2odt.xsl xsl/dita2dynamicdita_template.xsl -> xsl/dita2dynamicdita.xsl xsl/dita2fo-shell_template.xsl -> xsl/dita2fo-shell.xsl xsl/dita2docbook_template.xsl -> xsl/dita2docbook.xsl xsl/preprocess/maplink_template.xsl -> xsl/preprocess/maplink.xsl xsl/preprocess/mapref_template.xsl -> xsl/preprocess/mapref.xsl xsl/preprocess/mappull_template.xsl -> xsl/preprocess/mappull.xsl xsl/map2plugin_template.xsl -> xsl/map2plugin.xsl xsl/preprocess/conref_template.xsl -> xsl/preprocess/conref.xsl xsl/preprocess/topicpull_template.xsl -> xsl/preprocess/topicpull.xsl
More About Integrator We will point out, though, that there are a bunch of different ways that Integrator inserts data into the template: All defined in the platform folder, new ones added from time to time InsertAction.java InsertActionRelative.java InsertAntActionRelative.java InsertCatalogActionRelative.java InsertDependsAction.java … Selected by the _template files themselves: E.g. catalog-dita_template.xml contains:<dita:extensionid="dita.specialization.catalog“	behavior="org.dita.dost.platform.InsertAction“xmlns:dita="http://dita-ot.sourceforge.net" /><dita:extension id="dita.specialization.catalog.relative“	behavior="org.dita.dost.platform.InsertCatalogActionRelative“xmlns:dita="http://dita-ot.sourceforge.net" />
Dost.jar Functions (3) Pipeline Functions You can run the DITA-OT without the other functions.  As long as you have created all those files that integrator will create, and as long as you invoke the toolkit directly via Ant, you can publish your DITA output just fine. And it should be slightly faster! (Maybe a second or two) These are also an assortment of unrelated functions They are tied together by the DITA-OT pipeline – the DITA-OT runs the DITA files through a series of steps.   The steps are coordinated by Ant, but some of the steps are implemented in Java The are called by the <pipeline> task in Ant Example:<pipeline message="Generate list." module="GenMapAndTopicList”basedir="${basedir}" inputmap="${args.input}”tempdir="${dita.temp.dir}“ extparam="ditadir=${dita.dir};validate=${validate};generatecopyouter=${generate.copy.outer};outercontrol=${outer.control};onlytopicinmap=${onlytopic.in.map};outputdir=${output.dir};transtype=${transtype}" />
Pipeline Functions Current modules in use: Chunk Coderef ConrefPush DebugAndFilter EscapeUnicode GenMapAndTopicList IndexTermExtract Keyref MoveLinks MoveMeta TopicMerge ,[object Object]
Most of the names are pretty clear
They are only chained together through Ant, so there’s no direct relationship between them
There’s some infrastructure within the Java code that passes the call from Ant to a specific module
invokerntInvoker calls pipelineipelineFacade which calls modulesoduleFactory which gets the actual module
The actual modules are defined in the modules folder,[object Object]
Adding a New Image Type to the DITA-OT The current implementation of the DITA-OT decides what’s an image based on a hard coded list Which module would have this code? It uses a utility function in utilileUtils.java isSupportedImageFile Supported images also appear in the function isValidTarget Both require a one line modification: || lcasefn.endsWith(Constants.FILE_EXTENSION_GIF) The constants are defined in utilonstants.java: /**.gif extension.*/     public static final String FILE_EXTENSION_GIF = ".gif"; Just add the appropriate lines, and rebuild, and you’ve added support for a new image type
FO.jar Like dost.jar, it’s a catch-all
fo.jar Folder Structure The sourceis in src:

Más contenido relacionado

La actualidad más candente

Dita ot pipeline webinar
Dita ot pipeline webinarDita ot pipeline webinar
Dita ot pipeline webinarSuite Solutions
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Stephan Schmidt
 
Component and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHPComponent and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHPStephan Schmidt
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHPStephan Schmidt
 
XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARStephan Schmidt
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation ExtravaganzaStephan Schmidt
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Stephan Schmidt
 
Standards For Java Coding
Standards For Java CodingStandards For Java Coding
Standards For Java CodingRahul Bhutkar
 
Session Server - Maintaing State between several Servers
Session Server - Maintaing State between several ServersSession Server - Maintaing State between several Servers
Session Server - Maintaing State between several ServersStephan Schmidt
 
Lotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXLLotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXLdominion
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHPDeclarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHPStephan Schmidt
 
Standard java coding convention
Standard java coding conventionStandard java coding convention
Standard java coding conventionTam Thanh
 

La actualidad más candente (17)

Dita ot pipeline webinar
Dita ot pipeline webinarDita ot pipeline webinar
Dita ot pipeline webinar
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
Component and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHPComponent and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHP
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHP
 
XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEAR
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
 
PEAR For The Masses
PEAR For The MassesPEAR For The Masses
PEAR For The Masses
 
Standards For Java Coding
Standards For Java CodingStandards For Java Coding
Standards For Java Coding
 
Coding standards
Coding standardsCoding standards
Coding standards
 
Java 8-revealed
Java 8-revealedJava 8-revealed
Java 8-revealed
 
Session Server - Maintaing State between several Servers
Session Server - Maintaing State between several ServersSession Server - Maintaing State between several Servers
Session Server - Maintaing State between several Servers
 
Lotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXLLotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXL
 
Declarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHPDeclarative Development Using Annotations In PHP
Declarative Development Using Annotations In PHP
 
XML and PHP 5
XML and PHP 5XML and PHP 5
XML and PHP 5
 
Html5 - Tutorial
Html5 - TutorialHtml5 - Tutorial
Html5 - Tutorial
 
Standard java coding convention
Standard java coding conventionStandard java coding convention
Standard java coding convention
 

Destacado

Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...Suite Solutions
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open ToolkitSuite Solutions
 
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...Suite Solutions
 
StrategiesForUsingMetadata
StrategiesForUsingMetadataStrategiesForUsingMetadata
StrategiesForUsingMetadataSuite Solutions
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsSuite Solutions
 
Down the Rabbit Hole: Getting Started with the DITA Open Toolkit
Down the Rabbit Hole: Getting Started with the DITA Open Toolkit Down the Rabbit Hole: Getting Started with the DITA Open Toolkit
Down the Rabbit Hole: Getting Started with the DITA Open Toolkit Scriptorium Publishing
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOSuite Solutions
 

Destacado (8)

Svg and graphics
Svg and graphicsSvg and graphics
Svg and graphics
 
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open Toolkit
 
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
 
StrategiesForUsingMetadata
StrategiesForUsingMetadataStrategiesForUsingMetadata
StrategiesForUsingMetadata
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
 
Down the Rabbit Hole: Getting Started with the DITA Open Toolkit
Down the Rabbit Hole: Getting Started with the DITA Open Toolkit Down the Rabbit Hole: Getting Started with the DITA Open Toolkit
Down the Rabbit Hole: Getting Started with the DITA Open Toolkit
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FO
 

Similar a Dost.jar and fo.jar

C# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityC# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityShreesha Rao
 
香港六合彩
香港六合彩香港六合彩
香港六合彩iewsxc
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
Developing Drizzle Replication Plugins
Developing Drizzle Replication PluginsDeveloping Drizzle Replication Plugins
Developing Drizzle Replication PluginsPadraig O'Sullivan
 
Django tutorial
Django tutorialDjango tutorial
Django tutorialKsd Che
 
Introduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationIntroduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationKelwin Yang
 
Question IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxQuestion IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxaudeleypearl
 
Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Alessandro Molina
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorializdihara
 
Instructions for using the phase wrapping and unwrapping code
Instructions for using the phase wrapping and unwrapping codeInstructions for using the phase wrapping and unwrapping code
Instructions for using the phase wrapping and unwrapping codeImperial College, London
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docxfantabulous2024
 

Similar a Dost.jar and fo.jar (20)

11i Logs
11i Logs11i Logs
11i Logs
 
Ibm
IbmIbm
Ibm
 
Readme
ReadmeReadme
Readme
 
C# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityC# and Borland StarTeam Connectivity
C# and Borland StarTeam Connectivity
 
Proguard android
Proguard androidProguard android
Proguard android
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
Developing Drizzle Replication Plugins
Developing Drizzle Replication PluginsDeveloping Drizzle Replication Plugins
Developing Drizzle Replication Plugins
 
Spring boot
Spring bootSpring boot
Spring boot
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
Django by rj
Django by rjDjango by rj
Django by rj
 
Introduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationIntroduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android Application
 
Question IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docxQuestion IYou are going to use the semaphores for process sy.docx
Question IYou are going to use the semaphores for process sy.docx
 
Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2
 
Oracle applications 11i dba faq
Oracle applications 11i dba faqOracle applications 11i dba faq
Oracle applications 11i dba faq
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
Instructions for using the phase wrapping and unwrapping code
Instructions for using the phase wrapping and unwrapping codeInstructions for using the phase wrapping and unwrapping code
Instructions for using the phase wrapping and unwrapping code
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 

Más de Suite Solutions

SuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise WebhelpSuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise WebhelpSuite Solutions
 
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...Suite Solutions
 
Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)Suite Solutions
 
SuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest FeaturesSuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest FeaturesSuite Solutions
 
Using Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic PublishingUsing Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic PublishingSuite Solutions
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsSuite Solutions
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanSuite Solutions
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanSuite Solutions
 
DITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA ToolsetDITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA ToolsetSuite Solutions
 
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitDITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitSuite Solutions
 
DITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureDITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureSuite Solutions
 
DITA Quick Start for Authors Part II
DITA Quick Start for Authors Part IIDITA Quick Start for Authors Part II
DITA Quick Start for Authors Part IISuite Solutions
 
DITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part IDITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part ISuite Solutions
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Solutions
 
Overview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITAOverview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITASuite Solutions
 

Más de Suite Solutions (16)

SuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise WebhelpSuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise Webhelp
 
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
 
Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)
 
SuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest FeaturesSuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest Features
 
Using Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic PublishingUsing Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic Publishing
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project Plan
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project Plan
 
DITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA ToolsetDITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA Toolset
 
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitDITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
 
DITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureDITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information Architecture
 
Introduction to S1000D
Introduction to S1000DIntroduction to S1000D
Introduction to S1000D
 
DITA Quick Start for Authors Part II
DITA Quick Start for Authors Part IIDITA Quick Start for Authors Part II
DITA Quick Start for Authors Part II
 
DITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part IDITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part I
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp Output
 
Overview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITAOverview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITA
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Dost.jar and fo.jar

  • 1. Overview of Dost.jar and FO.jar Aryeh Sanders, Suite Solutions
  • 2. Who Are We? Our Mission To increase our customers’ profitability by significantly improving the efficiency of their information development and delivery processes. Qualitative Advantage Content Lifecycle Implementation (CLI) is Suite Solutions’ comprehensive approach – from concept to publication – to maximizing the value of your information assets. Our professionals are with you at every phase, determining, recommending and implementing the most cost-effective, flexible and long term solution for your business.
  • 3. Clients and Partners 3 Private and Confidential Suite Solutions©2009
  • 4. Introduction We will discuss what exactly are dost.jar and fo.jar and the role they play in the DITA-OT Quick answers: dost.jar holds the Java code for the DITA-OT as a whole fo.jar holds the Java code for the FO plugin (otherwise known as PDF output) In both cases, the JAR files are simply a place to store Java code. As such, they each have a collection of different functions. We will discuss why you usually will NOT want to customize them, and some exceptions
  • 5. Overview How to Build a New dost.jar Overview of Functions of dost.jar Changing dost.jar to Detect New Image Types Overview of Functions of fo.jar How to Build a New fo.jar
  • 6. Dost.jar Source Code Not available in the default DITA-OT download Available via CVS (the source control system) from SourceForge Available as a separate download from SourceForge Current stable version available here:http://sourceforge.net/projects/dita-ot/files/DITA-OT%20Stable%20Release/DITA%20Open%20Toolkit%201.5.1/DITA-OT1.5.1_src.zip/download You may have to hunt for it; the name isn’t consistent between versions
  • 7. Building dost.jar Unzip the source code over an existing copy of the DITA-OT You may prefer to download a clean copy of the DITA-OT for this Not all of the tools needed are included in the source code package, but they are in the full DITA-OT download Some files will overwrite each other, but this will create a copy of the DITA-OT with the source code Run startcmd.bat This sets up various environment variables so that, for instance, you can run Ant Build dost.jar ant -f buildPackage.xml package-java You’ll get some warnings, but if you get a successful build, that’s it
  • 8. Overview of Functions of dost.jar
  • 9. Layout of dost.jar Source Code
  • 10. Layout of dost.jar Source Code Although we can broadly define three different functions in dost.jar, they’re not organized that way in the source code. Instead it’s organized by specific function – the code is invoked through one of the files in the invoker folder; logging is done by code in the log folder, and so on
  • 11. Dost.jar Functions (1) Java Invoker Implemented in the invoker folder in CommandLineInvoker.java Not related to the other files in that folder (ExtensibleAntInvoker doesn’t seem to be used?) Does rely on other Java code for logging and so on If you use the Java command line, and needed to add a command line parameter to the DITA-OT, then this is where to do it If you wanted to add a new parameter /myparam:value, so you could use it like so:java -jar libost.jar /i:inputfile /transtype:xhtml /myparam:special Just add:paramMap.put("/myparam", “my.ant.parameter");in the section with the rest of the parameters
  • 12. Downside to Modifying dost.jar dost.jar is not designed to be modified or extended. You have no easy way to upgrade dost.jar and retain your changes. Unlike most other parts of the toolkit, which support plugins There’s an easier way to achieve the same goal as the previous example: set ANT_OPTS="%ANT_OPTS% -Dmy.ant.parameter=value" This is usually true for most other changes you would want The DITA-OT still has known bugs, so even if you are satisfied with the current functionality, you may want to preserve your ability to upgrade to get bug fixes DITA itself gets updated, and you may want to benefit from new DITA 1.2 or eventually DITA 1.3 features when they come along
  • 13. Basic Flow of CommandLineInvoker First, validate the parameters Modify certain parameters to have a full path instead of a relative path Write the parameters to a temporary properties file Call integrator Call Ant via the command line, with a custom logger and the properties file as parameters
  • 14. Dost.jar Functions (2) Integrator Java implementation for supporting plugins Searches demo and plugins subfolders for folders that contain a file called plugin.xml If it has one, then it’s a plugin Each plugin.xml file has a list of plugin points it modifies Example: demoita11lugin.xml:<feature extension="dita.specialization.catalog.relative”value="catalog.xml" type="file"/>This will take the contents of demoita11atalog.xml and put it into the dita.specialization.catalog.relative extension point. Plugin points are defined in many different files, all including _template in their names Example: dita.specialization.catalog.relative is defined in catalog-dita_template.xml Integrator will take catalog-dita_template.xml, and generate catalog-dita.xml, inserting the appropriate data from the dita11 plugin
  • 15. More About Integrator We’re not going into much more detail now – in short, Integrator reads plugin.xml from each plugin, and rewrites each _template file to create the “real” version of the file. catalog-dita_template.xml -> catalog-dita.xml build_template.xml -> build.xml build_general_template.xml -> build_general.xml build_dita2eclipsehelp_template.xml -> build_dita2eclipsehelp.xml build_preprocess_template.xml -> build_preprocess.xml resource/messages_template.xml -> resource/messages.xml xsl/common/allstrings_template.xml -> xsl/common/allstrings.xml xsl/dita2xhtml_template.xsl -> xsl/dita2xhtml.xsl xsl/dita2rtf_template.xsl -> xsl/dita2rtf.xsl xsl/dita2odt_template.xsl -> xsl/dita2odt.xsl xsl/dita2dynamicdita_template.xsl -> xsl/dita2dynamicdita.xsl xsl/dita2fo-shell_template.xsl -> xsl/dita2fo-shell.xsl xsl/dita2docbook_template.xsl -> xsl/dita2docbook.xsl xsl/preprocess/maplink_template.xsl -> xsl/preprocess/maplink.xsl xsl/preprocess/mapref_template.xsl -> xsl/preprocess/mapref.xsl xsl/preprocess/mappull_template.xsl -> xsl/preprocess/mappull.xsl xsl/map2plugin_template.xsl -> xsl/map2plugin.xsl xsl/preprocess/conref_template.xsl -> xsl/preprocess/conref.xsl xsl/preprocess/topicpull_template.xsl -> xsl/preprocess/topicpull.xsl
  • 16. More About Integrator We will point out, though, that there are a bunch of different ways that Integrator inserts data into the template: All defined in the platform folder, new ones added from time to time InsertAction.java InsertActionRelative.java InsertAntActionRelative.java InsertCatalogActionRelative.java InsertDependsAction.java … Selected by the _template files themselves: E.g. catalog-dita_template.xml contains:<dita:extensionid="dita.specialization.catalog“ behavior="org.dita.dost.platform.InsertAction“xmlns:dita="http://dita-ot.sourceforge.net" /><dita:extension id="dita.specialization.catalog.relative“ behavior="org.dita.dost.platform.InsertCatalogActionRelative“xmlns:dita="http://dita-ot.sourceforge.net" />
  • 17. Dost.jar Functions (3) Pipeline Functions You can run the DITA-OT without the other functions. As long as you have created all those files that integrator will create, and as long as you invoke the toolkit directly via Ant, you can publish your DITA output just fine. And it should be slightly faster! (Maybe a second or two) These are also an assortment of unrelated functions They are tied together by the DITA-OT pipeline – the DITA-OT runs the DITA files through a series of steps. The steps are coordinated by Ant, but some of the steps are implemented in Java The are called by the <pipeline> task in Ant Example:<pipeline message="Generate list." module="GenMapAndTopicList”basedir="${basedir}" inputmap="${args.input}”tempdir="${dita.temp.dir}“ extparam="ditadir=${dita.dir};validate=${validate};generatecopyouter=${generate.copy.outer};outercontrol=${outer.control};onlytopicinmap=${onlytopic.in.map};outputdir=${output.dir};transtype=${transtype}" />
  • 18.
  • 19. Most of the names are pretty clear
  • 20. They are only chained together through Ant, so there’s no direct relationship between them
  • 21. There’s some infrastructure within the Java code that passes the call from Ant to a specific module
  • 22. invokerntInvoker calls pipelineipelineFacade which calls modulesoduleFactory which gets the actual module
  • 23.
  • 24. Adding a New Image Type to the DITA-OT The current implementation of the DITA-OT decides what’s an image based on a hard coded list Which module would have this code? It uses a utility function in utilileUtils.java isSupportedImageFile Supported images also appear in the function isValidTarget Both require a one line modification: || lcasefn.endsWith(Constants.FILE_EXTENSION_GIF) The constants are defined in utilonstants.java: /**.gif extension.*/ public static final String FILE_EXTENSION_GIF = ".gif"; Just add the appropriate lines, and rebuild, and you’ve added support for a new image type
  • 25. FO.jar Like dost.jar, it’s a catch-all
  • 26. fo.jar Folder Structure The sourceis in src:
  • 27. fo.jar Components (1) In comdiomincspentopicslxtension: DitaVersion.java reports back to Ant what version of DITA is being processed Ant uses it to decide which version of the stylesheets to use; the regular version for older versions of DITA, and the versions with _1.0 in the name for newer versions In comuiteolitaot DetectLang.javareports the first xml:lang attribute in your files, which is used if you didn’t set the document.locale parameter to let the system know what language settings to use
  • 28. fo.jar Components (2) In comdiomincspentopico: In xep: there are Java classes that call RenderX XEP. This is used if you use XEP for your FO processor. In i18n: there is code that is used together with your i18n configuration file and your font-mappings file to set fonts on a character-by-character basis. The Java code simply searches for each character listed in the i18n configuration files and marks it. The actual font is selected with the i18n-postprocess.xsl stylesheet. In index2: this code is the code that constructs the index. The actual display is left to the stylesheets, but it searches for all the indexterms, constructs, groups, and sorts the list, and inserts it into one of the intermediate files, namely stage1.xml. That file is the input to the main stylesheets.
  • 29. More About fo.jar Index Sorting Several known bugs We’re working on them – if you have new ones, please report them on SourceForge fo.jar does grouping and sorting Grouping is deciding which words go in the “A” section, which in the “B” section, which in the “Special Characters” section, and so on Sorting is putting them in the right order within that section The index configuration files are used for grouping, not sorting Sorting is handed off to the icu4j.jar library when it’s present. Otherwise, it uses built-in Java sorting, which is fine for English, but not for many languages
  • 30. Questions? Any questions? Be in touch!Aryeh Sandersaryehs@suite-sol.com