SlideShare a Scribd company logo
Methods of Debugging and Error Handling in the DITA Open Toolkit Processing  Leora Betesh, Suite Solutions
Who am I? Bachelor’s in Computer Science 5+ years at UBS as computer programmer Early member of the Suite Solutions team PDF style sheet projects HTML style sheet projects CMS integration WebWorks xsl customization Dita -> MS Word transforms Intro to DITA-OT training seminar Belgium 2009
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 Private and Confidential Suite Solutions©2009
Main Topics Debugging  Tips Redirect Output Mapping from code to output What is the value that has been assigned to my variable? Speed up debugging time Using the merged xml file  Error Handling Error handling vs. debugging Why error handling? Methods of error handling
Debugging Topics
Sample error The dita-ot build fail.  There error looks like it has something to do with my content.  How do I find the source of the error?  What now? BUILD FAILED C:\DITA-OT1.5-webinar\samples\build_webinar.xml:31: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\build.xml:30: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\demo\fo\build.xml:174: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\demo\fo\build.xml:297: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\demo\fo\build.xml:234: java.io.FileNotFoundException: C:\D ITA-OT1.5-webinar\temp\sequence_MERGED.xml (The system cannot find the file spec ified)
Redirect output Redirect output to log file, find error at beginning of log Syntax C:\DITA-OT\samples>ant -f build_webinar.xml  > log.txt Get log from CMS – all the DITA-OT messages will be included. To find an error in the log, look for the first error.  Subsequent errors may result from the original error, so start at the beginning of the file looking for the first error.
Mapping from code to output Where am I in the code? Which template am I in?  Which xsl:when am I in? Which attribute set am I in?  Which file am I in? XMetaL element id XMetaL creates ids with the element name as part of the id – to easily recognize which element I am in. < fo:block   id =&quot;unique_26_Connect_42_ section _919F9F2C66A84E128C91C10F7D5A76A9&quot;> < fo:block   id =&quot;unique_26_Connect_42_ p _827EF4C92D284C769404BD4991CCD45D&quot;> Create a dummy label in the attribute sets < xsl:attribute-set   name =&quot;ul.li__label&quot;> <!-- added dummy attribute to find attribute-set in output  --> < xsl:attribute   name =&quot;test&quot;>ul.li__label</ xsl:attribute > </ xsl:attribute-set >
Mapping from code to output Create a comment inside template: < xsl:template   name =&quot;createFrontMatter&quot;> < xsl:comment >entered template createFrontMatter</ xsl:comment > Output: <!--entered template createFrontMatter--> Not only can I find where I am in the code, but also check values of variables and nodes. How can I output the value of a variable? Xsl:message – faster to find message Xsl:comment – more precise location in output
Mapping from code to output Example: What is the value that has been assigned to my variable? Problem: getTrisoft map GUID, need to parse a few files.  My output is not getting the correct value, but I don’t know at which part my code is failing. In addition, I am working on the CMS so I need to get back information in log file to troubleshoot the problem. < xsl:comment > ############################################### inputfolder=< xsl:value-of   select =&quot;$inputfolder&quot;/> parentfolder=< xsl:value-of   select =&quot;$parentfolder&quot;/> eventdatapath=< xsl:value-of   select =&quot;$eventdatapath&quot;/> exportPath=< xsl:value-of   select =&quot;$exportPath&quot;/> mapNamePath=< xsl:value-of   select =&quot;$mapNamePath&quot;/> ############################################### </ xsl:comment >
Speed up debugging time Comment out parts of root template Example:  I have a problem with the TOC.  I will comment out everything but TOC. Note: Do not comment out  createLayoutMasters  – this is needed in any output. < xsl:template   name =&quot;rootTemplate&quot;> < xsl:call-template   name =&quot;validateTopicRefs&quot;/> < fo:root   xsl:use-attribute-sets =&quot;__fo__root&quot;> < xsl:call-template   name =&quot;createLayoutMasters&quot;/> < xsl:call-template   name =&quot;createBookmarks&quot;/> < xsl:call-template   name =&quot;createFrontMatter&quot;/> < xsl:call-template   name =&quot;createToc&quot;/> <!--   <xsl:call-template name=&quot;createPreface&quot;/> --> < xsl:apply-templates /> < xsl:call-template   name =&quot;createIndex&quot;/> </ fo:root > </ xsl:template >
Speed up debugging time Debugging  Target Aryeh Sanders at Suite Solutions wrote an ant target to speed output generation while troubleshooting. Reduces output time by more than 50% Bypasses steps of clearing the temp directory and copying files to the temp directory.  Assuming that your content hasn’t changed – only the xsl. Add the target to the top-level build.xml file and invoke the target from your project build file. Code is on the following two pages. Prerequisite for DITA-OT 1.5 If you are using DITA-OT 1.5 go open the file build-init.xml  and edit line 83 – change the temp folder name to just temp: < property   name =&quot;dita.temp.dir&quot;  value =&quot;temp&quot;/>
Speed up debugging time Place this target into the top-level dita-ot build.xml: < target   name =&quot;devel-pdf2&quot;  depends =&quot;start-process, init-logger, check-arg, output-deprecated-msg, output-css-warn-message&quot;> < xmlpropertyreader   file =&quot;${dita.temp.dir}${file.separator}dita.xml.properties&quot;/> < dirname   property =&quot;dita.map.output.dir&quot; file =&quot;${output.dir}${file.separator}${user.input.file}&quot; /> < condition   property =&quot;noConref&quot;>< equals   arg1 =&quot;${conreflist}&quot;  arg2 =&quot;&quot; /></ condition > < condition   property =&quot;noMap&quot;>< equals   arg1 =&quot;${fullditamaplist}&quot;  arg2 =&quot;&quot; /></ condition > < condition   property =&quot;noTopic&quot;>< equals   arg1 =&quot;${fullditatopiclist}&quot;  arg2 =&quot;&quot; /></ condition > < condition   property =&quot;noImagelist&quot;>< equals   arg1 =&quot;${imagelist}&quot;  arg2 =&quot;&quot; /></ condition > < condition   property =&quot;noHtmllist&quot;>< equals   arg1 =&quot;${htmllist}&quot;  arg2 =&quot;&quot; /></ condition > < condition   property =&quot;noSubList&quot;>< equals   arg1 =&quot;${subtargetslist}&quot;  arg2 =&quot;&quot; /></ condition > < ant   dir =&quot;${dita.dir}/demo/fo&quot;  target =&quot;publish.map.pdf&quot;> < property   name =&quot;caller.dir&quot;  value =&quot;${basedir}&quot;/> </ ant > </ target >
Speed up debugging time Use this target in your project build file to invoke the development target. < target   name =&quot;devel&quot;> < antcall   target =&quot;devel-pdf2&quot;> < param   name =&quot;transtype&quot;  value =&quot;pdf&quot; /> < param   name =&quot;args.input&quot;  value =&quot;C:\DITA-OT\samples\hierarchy.ditamap&quot; /> </ antcall > </ target > Generate output the way your normally do.
Debugging use merged xml file If you are using the pdf transform, all the topics will be merged into one xml file.  Go to the temp directory and find the file  MyMapName_merged.xml. Determine element hierarchy and class names Example: I am setting up an xpath statement and want to find all the preceding siblings of an element – check merged file to see which nodes will be included in this xpath selection. See what has made it into topicmerge Example: I set an outputclass on a topic and I want to see which node exactly got that outputclass attribute. Especially useful when setting up specializations The dita-ot adds the full class name to each element in the merged file.  I can easily grab the class name I need to reference and see inheritance. < learningAssessmentbody   class =&quot;- topic/body  learningBase/learningBasebody learningAssessment/learningAssessmentbody “ … > (from learning specialization)
Debug using topic.fo Try to fix the problem in topic.fo Example: problem with page masters.  First header never appears.  Look into the  page-sequence-master <fo:page-sequence-master master-name=&quot;body-sequence&quot;> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference  master-reference=&quot;body-first&quot; odd-or-even=&quot;odd&quot;  page-position=&quot;first&quot;/> Correct problem in topic.fo and then will know where in the xsl to fix.
Error Handling
Error Handling Error handling vs. debugging.  Debugging is for the developer to find the error in the program.  Error handling is communicating to the user an error that was found in the input to the program.
Default error handling For example, the dita-ot relies on dtds that specify rules that the dita must conform with. Each element has a list of required and optional elements that it can contain.  Order is significant. An error message will be generated by the toolkit if the DTD is not followed This is an example of error handling that is already built in to the toolkit.
Errors? So what other type of errors might we need to handle? Example: I have a rule that the same topic cannot be inserted twice into the ditamap. Example: I have a rule that two topics may not have the same navtitle.
Error Handling Options Error types: send a warning message that in a particular file there is an error force the build to fail for a more serious error. Draft vs. real mode. Draft – display file name in red with error element Non draft – fail build
Error Handling Tips Create messages in an xml file. < messages > < message   id =&quot;DOTAWEBINAR001F&quot;  type =&quot;FATAL&quot;> < reason >A topic is referenced twice in the same ditamap.</ reason > < response >Please correct your ditamap or bookmap file.</ response > </ message > < message   id =&quot;DOTAWEBINAR002W&quot;  type =“WARN&quot;> < reason >Two topics have the same navtitle.</ reason > < response >Please correct your ditamap or bookmap file.</ response > </ message > </ messages > Plugin the xml file to the main dita-ot messages file: < feature   extension =&quot;dita.xsl.messages&quot;  value =&quot;messages.xml&quot;  type =&quot;file&quot;/>
 
