GithubHelp home page GithubHelp logo

tomschr / dbcookbook Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 5.0 35.92 MB

Cookbook for DocBook and DocBook XSL stylesheets

Home Page: http://doccookbook.sf.net/

License: Other

Python 0.24% XProc 0.48% Shell 0.36% XSLT 85.35% CSS 1.48% Perl 0.12% Makefile 0.06% Ruby 0.09% JavaScript 7.84% Java 0.15% HTML 3.61% NewLisp 0.03% SystemVerilog 0.04% Batchfile 0.01% XQuery 0.10% Raku 0.03%
docbook xml cookbook xslt

dbcookbook's Introduction

Welcome to "The DoCookBook"

https://travis-ci.org/tomschr/dbcookbook.svg?branch=develop
Info:See https://github.com/tomschr/dbcookbook
Author:Thomas Schraitle <tom_schr AT web DOT de>
Description:Cookbook for DocBook and DocBook XSL stylesheets
HTML:http://doccookbook.sourceforge.net

License

The book is licensed as Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany License (CC by-nc-sa 3.0 DE) See http://creativecommons.org/licenses/by-nc-sa/3.0/de/

Mission

The DoCookBook project aims to create an open source book about DocBook and the DocBook XSL stylesheets written in a cookbook-style manner and released under a Creative Commons license.

Concept

This book is written in a "cookbook" style. The book contains "topics" which are divided into a problem, the corresponding solution, some discussions, and optional related information. It is very easy just to go to the table of contents and see if there is something useful that fits to your problem. Solutions are usually written in a procedural style which contain several steps.

Target Group

It is assumed you have a decent knowledge about XML and DocBook. It doesn't hurt if you know CSS and XSLT. As such, it is aimed more at DocBook developers than writers.

Structure of the Book and Organization

The main file is "en/xml/DocBook-Cookbook.xml". It contains xi:include elements which refer to chapters, appendices and other second level elements.

# Structure of Book with Main Chapters
en/xml/DocBook-Cookbook.xml
|
+-- 5.1/        # (1)
|
+-- common/     # (2)
|
+-- db/         # (3)
|
+-- epub/       # (4)
|
+-- fo/         # (5)
|
+-- html/       # (6)
|
+-- structure/ # (7)
(1) Contains the DocBook Schema and possible customizations
(2) Contains topics to common customizations
(3) Contains topics to DocBook's markup
(4) Planned: will contain customizations to EPUB output format
(5) Contains topics to FO customizations
(6) Contains topics to HTML, XHTML, and other customizations based on HTML
(7) Contains topics how to manipulate DocBook's structure

Some topics contain directories which store XSLT, XML, or other example files. In some cases these are incorporated into the XML source, sometimes they are just lying around for testing purposes.

Each topic is a self-contained matter of a specific problem and its solution with discussion. Use the skeleton file "en/xml/topic.empty.xml" as a starting point. It contains the basic structure and you just need to add the flesh of your topic.

Contribute

Do you miss anything? Have you discovered an error? Have an idea about how to improve the book? Great! If you want to contribute to the book, you can do it in different ways:

  • Write me a mail to <tom_schr (AT) web.de> and send me your comments
  • Extend the tickets (Ideas for New Topics) at http://github/tomschr/dbcookbook/issues
  • Clone this repository and send me patches

This repository uses git flow from https://github.com/petervanderdoes/gitflow-avh see Vincent Driessen Git branching model

How to build the book

Currently, building the book works but it's not as nice as I would like to see it.

  • Building chunked HTML: use ./bin/dbsaxon
  • Building single HTML: use bin/dbsaxon9

At the moment, it is a mixture of XSLT 1.0 and XSLT 2.0 stylesheets. To avoid maintaing two different CSS files (one for the XSLT 1.0 output, the other for 2.0), the HTML files coming from XSLT 1.0 are "cleaned up". This cleanup step makes the structure compatible to the XSLT 2.0 output.

How you can help

  • Find typos, grammar problems, inconsistencies, or plain errors
  • Send me patches
  • Write your own topic

dbcookbook's People

Contributors

