SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Down	
 the	
 Rabbit	
 Hole:
                             Getting	
 Started	
 with	
 the	
 
                               DITA	
 Open	
 Toolkit



                                                   Sarah O’Keefe
                                               Scriptorium Publishing

Wednesday, February 22, 12
Sarah	
 O’Keefe
                ❖       Founder and president, Scriptorium
                        Publishing
                ❖       Content strategy for
                        technical communication
                ❖       Interested in collision of
                        content, publishing, and
                        technology


Wednesday, February 22, 12
Overview
                ❖       Installing the DITA Open Toolkit
                ❖       Generating output
                ❖       Customizing output




Wednesday, February 22, 12
flickr: themaninblue
Wednesday, February 22, 12
Installing	
 the	
 OT
                ❖       Download from dita-ot.sourceforge.net
                      ❖      Use version 1.5.4 for today
                      ❖      DITA-OT1.5.4_full_easy_install_bin.zip
                ❖       USB drives contain DITA-OT1.5.4,
                        unzipped for your convenience




Wednesday, February 22, 12
Best	
 practices
                ❖       Set up in top-level directory
                ❖       Do not use spaces in file names or
                        directory names
                ❖       Use a stable build and not the
                        development builds




Wednesday, February 22, 12
Remember	
 the	
 command	
 line?
                              flickr: johnhurn
Wednesday, February 22, 12
Testing	
 your	
 installation
                      ❖      Open a command window
                      ❖      Navigate to your DITA OT folder
                      ❖      Run
                             ❖   ./startcmd.sh (UNIX)
                             ❖   startcmd.bat (Windows)
                             ❖   ant -f build_demo.xml


Wednesday, February 22, 12
$ cd /DITA-OT1.5.4
     $ ./startcmd.sh
     DITA_HOME environment variable is
     empty or not set




                             You need to edit the
                             startcmd.sh file.




Wednesday, February 22, 12
#!/bin/sh
    # This file is part of the DITA Open
    Toolkit project hosted on  Add this line.
                               SPACES MATTER!
    # Sourceforge.net. See the accompanying
    license.txt file for
    # applicable licenses.
    # (c) Copyright IBM Corp. 2006 All
    Rights Reserved.

    DITA_HOME="/DITA-OT1.5.4"


    if  [ "${DITA_HOME:+1}" != "1" ]; then
       echo "DITA_HOME environment variable
    is empty or not set";
       exit 127;
    fi
    ...

Wednesday, February 22, 12
$ ./startcmd.sh
   $ ant -f build_demo.xml
   Buildfile: build_demo.xml

   prompt.init:
   [....]
   prompt.output:
        [echo]
        [echo] output in the out directory
        [echo]
        [echo] Before rebuilding, please
   delete the output or the directory.

   BUILD SUCCESSFUL
   Total time: 33 seconds
   $                           “Your OT is installed
                               and working.”

Wednesday, February 22, 12
It	
 gets	
 better.




                             (No,	
 it	
 doesn’t.)

                                                     flickr: wadem

Wednesday, February 22, 12
Generating	
 output   flickr: cdemo
Wednesday, February 22, 12
Generating	
 output
  Theory
       ant -f build.xml
          -Dargs.input=input-ditamap
          -Doutput.dir=output-folder
          -Dtranstype=transformation-type



  Example
       ant -f build.xml -Dargs.input=C:/DITA-
       OT1.5.4/doc/userguide.ditamap
       -Doutput.dir=C:/out
       -Dtranstype=xhtml

Wednesday, February 22, 12
Customizing	
 output
                             flickr: jpockele
Wednesday, February 22, 12
flickr: Robobobobo




     Best	
 practice:	
 Create	
 a	
 plugin
Wednesday, February 22, 12
Creating	
 a	
 plugin
                ❖       Create a folder for the plugin
                ❖       Set up the plugin.xml and
                        conductor.xml files
                ❖       Verify the installation with a tiny
                        customization




Wednesday, February 22, 12
Creating	
 a	
 folder	
 for	
 the	
 
                plugin
                ❖       Plugins go in the OT’s plugins directory.
                ❖       Naming convention is:
                      ❖      <your domain>.<your plugin>
                      ❖      com.scriptorium.myhtml




Wednesday, February 22, 12
Set	
 up	
 plugin.xml
                ❖       Copy from org.dita.xhtml folder
                ❖       Simplify


          <plugin id="com.scriptorium.myhtml">
           <feature extension="dita.xsl.xhtml"
          file="xsl/myxsl.xsl"/>
          </plugin>