End of Methods of Error Handling and Debugging DITA Open Toolkit Processing  Be in touch! [email_address]   leora.betesh  Let us know how we can help you…
Ad

More Related Content

What's hot (20)

Object Oriented Design Patterns for PHP
Object Oriented Design Patterns for PHPObject Oriented Design Patterns for PHP
Object Oriented Design Patterns for PHP
RobertGonzalez
 
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
Stephan 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 PHP
Stephan Schmidt
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHP
Stephan Schmidt
 
Design attern in php
Design attern in phpDesign attern in php
Design attern in php
Filippo De Santis
 
XML and PHP 5
XML and PHP 5XML and PHP 5
XML and PHP 5
Adam Trachtenberg
 
Open Power Template 2 presentation
Open Power Template 2 presentationOpen Power Template 2 presentation
Open Power Template 2 presentation
Tomasz Jędrzejewski
 
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
Stephan Schmidt
 
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
Stephan Schmidt
 
PEAR For The Masses
PEAR For The MassesPEAR For The Masses
PEAR For The Masses
Stephan Schmidt
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
BG Java EE Course
 
PHP MySQL
PHP MySQLPHP MySQL
PHP MySQL
Md. Sirajus Salayhin
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9
isadorta
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
Palitha Baddegama
 
Developing Plugins
Developing PluginsDeveloping Plugins
Developing Plugins
Suite Solutions
 