der-schmelle2 avatar dourouc05 avatar gan-ainm avatar lo48576 avatar stefanhinz avatar tomschr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dbcookbook's Issues

Add topics about how to use and preserve entities

Is your feature request related to a problem? Please describe.
How to use and preserve entities are not described.

Describe the solution you'd like
Add topics about how to use and how to preserve entities

Additional context
Should be added to "Manipulating DocBook Document Structure" chapter.

Related to #8

Contribute

I would like to contribute to your cookbook as well as helping you to get it published. I have a relationship with Apress Books and I could have the manuscript submitted for publication. I am interested in anything I can contribute including existing and new content. I have a special interest in using open source tools to transform DocBook into content like pdf, html, and other open formats.

Currently I am finishing my second book with Apress and I will be available shortly to work on content for your book. I only ask to be considered a co-author should my contributions be considered good enough.

I look forward to hearing from you and providing new content for your book.

Thank you,
W. David Ashley
[email protected]
512.289.7506
Austin, Texas

Rename Book/Project Title

Problem

The project and book name is a bit cheasy.

Solution

Rename it to "DocBook Style Guide: Best Practices for Authors and Developers"

Checklist

  • move project to the new domain
  • adapt URLs in the document itself
  • adapt URL(s) in/for Travis
  • correct README
  • something else...?

Create a GitHub Domain?

Problem

Maybe it's worth to think about creating a specific GitHub domain dedicated to this project.

Related to #19

Solution

With a domain, it could be easier to separate tools, result HTML, and source code.

  • redirect pages from SourceForge to GitHub
  • fix all old links
  • separate build mechanics from source code

Add Index

Problem

The book needs a decent index, maybe created semi-automatically.

Solution

The book contains an index with the following properties:

  • primary indexterm about (stylesheet) parameters
  • primary indexterm about commands
  • primary indexterm about options
  • primary indexterm about DocBook elements

Ideas: Print Customizations

Moved from https://sourceforge.net/p/doccookbook/tickets/22/


These are some of the ideas about print customizations. The list is no guarantee that all will be implemented.

  • Restarting page number on each chapter
  • Designing Title Pages
  • Designing Pages for Novels
  • Designing Pages for Lexicons, Referene Book and Catalogs
  • Designing Pages for Magazines and News Papers
  • Designing Pages for Technical Books
  • Adapting Chapter and Sections Titles
  • Make Font Sizes Consistent / Standardizing Font Sizes (Le Corbusier)
  • Index
  • Designing TOCs
  • Colorizing Table Rows
  • Adding Graphics in Title Page
  • Adding Logos in Header or Footer
  • Adding Current Time and Date Information
  • Separating Chapter Number from Title
  • Footnotes
  • Marginalia
  • Endnotes
  • Adorning Paragraphs with Initials (Openings)
  • Formatting Titles
  • Numbering Titles
  • Choosing Open Source Fonts
  • Adding Change Bars
  • Initials/Drop Caps
  • Influence Leading in Flow Text (=line-height in paras)
  • Hyphenating in Verbatim Environments (long lines in screen, programlisting)
  • Showing Cropmarks
    http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/fo/advanced/bleed-and-crop-marks.fo?view=markup&pathrev=800143
  • Barcode
  • Add Typographical Superiors and Inferiors
  • Adding Fonts to FO Formatter
  • Creating Page Definitions with Inkscape
  • Styling Labels Differently than Titles (Separating Labels and Titles)
  • Using Text Figures http://en.wikipedia.org/wiki/Text_figures
  • Using MathML in Formulas
  • Influencing the TOC Bookmark Levels in PDF
  • Finding the correct Font Name
  • Hyphenating URLs

Ideas: (X)HTML Customizations

Moved from https://sourceforge.net/p/doccookbook/tickets/23/


These are some of the ideas about (X)HTML customizations. The list is no guarantee that all will be implemented.

Ideas: Common Customizations

Moved from https://sourceforge.net/p/doccookbook/tickets/20/


These are some of the ideas about common customizations. The list is no guarantee that all will be implemented.

Typo