Wednesday, February 22, 12
Set	
 up	
 conductor.xml
                ❖       Copy from org.dita.xhtml
                ❖       No changes




Wednesday, February 22, 12
myxsl.xsl	
 (in	
 xsl	
 folder)
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/
    XSL/Transform"
    version="1.0">

  <xsl:template name="gen-user-header">
   <div><img src="http://www.scriptorium.com/
    images/HeaderImage.png"
    alt="scriptorium.com"/></div>
  </xsl:template>

  </xsl:stylesheet>



Wednesday, February 22, 12
Integrate	
 your	
 changes


          $ ant -f integrator.xml
          Buildfile: integrator.xml

          lax:

          integrate:

          BUILD SUCCESSFUL
          Total time: 1 second
          $

Wednesday, February 22, 12
Test	
 the	
 new	
 plugin
                ❖       Same command as before



    $ ant -f build.xml -Dargs.input=/DITA-
    OT1.5.4/doc/userguide.ditamap -Doutput.dir=
    /out -Dtranstype=xhtml




Wednesday, February 22, 12
More	
 XSL	
 customization
                ❖       Copy template from dita2xhtml.xsl (or
                        referenced files) into myxhtml.xsl
                ❖       Modify as you like




Wednesday, February 22, 12
Specifying	
 
     custom	
 CSS
                             flickr: ffg
Wednesday, February 22, 12
Specifying	
 custom	
 CSS
                ❖       Set up your own build file
                ❖       Fix file paths
                ❖       Point build file at the custom CSS you
                        want




Wednesday, February 22, 12
Creating	
 a	
 custom	
 build	
 
                file
                ❖       In samples/ant_sample, locate
                        sample_xhtml.xml
                ❖       Put a copy in the root OT folder and
                        rename it: build_myxhtml.xml




Wednesday, February 22, 12
Fix	
 the	
 file	
 paths	
 in	
 
                custom	
 build	
 file


       <property name="sample.output.dir"
                 value="/out/sample"/>
       <property name="css.source.dir"
                 location="${dita.dir}/plugins/
       com.scriptorium.myhtml/css"/>




Wednesday, February 22, 12
Optionally,	
 modify	
 other	
 
                settings
                ❖       args.input to specify the ditamap to
                        process
                ❖       args.css for the CSS file name
                ❖       args.csspath for the CSS directory path




Wednesday, February 22, 12
Run	
 custom	
 build	
 and	
 
                          admire	
 the	
 results   flickr: tompeters1994
Wednesday, February 22, 12
Run	
 custom	
 build	
 and	
 
                admire	
 the	
 results
                ❖       Arguments are not needed if you
                        customized the build file with your
                        exact settings

       $ ant -f build_myxhtml.xml -Dargs.input=/
       Users/okeefe/Documents/CSinTC/csintc.ditamap
       -Doutput.dir=/out -Dtranstype=xhtml




Wednesday, February 22, 12
flickr: jpockele



  Beyond	
 the	
 basics




Wednesday, February 22, 12
You	
 will	
 need…
                ❖       XHTML or HTML5
                ❖       CSS
                ❖       Apache Ant
                ❖       XSLT
                ❖       XML DTDs
                ❖       XSL-FO (for PDF customization)


Wednesday, February 22, 12
Take	
 care	
 of	
 
                              formalities




                               flickr: Carly & Art
Wednesday, February 22, 12
Keep	
 changes	
 in	
 plugins	
 
                folder	
 and	
 custom	
 build	
 files
                ❖       Do not change core Open Toolkit
                ❖       Use code comments extensively




Wednesday, February 22, 12
Document	
 your	
 changes!




                             amazon.com


Wednesday, February 22, 12
Q	
 &	
 A
                                  flickr: gracewong
Wednesday, February 22, 12
Visit	
 our	
 booth…
                ❖       Sarah O’Keefe
                ❖       okeefe@scriptorium.com
                ❖       Twitter: @sarahokeefe
                ❖       www.scriptorium.com
                ❖       BTW, we’re hiring.
                ❖       Also, we have chocolate.


Wednesday, February 22, 12

Weitere ähnliche Inhalte

Ähnlich wie Down the Rabbit Hole: Getting Started with the DITA Open Toolkit