The Django Book chapter 4 templates (supplement)
The Django Book chapter 4 templates (supplement)The Django Book chapter 4 templates (supplement)
The Django Book chapter 4 templates (supplement)
Vincent Chien
 
Project Automation
Project AutomationProject Automation
Project Automation
elliando dias
 
Lotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXLLotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXL
dominion
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
dpc
 
Object Oriented Design Patterns for PHP
Object Oriented Design Patterns for PHPObject Oriented Design Patterns for PHP
Object Oriented Design Patterns for PHP
RobertGonzalez
 
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
Stephan 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 PHP
Stephan Schmidt
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
Stephan Schmidt
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHP
Stephan Schmidt
 
Open Power Template 2 presentation
Open Power Template 2 presentationOpen Power Template 2 presentation
Open Power Template 2 presentation
Tomasz Jędrzejewski
 
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
Stephan Schmidt
 
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
Stephan Schmidt
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
BG Java EE Course
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9
isadorta
 
The Django Book chapter 4 templates (supplement)
The Django Book chapter 4 templates (supplement)The Django Book chapter 4 templates (supplement)
The Django Book chapter 4 templates (supplement)
Vincent Chien
 
Lotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXLLotusphere 2006 AD212 Introduction to DXL
Lotusphere 2006 AD212 Introduction to DXL
dominion
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
dpc
 

