{"id":15339892,"url":"https://github.com/jbampton/ruby-eclipse-cheatsheets-to-dita","last_synced_at":"2026-01-27T04:33:29.659Z","repository":{"id":90825862,"uuid":"44478104","full_name":"jbampton/ruby-eclipse-cheatsheets-to-dita","owner":"jbampton","description":"Transforms Eclipse cheat sheets (XML) to DITA with Ruby, XSLT, XPath, Nokogiri","archived":false,"fork":false,"pushed_at":"2018-01-01T22:27:26.000Z","size":2865,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T22:12:30.387Z","etag":null,"topics":["command-line-tool","dita","eclipse-cheat-sheets","nokogiri","ruby","xml","xpath","xslt"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbampton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-18T12:57:14.000Z","updated_at":"2018-11-29T16:47:09.000Z","dependencies_parsed_at":"2023-07-12T16:00:16.806Z","dependency_job_id":null,"html_url":"https://github.com/jbampton/ruby-eclipse-cheatsheets-to-dita","commit_stats":{"total_commits":76,"total_committers":1,"mean_commits":76.0,"dds":0.0,"last_synced_commit":"eafcd1babd10263914118cb3ded2c15eee09a846"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jbampton/ruby-eclipse-cheatsheets-to-dita","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fruby-eclipse-cheatsheets-to-dita","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fruby-eclipse-cheatsheets-to-dita/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fruby-eclipse-cheatsheets-to-dita/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fruby-eclipse-cheatsheets-to-dita/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbampton","download_url":"https://codeload.github.com/jbampton/ruby-eclipse-cheatsheets-to-dita/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fruby-eclipse-cheatsheets-to-dita/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28802064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","dita","eclipse-cheat-sheets","nokogiri","ruby","xml","xpath","xslt"],"created_at":"2024-10-01T10:31:19.307Z","updated_at":"2026-01-27T04:33:29.642Z","avatar_url":"https://github.com/jbampton.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eclipse cheat sheets (XML) to DITA with Ruby, XSL, Nokogiri\n\n## The Ruby Story\n\nThis project uses [Ruby](https://www.ruby-lang.org/en/) and tries to be and easy to use tutorial on all things  [Ruby](http://ruby-doc.org).\n\nRuby dates back to the 1990's and was first created by a Japanese man named [Yukihiro \"Matz\" Matsumoto](https://en.wikipedia.org/wiki/Yukihiro_Matsumoto).\n\nHey come and check out the [Ruby in 4 seconds](https://youtu.be/ayx4fASYkZU) video.\n\n[Ruby](https://www.ruby-lang.org/en/) is very [powerful](https://www.ruby-lang.org/en/documentation/success-stories/), is growing in popularity and is currently ranked 11th on the [TIOBE Index](http://www.tiobe.com/tiobe_index).\n\nThere are two types of Ruby files: .rb, .rbw\n\n[Matz](https://twitter.com/matz_translated) made run Ruby fun and easy to learn, so don't be scared and first check out a short Ruby YouTube video I created.\n\n[Ruby in 29 seconds](https://youtu.be/2ei7S0FU65E)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## Project Background\n\nI worked on the open source [Java](https://www.oracle.com/java/index.html) based project [Debrief](http://debrief.info/) the leading maritime analysis tool which is also on GitHub at [https://github.com/debrief/debrief](https://github.com/debrief/debrief).  \n\nThe Debrief project used [Apache Ant](http://ant.apache.org), [SaxonHE](https://sourceforge.net/projects/saxon/files/Saxon-HE/), [XSLT 2.0](https://www.w3.org/TR/xslt20/) and [XPath](https://www.w3.org/TR/xpath-3/) and ran inside [Eclipse](https://eclipse.org) therefore requiring [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html).  The Debrief document publishing project has been extracted into its own self contained GitHub repository at [https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf](https://github.com/jbampton/eclipse-cheatsheets-to-dita-to-pdf).\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## From Java, XSLT 2.0 with Saxon to Ruby, XSLT 1.0 with the Nokogiri Ruby gem\n\nUsing [Ruby](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579) on this project allows use to harness the power of [RubyGems](https://rubygems.org/) particularly the [Nokogiri](http://www.nokogiri.org/) gem along with XSLT 1.0 / XPath 1.0 to create the DITA XML files.  Using Ruby eliminates the need to use Eclipse and Apache Ant and can be run standalone from the command line as long as you have Ruby installed.  This project is only one step from the publishing pipeline that was built on Debrief project which produced a [PDF](https://acrobat.adobe.com/us/en/why-adobe/about-adobe-pdf.html) as its final output.\n\nThe Ruby file: `default.rb` builds the output parent Ditamap `map.ditamap` (output/map.ditamap) and the 4 sub DITA tasks in the `output/dita` folder.\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## DITA Background\n\n[Darwin Information Typing Architecture](https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture) (DITA) is an [XML](https://en.wikipedia.org/wiki/XML) data model for authoring and using the [DITA Open Toolkit](http://www.dita-ot.org/) (DITA-OT) you can publish those ideas.\n\nThe DITA standard is maintained by the [OASIS](https://www.oasis-open.org/) DITA Technical Committee.\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## The Project\n\nThe Ruby code in `default.rb` has some [XSL](https://en.wikipedia.org/wiki/XSL) code embedded,\n as well as some [XML](https://en.wikipedia.org/wiki/XML) markup in a interpolated [string literal](http://ruby-doc.org/core-2.2.0/doc/syntax/literals_rdoc.html) syntax.\n\nThe [Eclipse cheat sheets](http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-cheatsheets.htm) test data folder - `cheatsheets-xml-test-data` is best viewed inside Eclipse, and is used as input when `default.rb` runs.\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## Short online courses\n\nIf you are still to afraid to dive in and try Ruby, how about some easy free web based interactive courses on Ruby and technology in general:\n\n- [Try Ruby](http://tryruby.org/levels/1/challenges/0)\n- [Codecademy Ruby](https://www.codecademy.com/learn/ruby)\n- [Learn the command line](https://www.codecademy.com/learn/learn-the-command-line)\n- [Try Git](https://www.codeschool.com/courses/try-git)\n- [Learn Git](https://www.codecademy.com/learn/learn-git)\n\nAnd then come train in the [REAL DOJO](http://www.codewars.com) and reach your highest potential, become **faster**, **stronger** and **more powerful**....**JEDI MASTER LEVEL**.....**??!?!!**  \n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## IDE Choice\n\nYou will by now want to write your own homegrown Ruby Code so some programmers use advanced integrated development environments ([IDE's](https://en.wikipedia.org/wiki/Integrated_development_environment)) that offer colored code markup or auto completion as you type.\n\n- [Atom](https://atom.io/)\n- [Komodo Edit](http://komodoide.com/komodo-edit/)\n- [Sublime Text](https://www.sublimetext.com/)\n- [Komodo IDE](http://komodoide.com/)\n- [JetBrains RubyMine](https://www.jetbrains.com/ruby/)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n## Installation\n\nAs we are using Ruby you will need to see if it's installed on your system.\n\nSo now that you are the [Chuck Norris](https://en.wikipedia.org/wiki/Chuck_Norris) of all things Ruby, open a terminal and type:\n\n### ruby -v  \n\nFor further information on your local Ruby environment type:\n\n### ruby --help\n\n![ruby -v](documentation/images/rvm-ruby-v.png)\n\n![ruby --help](documentation/images/ruby-help.png)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n[man pages](https://en.wikipedia.org/wiki/Man_page) contain a lot of information about programs.\n\n### man ruby\n\n![man ruby](documentation/images/man-ruby.png)\n\nYou can use the up and down arrows to navigate through the man page.  Press q to quit\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nRuby also ships with `ri` a tool used to display information about Ruby Classes, modules and methods from your terminal\n\nA lot of people don't know `ri` exists and use google search instead.\n\n### man ri\n\n![man ri](documentation/images/man-ri.png)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nRuby also ships with a fantastic tool called IRB.  IRB is the interactive Ruby shell where you can test out your Ruby commands inside a terminal.  I made [short video on IRB](https://www.youtube.com/watch?v=CpFgz5Iq3qA) on Youtube to the magical sounds of Fon Leman.\n\n### man irb\n\n![man irb](documentation/images/man-irb.png)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nAnd to use IRB type:\n\n### irb\n\n![irb](documentation/images/irb.png)\n\nYou type 'exit' to stop using irb and return to the standard terminal.\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nYou can add 'tab' completion to irb by creating a .irbrc file\n\nYou can use the nano editor to create this by entering:\n\n### nano .irbrc\n\nThen entering the next line:\n\n### require 'irb/completion'\n\nThis program uses the Nokogiri gem so you must install it by running:\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n### gem install nokogiri\n\n![gem install nokogiri](documentation/images/gem-install-nokogiri.png)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nFor more information on the gem command:\n\n### gem -h\n\n![gem -h](documentation/images/gem-h.png)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nI recommend running:\n\n### gem list --local  \n\nthat shows which gems are currently installed on your system.  \n\n![gem list --local](documentation/images/gem-list-local.png)\n\nTo see in further detail which gems are installed bring up a locally served web page at http://localhost:8808/ by typing:\n\n### gem server\n\n![gem server](documentation/images/gem-server.png)\n\n![gem server localhost](documentation/images/gem-server-webpage.png)\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\nI used RubyMine and OS X for development.  RubyMine is an integrated development environment (IDE) for Ruby and Rails projects and has Git functionality built in.\n\nRubyMine is a very advanced code editor that is a commercial product from JetBrains.  I also like PyCharm and IntelliJ from JetBrains.\n\nEclipse is a more general purpose IDE written mainly in Java.\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## Resources\n\nNokogiri - http://www.nokogiri.org/\n\nJetBrains RubyMine - https://www.jetbrains.com/ruby/\n\nEclipse - https://eclipse.org/\n\nEclipse cheat sheets - http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-cheatsheets.htm\n\nDITA - https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture\n\nXSLT FAQ. Docbook FAQ. Braille. - http://www.dpawson.co.uk/\n\nW3C - The Extensible Stylesheet Language Family (XSL) - http://www.w3.org/Style/XSL/\n\nThe Organization for the Advancement of Structured Information Standards (OASIS) - https://en.wikipedia.org/wiki/OASIS_(organization)\n\nCodecademy - Learn the Command Line - https://www.codecademy.com/courses/learn-the-command-line\n\nCodecademy - Learn Ruby - https://www.codecademy.com/learn/ruby\n\nCodeSchool - Got 15 minutes and want to learn Git? https://try.github.io/levels/1/challenges/1\n\nCodeSchool Try Ruby - https://www.codeschool.com/courses/try-ruby\n\nRuby regular expression editor - http://rubular.com/\n\nJetBrains Intellij - https://www.jetbrains.com/idea/\n\nJetBrains PyCharm - https://www.jetbrains.com/pycharm/\n\nEssential programmer training - http://www.codewars.com/\n\nHelp and documentation for the Ruby programming language - http://ruby-doc.org/\n\nRuby Programming Language - https://www.ruby-lang.org/en/\n\nThe Ruby Toolbox - https://www.ruby-toolbox.com/\n\nHomebrew - The missing package manager for OS X - http://brew.sh/\n\nInstall Homebrew formulas - http://brewformulas.org/\n\nOracle Virtualbox - https://www.virtualbox.org/\n\nRubyInstaller for Windows - http://rubyinstaller.org/\n\nRuby Version Manager (RVM) - https://rvm.io/\n\nInstalling Ruby - https://www.ruby-lang.org/en/documentation/installation/\n\nRuby success stories - https://www.ruby-lang.org/en/documentation/success-stories/\n\nRuby Motion success stories - http://www.rubymotion.com/references/success-stories/\n\nThe Top Ruby Jobs - https://toprubyjobs.com/\n\nAustralian companies using Rails - https://github.com/rails-oceania/roro/wiki/Australian-Companies-using-Ruby-on-Rails\n\nIDE - Integrated Development Environment - https://en.wikipedia.org/wiki/Integrated_development_environment\n\nGit (software) - https://en.wikipedia.org/wiki/Git_(software)\n\nman page - https://en.wikipedia.org/wiki/Man_page\n\nTerminal (OS X) - https://en.wikipedia.org/wiki/Terminal_(OS_X)\n\nMastering Markdown - https://guides.github.com/features/mastering-markdown/\n\nOne-Click rubyinstaller and DevKit - https://bintray.com/oneclick/rubyinstaller\n\nMinGW - Minimalist GNU for Windows - http://www.mingw.org/\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## List of Ruby\n\nhttps://github.com/ruby/ruby\n\nhttps://twitter.com/matz_translated\n\nhttps://twitter.com/yukihiro_matz\n\nhttps://www.facebook.com/pages/Yukihiro-Matsumoto/109410772411674\n\nhttps://plus.google.com/communities/101878695540653445908\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri) [\u0026#8595;](#contributions)\n\n\n## Contributions\nFork and pull request. Simple.\n\n[\u0026#8593;](#eclipse-cheat-sheets-xml-to-dita-with-ruby-xsl-nokogiri)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbampton%2Fruby-eclipse-cheatsheets-to-dita","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbampton%2Fruby-eclipse-cheatsheets-to-dita","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbampton%2Fruby-eclipse-cheatsheets-to-dita/lists"}