Plc2 2015 your own ide
Plc2 2015 your own idePlc2 2015 your own ide
Plc2 2015 your own ide
Sigasi
 

Ähnlich wie Down the Rabbit Hole: Getting Started with the DITA Open Toolkit (20)

Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Doctrine Php Object Relational Mapper
Doctrine Php Object Relational MapperDoctrine Php Object Relational Mapper
Doctrine Php Object Relational Mapper
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
 
RELAX NG to DTD and XSD Using the Open Toolkit
RELAX NG to DTD and XSD Using the Open ToolkitRELAX NG to DTD and XSD Using the Open Toolkit
RELAX NG to DTD and XSD Using the Open Toolkit
 
Deployer
DeployerDeployer
Deployer
 
Duke Docker Day 2014: Research Applications with Docker
Duke Docker Day 2014: Research Applications with DockerDuke Docker Day 2014: Research Applications with Docker
Duke Docker Day 2014: Research Applications with Docker
 
Slackware: Quickly and Easily Manage Your KDE SC Hacking [Camp KDE 2011]
Slackware: Quickly and Easily Manage Your KDE SC Hacking [Camp KDE 2011]Slackware: Quickly and Easily Manage Your KDE SC Hacking [Camp KDE 2011]
Slackware: Quickly and Easily Manage Your KDE SC Hacking [Camp KDE 2011]
 
Into the Wild with Node.js and Web Apps
Into the Wild with Node.js and Web AppsInto the Wild with Node.js and Web Apps
Into the Wild with Node.js and Web Apps
 
Behat dpc12
Behat dpc12Behat dpc12
Behat dpc12
 
The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010
 
Plc2 2015 your own ide
Plc2 2015 your own idePlc2 2015 your own ide
Plc2 2015 your own ide
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
Take care of hundred containers and not go crazy
Take care of hundred containers and not go crazyTake care of hundred containers and not go crazy
Take care of hundred containers and not go crazy
 
Docker for Fun and Profit
Docker for Fun and ProfitDocker for Fun and Profit
Docker for Fun and Profit
 
Managing development environments with Docksal
Managing development environments with DocksalManaging development environments with Docksal
Managing development environments with Docksal
 
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal StackDecoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
 
Docker and the Container Revolution
Docker and the Container RevolutionDocker and the Container Revolution
Docker and the Container Revolution
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the Beast
 

Mehr von Scriptorium Publishing

Mehr von Scriptorium Publishing (20)

Think global, act global, go global
Think global, act global, go globalThink global, act global, go global
Think global, act global, go global
 
Future-proofing your content
Future-proofing your contentFuture-proofing your content
Future-proofing your content
 
Future-proofing your career
Future-proofing your careerFuture-proofing your career
Future-proofing your career
 
Developing training websites in multiple languages with (mostly) open-source ...
Developing training websites in multiple languages with (mostly) open-source ...Developing training websites in multiple languages with (mostly) open-source ...
Developing training websites in multiple languages with (mostly) open-source ...
 
Webcast: Balancing standardization against the need for creativity
Webcast: Balancing standardization against the need for creativityWebcast: Balancing standardization against the need for creativity
Webcast: Balancing standardization against the need for creativity
 
The Rocky Road to DITA
The Rocky Road to DITAThe Rocky Road to DITA
The Rocky Road to DITA
 
LavaCon keynote: But Father, I'm Goldleafing as Fast as I Can!
LavaCon keynote: But Father, I'm Goldleafing as Fast as I Can!LavaCon keynote: But Father, I'm Goldleafing as Fast as I Can!
LavaCon keynote: But Father, I'm Goldleafing as Fast as I Can!
 
2016 content trends
2016 content trends2016 content trends
2016 content trends
 
Unified Content Development: Integrating Tech Comm, Marcom, and Technical Sup...
Unified Content Development: Integrating Tech Comm, Marcom, and Technical Sup...Unified Content Development: Integrating Tech Comm, Marcom, and Technical Sup...
Unified Content Development: Integrating Tech Comm, Marcom, and Technical Sup...
 
Content Strategy Triage: Who lives? Who dies? Who do you fight to save?
Content Strategy Triage: Who lives? Who dies? Who do you fight to save?Content Strategy Triage: Who lives? Who dies? Who do you fight to save?
Content Strategy Triage: Who lives? Who dies? Who do you fight to save?
 