Viewers also liked (9)

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
 
Dita ot pipeline webinar
Dita ot pipeline webinarDita ot pipeline webinar
Dita ot pipeline webinar
Suite Solutions
 
StrategiesForUsingMetadata
StrategiesForUsingMetadataStrategiesForUsingMetadata
StrategiesForUsingMetadata
Suite Solutions
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
Suite 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
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open Toolkit
Suite 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-FO
Suite 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
 
Dita ot pipeline webinar
Dita ot pipeline webinarDita ot pipeline webinar
Dita ot pipeline webinar
Suite Solutions
 
StrategiesForUsingMetadata
StrategiesForUsingMetadataStrategiesForUsingMetadata
StrategiesForUsingMetadata
Suite Solutions
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
Suite 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
 
Overview of the DITA Open Toolkit
Overview of the DITA Open ToolkitOverview of the DITA Open Toolkit
Overview of the DITA Open Toolkit
Suite 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-FO
Suite Solutions
 
Ad

Similar to Debugging and Error handling (20)

Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
 
AD215 - Practical Magic with DXL
AD215 - Practical Magic with DXLAD215 - Practical Magic with DXL
AD215 - Practical Magic with DXL
Stephan H. Wissel
 
Expanding a tree node
Expanding a tree nodeExpanding a tree node
Expanding a tree node
Hemakumar.S
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
Chris Jean
 
Drupal 7 Theming - what's new
Drupal 7 Theming - what's newDrupal 7 Theming - what's new
Drupal 7 Theming - what's new
Marek Sotak
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Struts2
Struts2Struts2
Struts2
Scott Stanlick
 
Csphtp1 18
Csphtp1 18Csphtp1 18
Csphtp1 18
HUST
 
Presentation log4 j
Presentation log4 jPresentation log4 j
Presentation log4 j
Sylvain Bouchard
 
Presentation log4 j
Presentation log4 jPresentation log4 j
Presentation log4 j
Sylvain Bouchard
 
Struts2
Struts2Struts2
Struts2
yuvalb
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
brynary
 
Joomla Day UK 2009 Template Design Presentation
Joomla Day UK 2009 Template Design PresentationJoomla Day UK 2009 Template Design Presentation
Joomla Day UK 2009 Template Design Presentation
Chris Davenport
 
Joomla! Day UK 2009 Template Design
Joomla! Day UK 2009 Template DesignJoomla! Day UK 2009 Template Design
Joomla! Day UK 2009 Template Design
Andy Wallace
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
Mike Desjardins
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
webhostingguy
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento Code
Ben Marks
 
Extending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorExtending MySQL Enterprise Monitor
Extending MySQL Enterprise Monitor
Mark Leith
 
Metaprogramming
MetaprogrammingMetaprogramming
Metaprogramming
Ganesh Samarthyam
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
Michiel Rook
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
 
AD215 - Practical Magic with DXL
AD215 - Practical Magic with DXLAD215 - Practical Magic with DXL
AD215 - Practical Magic with DXL
Stephan H. Wissel
 
Expanding a tree node
Expanding a tree nodeExpanding a tree node
Expanding a tree node
Hemakumar.S
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
Chris Jean
 