Chapter 1, section 1.2 Selecting the Right Top Level Element, Discussion section

There a many more possible root elements, not only book.

It looks like a grammar error.
I think that it should be written as "There are many more possible root elements, not only book.
"

Adding Fonts to FO Formatter (Apache FOP)

Feature Description

A book should contain a topic concerning configuring and using fonts with FO-formatter. This topic will be Apache FOP related only.

Expected Wishlist

  1. How to configuring fonts (in general).
  2. What is autodetect and how it influence a look of the document.
  3. How someone should deal with the ##### signs instead of characters while rendering PDF file from DocBook document containing non-Latin character.

Relations

Not know yet.

Ideas: Markup

Moved from https://sourceforge.net/p/doccookbook/tickets/19/


These are some of the ideas about markup. Most is probably already mentioned in "The Definitive Guide" so not all can/will be implemented.

Tiny error in stylesheet

Reported from @sknorr via mail (found in http://doccookbook.sf.net/html/en/dbc.structure.move-blocks-in-para.html):

Example:

<para>
     This manual uses the following
     <!-- comment --><phrase>commands</phrase>:
     <screen>foo</screen>
</para>

Output is:

<para>
     This manual uses the following
</para>
<screen>foo</screen>

Patch:

diff --git i/en/xml/structure/remove-blocks-in-para/move-blocks-outof-para.xsl w/en/xml/structure/remove-blocks-in-para/move-blocks-outof-para.xsl
index 5f87f64..5ed971e 100644
--- i/en/xml/structure/remove-blocks-in-para/move-blocks-outof-para.xsl
+++ w/en/xml/structure/remove-blocks-in-para/move-blocks-outof-para.xsl
@@ -33,7 +33,7 @@
       select="following-sibling::*[&dbselfblocks;][1]"/>
   </xsl:template>
 
-  <xsl:template match="d:para/*|d:para/text()" mode="copy">
+  <xsl:template match="d:para/node()" mode="copy">

Investigate Assemblies

Problem

As a showcase, use assemblies in the future

Expected behaviour

  • The main file is an assembly file
  • The tool chain is adapted to produce the result from the assembly file

Ideas: Manipulating DocBook Document Structure

Moved from https://sourceforge.net/p/doccookbook/tickets/21/


These are some of the ideas about manipulating the DocBook document structure. The list is no guarantee that all will be implemented.

  • (Combining two DocBook documents with XSLT)
  • Modularizing DocBook Documents with Assemblies
  • Creating a RevHistory from RSS and Atom
  • Resolving XInclude Elements
  • Autogenerate indexterm ranges
  • Renaming Image Filenames
  • Checking Style Guide Issues with XSLT
  • Using other Placeholders (PIs, XIncludes, phrase...)
  • Using Entities as Placeholders
  • Preserving Entities #43

Ideas: Create Infrastructure Topic

Problem

Although DocBook does not enforce how you create your project, it could be helpful to give some information about the "things around DocBook".

Solution

Some ideas that could be integrated under this topic. The list is no guarantee that all will be implemented:

  • Creating a Structure for your DocBook Projects
  • Using the xmllint Shell to test XPath expressions
  • Managing your XML Catalogs
  • Managing your Workflow Tools
  • Using XML Parsers
  • Using a XSLT Processors
  • Using an XProc Processor
  • Choosing a XML Editor
  • Configuring FOP

Related issue: #11

Ideas: Investigate new Chapter about DocBook Toolchains

Moved from https://sourceforge.net/p/doccookbook/tickets/25/


It seems, there is an interested in a chapter about [a] DocBook toolchain(s). The chapter could explain what software/tools you need, how to install it, and how to use it.

Unfortunately, this is a (very?) broad topic. Requirements, operating systems, and steps differ a lot. As such, DocBook does not have an "official" toolchain.

Currently, it's not of high priority for me, although it would be probably very beneficial. If someone wants to take this over, please go ahead! :-)

[HTML] Document dbhtml PI

Is your feature request related to a problem? Please describe.
Describe the <?dbhtml?> processing instruction for chunking.

Additional context
HTML, related to #10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.