Content Strategy Triage: Extended Edition
Content Strategy Triage: Extended EditionContent Strategy Triage: Extended Edition
Content Strategy Triage: Extended Edition
 
The Content Strategy of Things
The Content Strategy of ThingsThe Content Strategy of Things
The Content Strategy of Things
 
Localization strategy and the customer journey
Localization strategy and the customer journeyLocalization strategy and the customer journey
Localization strategy and the customer journey
 
Webinar content strategy_vs_the_undead
Webinar content strategy_vs_the_undeadWebinar content strategy_vs_the_undead
Webinar content strategy_vs_the_undead
 
Content strategy triage intro for Lavacon 2015
Content strategy triage intro for Lavacon 2015Content strategy triage intro for Lavacon 2015
Content strategy triage intro for Lavacon 2015
 
2015 content trends
2015 content trends2015 content trends
2015 content trends
 
Adapting content for the US market
Adapting content for the US marketAdapting content for the US market
Adapting content for the US market
 
Content strategy vs. The Undead
Content strategy vs. The UndeadContent strategy vs. The Undead
Content strategy vs. The Undead
 
The many facets of content strategy
The many facets of content strategyThe many facets of content strategy
The many facets of content strategy
 
The Bottom Line: Globalization and the Dependence on Intelligent Content
The Bottom Line: Globalization and the Dependence on Intelligent ContentThe Bottom Line: Globalization and the Dependence on Intelligent Content
The Bottom Line: Globalization and the Dependence on Intelligent Content
 