Drupal 7 Theming - what's new
Drupal 7 Theming - what's newDrupal 7 Theming - what's new
Drupal 7 Theming - what's new
Marek Sotak
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Csphtp1 18
Csphtp1 18Csphtp1 18
Csphtp1 18
HUST
 
Struts2
Struts2Struts2
Struts2
yuvalb
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
brynary
 
Joomla Day UK 2009 Template Design Presentation
Joomla Day UK 2009 Template Design PresentationJoomla Day UK 2009 Template Design Presentation
Joomla Day UK 2009 Template Design Presentation
Chris Davenport
 
Joomla! Day UK 2009 Template Design
Joomla! Day UK 2009 Template DesignJoomla! Day UK 2009 Template Design
Joomla! Day UK 2009 Template Design
Andy Wallace
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
webhostingguy
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento Code
Ben Marks
 
Extending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorExtending MySQL Enterprise Monitor
Extending MySQL Enterprise Monitor
Mark Leith
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
Michiel Rook
 
Ad

More from 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
Suite 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 Features
Suite 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 Publishing
Suite 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 Requirements
Suite 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 Plan
Suite 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 Plan
Suite 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 Toolset
Suite 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 Toolkit
Suite 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 Architecture
Suite Solutions
 
Introduction to S1000D
Introduction to S1000DIntroduction to S1000D
Introduction to S1000D
Suite 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 II
Suite 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 I
Suite Solutions
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp Output
Suite 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 DITA
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 Webhelp
Suite 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 Features
Suite 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 Publishing
Suite 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 Requirements
Suite 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 Plan
Suite 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 Plan
Suite 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 Toolset
Suite 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 Toolkit
Suite 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 Architecture
Suite 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 II
Suite 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 I
Suite Solutions
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp Output
Suite 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 DITA
Suite Solutions
 

Recently uploaded (20)

Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 