Kürzlich hochgeladen

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
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Down the Rabbit Hole: Getting Started with the DITA Open Toolkit

  • 1. Down the Rabbit Hole: Getting Started with the DITA Open Toolkit Sarah O’Keefe Scriptorium Publishing Wednesday, February 22, 12
  • 2. Sarah O’Keefe ❖ Founder and president, Scriptorium Publishing ❖ Content strategy for technical communication ❖ Interested in collision of content, publishing, and technology Wednesday, February 22, 12
  • 3. Overview ❖ Installing the DITA Open Toolkit ❖ Generating output ❖ Customizing output Wednesday, February 22, 12
  • 5. Installing the OT ❖ Download from dita-ot.sourceforge.net ❖ Use version 1.5.4 for today ❖ DITA-OT1.5.4_full_easy_install_bin.zip ❖ USB drives contain DITA-OT1.5.4, unzipped for your convenience Wednesday, February 22, 12
  • 6. Best practices ❖ Set up in top-level directory ❖ Do not use spaces in file names or directory names ❖ Use a stable build and not the development builds Wednesday, February 22, 12
  • 7. Remember the command line? flickr: johnhurn Wednesday, February 22, 12
  • 8. Testing your installation ❖ Open a command window ❖ Navigate to your DITA OT folder ❖ Run ❖ ./startcmd.sh (UNIX) ❖ startcmd.bat (Windows) ❖ ant -f build_demo.xml Wednesday, February 22, 12
  • 9. $ cd /DITA-OT1.5.4 $ ./startcmd.sh DITA_HOME environment variable is empty or not set You need to edit the startcmd.sh file. Wednesday, February 22, 12
  • 10. #!/bin/sh # This file is part of the DITA Open Toolkit project hosted on Add this line. SPACES MATTER! # Sourceforge.net. See the accompanying license.txt file for # applicable licenses. # (c) Copyright IBM Corp. 2006 All Rights Reserved. DITA_HOME="/DITA-OT1.5.4" if [ "${DITA_HOME:+1}" != "1" ]; then echo "DITA_HOME environment variable is empty or not set"; exit 127; fi ... Wednesday, February 22, 12
  • 11. $ ./startcmd.sh $ ant -f build_demo.xml Buildfile: build_demo.xml prompt.init: [....] prompt.output: [echo] [echo] output in the out directory [echo] [echo] Before rebuilding, please delete the output or the directory. BUILD SUCCESSFUL Total time: 33 seconds $ “Your OT is installed and working.” Wednesday, February 22, 12
  • 12. It gets better. (No, it doesn’t.) flickr: wadem Wednesday, February 22, 12
  • 13. Generating output flickr: cdemo Wednesday, February 22, 12
  • 14. Generating output Theory ant -f build.xml    -Dargs.input=input-ditamap    -Doutput.dir=output-folder    -Dtranstype=transformation-type Example ant -f build.xml -Dargs.input=C:/DITA- OT1.5.4/doc/userguide.ditamap -Doutput.dir=C:/out -Dtranstype=xhtml Wednesday, February 22, 12
  • 15. Customizing output flickr: jpockele Wednesday, February 22, 12
  • 16. flickr: Robobobobo Best practice: Create a plugin Wednesday, February 22, 12
  • 17. Creating a plugin ❖ Create a folder for the plugin ❖ Set up the plugin.xml and conductor.xml files ❖ Verify the installation with a tiny customization Wednesday, February 22, 12
  • 18. Creating a folder for the plugin ❖ Plugins go in the OT’s plugins directory. ❖ Naming convention is: ❖ <your domain>.<your plugin> ❖ com.scriptorium.myhtml Wednesday, February 22, 12
  • 19. Set up plugin.xml ❖ Copy from org.dita.xhtml folder ❖ Simplify <plugin id="com.scriptorium.myhtml"> <feature extension="dita.xsl.xhtml" file="xsl/myxsl.xsl"/> </plugin> Wednesday, February 22, 12
  • 20. Set up conductor.xml ❖ Copy from org.dita.xhtml ❖ No changes Wednesday, February 22, 12
  • 21. myxsl.xsl (in xsl folder) <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/ XSL/Transform" version="1.0"> <xsl:template name="gen-user-header"> <div><img src="http://www.scriptorium.com/ images/HeaderImage.png" alt="scriptorium.com"/></div> </xsl:template> </xsl:stylesheet> Wednesday, February 22, 12
  • 22. Integrate your changes $ ant -f integrator.xml Buildfile: integrator.xml lax: integrate: BUILD SUCCESSFUL Total time: 1 second $ Wednesday, February 22, 12
  • 23. Test the new plugin ❖ Same command as before $ ant -f build.xml -Dargs.input=/DITA- OT1.5.4/doc/userguide.ditamap -Doutput.dir= /out -Dtranstype=xhtml Wednesday, February 22, 12
  • 24. More XSL customization ❖ Copy template from dita2xhtml.xsl (or referenced files) into myxhtml.xsl ❖ Modify as you like Wednesday, February 22, 12
  • 25. Specifying custom CSS flickr: ffg Wednesday, February 22, 12
  • 26. Specifying custom CSS ❖ Set up your own build file ❖ Fix file paths ❖ Point build file at the custom CSS you want Wednesday, February 22, 12
  • 27. Creating a custom build file ❖ In samples/ant_sample, locate sample_xhtml.xml ❖ Put a copy in the root OT folder and rename it: build_myxhtml.xml Wednesday, February 22, 12
  • 28. Fix the file paths in custom build file <property name="sample.output.dir" value="/out/sample"/> <property name="css.source.dir" location="${dita.dir}/plugins/ com.scriptorium.myhtml/css"/> Wednesday, February 22, 12
  • 29. Optionally, modify other settings ❖ args.input to specify the ditamap to process ❖ args.css for the CSS file name ❖ args.csspath for the CSS directory path Wednesday, February 22, 12
  • 30. Run custom build and admire the results flickr: tompeters1994 Wednesday, February 22, 12
  • 31. Run custom build and admire the results ❖ Arguments are not needed if you customized the build file with your exact settings $ ant -f build_myxhtml.xml -Dargs.input=/ Users/okeefe/Documents/CSinTC/csintc.ditamap -Doutput.dir=/out -Dtranstype=xhtml Wednesday, February 22, 12
  • 32. flickr: jpockele Beyond the basics Wednesday, February 22, 12
  • 33. You will need… ❖ XHTML or HTML5 ❖ CSS ❖ Apache Ant ❖ XSLT ❖ XML DTDs ❖ XSL-FO (for PDF customization) Wednesday, February 22, 12
  • 34. Take care of formalities flickr: Carly & Art Wednesday, February 22, 12
  • 35. Keep changes in plugins folder and custom build files ❖ Do not change core Open Toolkit ❖ Use code comments extensively Wednesday, February 22, 12
  • 36. Document your changes! amazon.com Wednesday, February 22, 12
  • 37. Q & A flickr: gracewong Wednesday, February 22, 12
  • 38. Visit our booth… ❖ Sarah O’Keefe ❖ okeefe@scriptorium.com ❖ Twitter: @sarahokeefe ❖ www.scriptorium.com ❖ BTW, we’re hiring. ❖ Also, we have chocolate. Wednesday, February 22, 12