Debugging and Error handling

  • 1. Methods of Debugging and Error Handling in the DITA Open Toolkit Processing Leora Betesh, Suite Solutions
  • 2. Who am I? Bachelor’s in Computer Science 5+ years at UBS as computer programmer Early member of the Suite Solutions team PDF style sheet projects HTML style sheet projects CMS integration WebWorks xsl customization Dita -> MS Word transforms Intro to DITA-OT training seminar Belgium 2009
  • 3. 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.
  • 4. Clients and Partners Private and Confidential Suite Solutions©2009
  • 5. Main Topics Debugging Tips Redirect Output Mapping from code to output What is the value that has been assigned to my variable? Speed up debugging time Using the merged xml file Error Handling Error handling vs. debugging Why error handling? Methods of error handling
  • 7. Sample error The dita-ot build fail. There error looks like it has something to do with my content. How do I find the source of the error? What now? BUILD FAILED C:\DITA-OT1.5-webinar\samples\build_webinar.xml:31: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\build.xml:30: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\demo\fo\build.xml:174: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\demo\fo\build.xml:297: The following error occurred while executing this line: C:\DITA-OT1.5-webinar\demo\fo\build.xml:234: java.io.FileNotFoundException: C:\D ITA-OT1.5-webinar\temp\sequence_MERGED.xml (The system cannot find the file spec ified)
  • 8. Redirect output Redirect output to log file, find error at beginning of log Syntax C:\DITA-OT\samples>ant -f build_webinar.xml > log.txt Get log from CMS – all the DITA-OT messages will be included. To find an error in the log, look for the first error. Subsequent errors may result from the original error, so start at the beginning of the file looking for the first error.
  • 9. Mapping from code to output Where am I in the code? Which template am I in? Which xsl:when am I in? Which attribute set am I in? Which file am I in? XMetaL element id XMetaL creates ids with the element name as part of the id – to easily recognize which element I am in. < fo:block id =&quot;unique_26_Connect_42_ section _919F9F2C66A84E128C91C10F7D5A76A9&quot;> < fo:block id =&quot;unique_26_Connect_42_ p _827EF4C92D284C769404BD4991CCD45D&quot;> Create a dummy label in the attribute sets < xsl:attribute-set name =&quot;ul.li__label&quot;> <!-- added dummy attribute to find attribute-set in output --> < xsl:attribute name =&quot;test&quot;>ul.li__label</ xsl:attribute > </ xsl:attribute-set >
  • 10. Mapping from code to output Create a comment inside template: < xsl:template name =&quot;createFrontMatter&quot;> < xsl:comment >entered template createFrontMatter</ xsl:comment > Output: <!--entered template createFrontMatter--> Not only can I find where I am in the code, but also check values of variables and nodes. How can I output the value of a variable? Xsl:message – faster to find message Xsl:comment – more precise location in output
  • 11. Mapping from code to output Example: What is the value that has been assigned to my variable? Problem: getTrisoft map GUID, need to parse a few files. My output is not getting the correct value, but I don’t know at which part my code is failing. In addition, I am working on the CMS so I need to get back information in log file to troubleshoot the problem. < xsl:comment > ############################################### inputfolder=< xsl:value-of select =&quot;$inputfolder&quot;/> parentfolder=< xsl:value-of select =&quot;$parentfolder&quot;/> eventdatapath=< xsl:value-of select =&quot;$eventdatapath&quot;/> exportPath=< xsl:value-of select =&quot;$exportPath&quot;/> mapNamePath=< xsl:value-of select =&quot;$mapNamePath&quot;/> ############################################### </ xsl:comment >
  • 12. Speed up debugging time Comment out parts of root template Example: I have a problem with the TOC. I will comment out everything but TOC. Note: Do not comment out createLayoutMasters – this is needed in any output. < xsl:template name =&quot;rootTemplate&quot;> < xsl:call-template name =&quot;validateTopicRefs&quot;/> < fo:root xsl:use-attribute-sets =&quot;__fo__root&quot;> < xsl:call-template name =&quot;createLayoutMasters&quot;/> < xsl:call-template name =&quot;createBookmarks&quot;/> < xsl:call-template name =&quot;createFrontMatter&quot;/> < xsl:call-template name =&quot;createToc&quot;/> <!-- <xsl:call-template name=&quot;createPreface&quot;/> --> < xsl:apply-templates /> < xsl:call-template name =&quot;createIndex&quot;/> </ fo:root > </ xsl:template >
  • 13. Speed up debugging time Debugging Target Aryeh Sanders at Suite Solutions wrote an ant target to speed output generation while troubleshooting. Reduces output time by more than 50% Bypasses steps of clearing the temp directory and copying files to the temp directory. Assuming that your content hasn’t changed – only the xsl. Add the target to the top-level build.xml file and invoke the target from your project build file. Code is on the following two pages. Prerequisite for DITA-OT 1.5 If you are using DITA-OT 1.5 go open the file build-init.xml and edit line 83 – change the temp folder name to just temp: < property name =&quot;dita.temp.dir&quot; value =&quot;temp&quot;/>
  • 14. Speed up debugging time Place this target into the top-level dita-ot build.xml: < target name =&quot;devel-pdf2&quot; depends =&quot;start-process, init-logger, check-arg, output-deprecated-msg, output-css-warn-message&quot;> < xmlpropertyreader file =&quot;${dita.temp.dir}${file.separator}dita.xml.properties&quot;/> < dirname property =&quot;dita.map.output.dir&quot; file =&quot;${output.dir}${file.separator}${user.input.file}&quot; /> < condition property =&quot;noConref&quot;>< equals arg1 =&quot;${conreflist}&quot; arg2 =&quot;&quot; /></ condition > < condition property =&quot;noMap&quot;>< equals arg1 =&quot;${fullditamaplist}&quot; arg2 =&quot;&quot; /></ condition > < condition property =&quot;noTopic&quot;>< equals arg1 =&quot;${fullditatopiclist}&quot; arg2 =&quot;&quot; /></ condition > < condition property =&quot;noImagelist&quot;>< equals arg1 =&quot;${imagelist}&quot; arg2 =&quot;&quot; /></ condition > < condition property =&quot;noHtmllist&quot;>< equals arg1 =&quot;${htmllist}&quot; arg2 =&quot;&quot; /></ condition > < condition property =&quot;noSubList&quot;>< equals arg1 =&quot;${subtargetslist}&quot; arg2 =&quot;&quot; /></ condition > < ant dir =&quot;${dita.dir}/demo/fo&quot; target =&quot;publish.map.pdf&quot;> < property name =&quot;caller.dir&quot; value =&quot;${basedir}&quot;/> </ ant > </ target >
  • 15. Speed up debugging time Use this target in your project build file to invoke the development target. < target name =&quot;devel&quot;> < antcall target =&quot;devel-pdf2&quot;> < param name =&quot;transtype&quot; value =&quot;pdf&quot; /> < param name =&quot;args.input&quot; value =&quot;C:\DITA-OT\samples\hierarchy.ditamap&quot; /> </ antcall > </ target > Generate output the way your normally do.
  • 16. Debugging use merged xml file If you are using the pdf transform, all the topics will be merged into one xml file. Go to the temp directory and find the file MyMapName_merged.xml. Determine element hierarchy and class names Example: I am setting up an xpath statement and want to find all the preceding siblings of an element – check merged file to see which nodes will be included in this xpath selection. See what has made it into topicmerge Example: I set an outputclass on a topic and I want to see which node exactly got that outputclass attribute. Especially useful when setting up specializations The dita-ot adds the full class name to each element in the merged file. I can easily grab the class name I need to reference and see inheritance. < learningAssessmentbody class =&quot;- topic/body learningBase/learningBasebody learningAssessment/learningAssessmentbody “ … > (from learning specialization)
  • 17. Debug using topic.fo Try to fix the problem in topic.fo Example: problem with page masters. First header never appears. Look into the page-sequence-master <fo:page-sequence-master master-name=&quot;body-sequence&quot;> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference=&quot;body-first&quot; odd-or-even=&quot;odd&quot; page-position=&quot;first&quot;/> Correct problem in topic.fo and then will know where in the xsl to fix.
  • 19. Error Handling Error handling vs. debugging. Debugging is for the developer to find the error in the program. Error handling is communicating to the user an error that was found in the input to the program.
  • 20. Default error handling For example, the dita-ot relies on dtds that specify rules that the dita must conform with. Each element has a list of required and optional elements that it can contain. Order is significant. An error message will be generated by the toolkit if the DTD is not followed This is an example of error handling that is already built in to the toolkit.
  • 21. Errors? So what other type of errors might we need to handle? Example: I have a rule that the same topic cannot be inserted twice into the ditamap. Example: I have a rule that two topics may not have the same navtitle.
  • 22. Error Handling Options Error types: send a warning message that in a particular file there is an error force the build to fail for a more serious error. Draft vs. real mode. Draft – display file name in red with error element Non draft – fail build
  • 23. Error Handling Tips Create messages in an xml file. < messages > < message id =&quot;DOTAWEBINAR001F&quot; type =&quot;FATAL&quot;> < reason >A topic is referenced twice in the same ditamap.</ reason > < response >Please correct your ditamap or bookmap file.</ response > </ message > < message id =&quot;DOTAWEBINAR002W&quot; type =“WARN&quot;> < reason >Two topics have the same navtitle.</ reason > < response >Please correct your ditamap or bookmap file.</ response > </ message > </ messages > Plugin the xml file to the main dita-ot messages file: < feature extension =&quot;dita.xsl.messages&quot; value =&quot;messages.xml&quot; type =&quot;file&quot;/>
  • 24.  
  • 25. End of Methods of Error Handling and Debugging DITA Open Toolkit Processing Be in touch! [email_address] leora.betesh Let us know how we can help you…

Editor's Notes

  • #3: Suite Solutions: DITA Quick Start Training for Authors iDTP, March 16-18, 2009