SlideShare a Scribd company logo
1 of 44
Download to read offline
The Case for Authoring
and Producing Books in
(X)HTML5
Balisage 2013
August 7, 2013
Sanders Kleinfeld
O’Reilly Media, Inc.
The Goal of
Publishing:
Packaging and
Distribution of Ideas
Publishing!
Traditional Publishing!
Traditional Publishing Process!
(Writing!) (Conversion!) (Printing!)
Digital Publishing!
(Post)Modern Publishing Process!
(Both Print and Digital)
(Writing!) (Conversion!)
(Conversion!)
(Printing!)
The Single-Source Solution:
Replace conversions with semantic
markup and automated transforms
<!/>!
ASC/DB Single-Source Workflow:
AsciiDoc
DocBook XML
asciidoc.py
DocBook XSL
EPUB Stylesheets
+ Custom CSS
EPUB
DocBook XSL
HTML5
Stylesheets
HTML5
Print PDF Web PDF
AntennaHouse +
Print CSS3
AntennaHouse +
Web CSS3
EPUB
DocBook XSL
EPUB Stylesheets
Custom XSL for
EPUB postprocessing
+ KF8/Mobi7 CSS
Mobi-ready EPUB
Kindlegen
Mobi (KF8)Source Content
Intermediate Output
Final Output For Sale
(optional; can start with DocBook)
Three Realizations
About a
DocBook-Source
Workflow
Realization #1:
DocBook XSL
toolchain is rather
heavyweight,
complex
DocBook XSL Toolchain Stats*
The XHTML5 stylesheets contain:
•  33,707 lines of HTML-generation code…
•  …which rely on 8,346 lines of common dependencies
Or, in terms of functions, they contain:
•  1,857 <xsl:template>s…
•  …which rely on 272 common dependency <xsl:template>s
* docbook-epub3-addon-b3!
Customization Use Case:
Find the code that generates XHTML
title page content for chapters, and
change it to use <h2> instead of <h1>
for title heading.
* chapter.titlepage.before.recto, chapter.titlepage.before.verso, and chapter.titlepage.verso are empty
in docbook-epub3-addon-b3 distro!
Customization Use Case:
Step by Step
1.  Start by finding <xsl:template match="chapter"> in
component.xsl, which calls…
2.  <xsl:template name="chapter.titlepage”> in
titlepage.templates.xsl, which in turn calls…
3.  <xsl:template name="chapter.titlepage.before.recto">,
<xsl:template name="chapter.titlepage.recto">,
<xsl:template name="chapter.titlepage.before.verso">, and
<xsl:template name="chapter.titlepage.verso">, which in
turn call…*
Customization Use Case:
Step by Step (continued)
4.  <xsl:template> matches on the elements chapterinfo/
title, docinfo/title, info/title, title,
chapterinfo/subtitle, docinfo/subtitle, info/
subtitle, and subtitle in
mode="chapter.titlepage.recto.auto.mode", which in
turn call…
5.  <xsl:template> matches on the elements chapterinfo/
title, docinfo/title, info/title, title,
chapterinfo/subtitle, docinfo/subtitle, info/
subtitle, and subtitle in
mode="chapter.titlepage.recto.mode", which in turn
call…
Customization Use Case:
Step by Step (continued)
6.  <xsl:template> matches on the elements chapterinfo/
title, docinfo/title, info/title, title, chapterinfo/
subtitle, docinfo/subtitle, info/subtitle, and
subtitle in mode="titlepage.mode" in titlepage.xsl which
in turn contain…
7.  The logic we’re looking for that outputs an <h1> element for
the chapter title. Hooray! We need to override
<xsl:template match="title" mode="titlepage.mode">!
Customizations in docbook-xsl:
Five Levels of EPUB Overrides
oneoff.xsl!
series.xsl!
core.xsl!
epub3-element-mods.xsl!
html5-element-mods.xsl!
xhtml stylesheets!
Oneoff customizations specific to a single book
Customizations specific to all books in a series
Customizations specific to *all* books
EPUB3-specific overrides
XHTML5-specific overrides
Base XHTML stylesheets
Hierarchy of overrides =
Photographer: Derek Mawhinney on Oct. 23, 2005 Subject: A game of [Jenga](r) in progress
Cafe Nervosa 21:19, 31 October 2005 (UTC)-- http://en.wikipedia.org/wiki/File:Jenga.JPG
This complexity is
a necessary evil,
emphasis on evil
Realization #2:
DocBook Not Ideal
for Digital-First
Content
Digital-First Content Development
When doing digital-first (ebook/web) content development,
these are the key output formats:
•  EPUB (2.0 and 3.0)
•  Amazon Kindle Mobi (Mobi7/KF8)
•  PDF
•  HTML
* docbook-epub3-addon-b3!
The Common Thread: HTML + CSS
* e.g., AntennaHouse Formatter or Prince!
= HTML + CSS + open source packaging
= HTML + CSS + proprietary packaging
= HTML + CSS + PDF processor*
= HTML + CSS (duh!)
Interactivity/Multimedia Is
Ultimately All About HTML5
<canvas>!
!
<audio>!
!
<video>!
!
<math>!
!
<svg>!
!
Realization #3:
Not All Authors
Love Writing in
DocBook 
Authors prefer
WYSIWYG authoring
platforms because…
“Nobody’s going to
learn your markup
language”
Books in Browsers 2012: Liza Daly & Keith Fahlgren,
“The self-publishing book”
http://www.youtube.com/watch?v=UWftLHopWQ0#t=5m25s
Non-Technical Authors Don’t Like This…
<?xml version="1.0" encoding="utf-8"?>!
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" !
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">!
<chapter>!
<title>Autobiography of Me</title>!
<para>I was born in 1980, I love chocolate ice cream, and I
am a <emphasis>wicked awesome</emphasis> writer, yo!</para>!
</chapter>!
DocBook
Non-Technical Authors Will
Sometimes Tolerate This…
== Autobiography of Me!
!
I was born in 1980, I love chocolate ice cream,
and I am a _wicked awesome_ writer, yo!!
AsciiDoc
But Non-Technical Authors
Really Want This…
Microsoft
Word
oXygen and XMLMind Do Make DocBook
Authorship More Accessible, but…
oXygen
XMLMind
This is the Future of
Digital Content
Creation:
Medium
(Short-Form Web Publishing)
O’Reilly
Atlas (Short and Long-Form Print,
Digital, and Web Publishing)
Next-Generation
Content Authoring =
•  WYSIWYG
•  Web-Based (Responsive Design)
•  Version-Controlled
•  Seamless
All Roads Lead to
(X)HTML5…
…But Is It Semantic
Enough for Book
Publishing?
Introducing
HTMLBook
(github.com/oreillymedia/htmlbook)
HTMLBook =
•  Open Spec for Book Authoring
•  Subsets XHTML5 Vocabulary and
Content Model
•  Adds Structural Semantics à la
DocBook
•  Open Source Tooling for Producing
Ebook Outputs
HTMLBook Schema
(github.com/oreillymedia/HTMLBook/blob/master/schema/
htmlbook.xsd)
<!-- Chapter/Appendix/Preface/etc. -->!
<xs:complexType name="bookmaindiv">!
  <xs:sequence>!
    <xs:element ref="h1"/>!
    <xs:element name="h2" minOccurs="0"
maxOccurs="unbounded" type="subheading"/>!
    <xs:group ref="blockelements" minOccurs="0"
maxOccurs="unbounded"/>!
    <xs:element name="section" minOccurs="0"
maxOccurs="unbounded" type="sect1"/>!
  </xs:sequence>!
  <!-- Note: special data-type attr restrictions here -->!
  <xs:attribute name="data-type" use="required"
type="bookmaindivtype"/>!
  <xs:attributeGroup ref="globals"/>!
</xs:complexType>!
HTMLBook Sample
(github.com/oreillymedia/HTMLBook/blob/master/samples/
htmlbook.html
<html xmlns="http://www.w3.org/1999/xhtml">!
  <head>!
    <title>HTMLBook Sample</title>!
  </head>!
  <body data-type="book" id="htmlbook">!
<section data-type="chapter" id="chapter01">!
       <h1>Chapter 1. HTMLBook Markup</h1>!
         <p>This chapter describes and demonstrates
the types of markup<a data-type="indexterm"  data-
primary="markup" data-secondary="types of"></a> that
might appear in a chapter. See <em>mappings.asciidoc</
em> for more information. HTMLBook borrows much of its
semantics from the EPUB 3 specification, as applied
via the <a href="http://idpf.org/accessibility/
guidelines/content/semantics/epub-
type.php"><code>epub:type</code></a> attribute.</p>!
</section>!
</body>!
</html>!
HTMLBook XSL
epub.xsl!
!ncx.xsl!
!opf.xsl!
!chunk.xsl!
! !htmlbook.xsl!
! ! !common.xsl!
! ! !elements.xsl!
! ! !indexgen.xsl!
! ! !param.xsl!
! ! !tocgen.xsl!
! ! !xrefgen.xsl!
(github.com/oreillymedia/HTMLBook/tree/master/htmlbook-xsl
HTMLBook XSL Toolchain Stats
The HTMLBook stylesheets contain:
•  2,982 lines of HTML-processing code…
(91% reduction from docbook-xsl)
•  …which rely on 406 lines of common dependencies
Or, in terms of functions, they contain:
•  73 <xsl:template>s…
(96% reduction from docbook-xsl)
•  …which rely on 16 common dependency <xsl:template>s
XHTML5 Single-Source Workflow:
XHTML5
EPUB Print PDF Web PDF
AntennaHouse
+ Print CSS3
AntennaHouse
+ Web CSS3
EPUB
Custom XSL for
EPUB postprocessing
+ KF8/Mobi7 CSS
Mobi-ready EPUB
Kindlegen
Mobi (KF8)
Source Content
Intermediate Output
Final Output For Sale
Packaging XSL
+ CSS
Packaging XSL
+ CSS
Contact Me!
Email: sanders@oreilly.com
Twitter: @sandersk

More Related Content

What's hot

Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go Eylem Ozekin
 
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018BookNet Canada
 
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>tutorialsruby
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Neha Sharma
 
Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018BookNet Canada
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5nobel mujuji
 
No folders: A workspace that organizes for you
No folders: A workspace that organizes for youNo folders: A workspace that organizes for you
No folders: A workspace that organizes for youBen Foden
 
Perspectives on the Evolution of HTML
Perspectives on the Evolution of HTMLPerspectives on the Evolution of HTML
Perspectives on the Evolution of HTMLDaniel Austin
 
Tools to help you join the self publishing revolution
Tools to help you join the self publishing revolutionTools to help you join the self publishing revolution
Tools to help you join the self publishing revolutionsaturdayplace
 
What PressBooks Does to WordPress
What PressBooks Does to WordPressWhat PressBooks Does to WordPress
What PressBooks Does to WordPressHugh McGuire
 
Incremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend DevelopmentIncremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend DevelopmentAkihiro Ikezoe
 
Code & Design Your First Website (Downtown Los Angeles)
Code & Design Your First Website (Downtown Los Angeles)Code & Design Your First Website (Downtown Los Angeles)
Code & Design Your First Website (Downtown Los Angeles)Thinkful
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Mike Schinkel
 
The Augmented Wiki
The Augmented WikiThe Augmented Wiki
The Augmented WikiEugene Kim
 
Code & Design your first website 4/18
Code & Design your first website 4/18Code & Design your first website 4/18
Code & Design your first website 4/18TJ Stalcup
 
Developing a Web Application
Developing a Web ApplicationDeveloping a Web Application
Developing a Web ApplicationRabab Gomaa
 
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...Matt Weaver
 

What's hot (20)

Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go
 
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
 
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018
 
XML and EPUB
XML and EPUBXML and EPUB
XML and EPUB
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
Class1slides
Class1slidesClass1slides
Class1slides
 
No folders: A workspace that organizes for you
No folders: A workspace that organizes for youNo folders: A workspace that organizes for you
No folders: A workspace that organizes for you
 
Perspectives on the Evolution of HTML
Perspectives on the Evolution of HTMLPerspectives on the Evolution of HTML
Perspectives on the Evolution of HTML
 
Tools to help you join the self publishing revolution
Tools to help you join the self publishing revolutionTools to help you join the self publishing revolution
Tools to help you join the self publishing revolution
 
Html lesson1 5
Html lesson1 5Html lesson1 5
Html lesson1 5
 
What PressBooks Does to WordPress
What PressBooks Does to WordPressWhat PressBooks Does to WordPress
What PressBooks Does to WordPress
 
Incremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend DevelopmentIncremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend Development
 
Code & Design Your First Website (Downtown Los Angeles)
Code & Design Your First Website (Downtown Los Angeles)Code & Design Your First Website (Downtown Los Angeles)
Code & Design Your First Website (Downtown Los Angeles)
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)
 
The Augmented Wiki
The Augmented WikiThe Augmented Wiki
The Augmented Wiki
 
Code & Design your first website 4/18
Code & Design your first website 4/18Code & Design your first website 4/18
Code & Design your first website 4/18
 
Developing a Web Application
Developing a Web ApplicationDeveloping a Web Application
Developing a Web Application
 
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
 

Similar to The Case for Authoring and Producing Books in (X)HTML5

UNC Chapel Hill 2014 CTC Retreat - Creating epub e books
UNC Chapel Hill 2014 CTC Retreat - Creating epub e booksUNC Chapel Hill 2014 CTC Retreat - Creating epub e books
UNC Chapel Hill 2014 CTC Retreat - Creating epub e booksJonathan Pletzke
 
XML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured dataXML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured dataMarco Gralike
 
XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...
XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...
XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...BookNet Canada
 
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2Marco Gralike
 
Introduction To Docbook 4 .5 Authoring
Introduction To Docbook 4 .5   AuthoringIntroduction To Docbook 4 .5   Authoring
Introduction To Docbook 4 .5 AuthoringViswanath J
 
Introduction to Drupal (7) Theming
Introduction to Drupal (7) ThemingIntroduction to Drupal (7) Theming
Introduction to Drupal (7) ThemingRobert Carr
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bagstuplum
 
EPUB - a workshop for beginners
EPUB - a workshop for beginnersEPUB - a workshop for beginners
EPUB - a workshop for beginnersBeat Oderbolz
 
From XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The DetailsFrom XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The DetailsRichard Hamilton
 
Technical writing tools
Technical writing toolsTechnical writing tools
Technical writing toolsAnil Menon
 
Getting Started With Xsl Templates
Getting Started With Xsl TemplatesGetting Started With Xsl Templates
Getting Started With Xsl TemplatesWill Trillich
 
Creating Fixed-Layout EPUBs
Creating Fixed-Layout EPUBsCreating Fixed-Layout EPUBs
Creating Fixed-Layout EPUBsLaura Brady
 
The XML Forms Architecture
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms ArchitectureiText Group nv
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Aslam Najeebdeen
 
Codegeneration Goodies
Codegeneration GoodiesCodegeneration Goodies
Codegeneration Goodiesmeysholdt
 

Similar to The Case for Authoring and Producing Books in (X)HTML5 (20)

UNC Chapel Hill 2014 CTC Retreat - Creating epub e books
UNC Chapel Hill 2014 CTC Retreat - Creating epub e booksUNC Chapel Hill 2014 CTC Retreat - Creating epub e books
UNC Chapel Hill 2014 CTC Retreat - Creating epub e books
 
XML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured dataXML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured data
 
XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...
XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...
XSLT 3 for EPUB and Print - Liam R.E. Quin (Barefoot Computing) - ebookcraft ...
 
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
 
Introduction To Docbook 4 .5 Authoring
Introduction To Docbook 4 .5   AuthoringIntroduction To Docbook 4 .5   Authoring
Introduction To Docbook 4 .5 Authoring
 
Chapter4
Chapter4Chapter4
Chapter4
 
Interactive E-Books
Interactive E-BooksInteractive E-Books
Interactive E-Books
 
Introduction to Drupal (7) Theming
Introduction to Drupal (7) ThemingIntroduction to Drupal (7) Theming
Introduction to Drupal (7) Theming
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
XSLT for Web Developers
XSLT for Web DevelopersXSLT for Web Developers
XSLT for Web Developers
 
EPUB - a workshop for beginners
EPUB - a workshop for beginnersEPUB - a workshop for beginners
EPUB - a workshop for beginners
 
From XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The DetailsFrom XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The Details
 
Technical writing tools
Technical writing toolsTechnical writing tools
Technical writing tools
 
Getting Started With Xsl Templates
Getting Started With Xsl TemplatesGetting Started With Xsl Templates
Getting Started With Xsl Templates
 
Intro to-html5
Intro to-html5Intro to-html5
Intro to-html5
 
Creating Fixed-Layout EPUBs
Creating Fixed-Layout EPUBsCreating Fixed-Layout EPUBs
Creating Fixed-Layout EPUBs
 
The XML Forms Architecture
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms Architecture
 
Down and Dirty EPUB 3
Down and Dirty EPUB 3Down and Dirty EPUB 3
Down and Dirty EPUB 3
 
Web Design Bootcamp - Day1
Web Design Bootcamp - Day1Web Design Bootcamp - Day1
Web Design Bootcamp - Day1
 
Codegeneration Goodies
Codegeneration GoodiesCodegeneration Goodies
Codegeneration Goodies
 

Recently uploaded

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

Recently uploaded (20)

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

The Case for Authoring and Producing Books in (X)HTML5

  • 1. The Case for Authoring and Producing Books in (X)HTML5 Balisage 2013 August 7, 2013 Sanders Kleinfeld O’Reilly Media, Inc.
  • 2. The Goal of Publishing: Packaging and Distribution of Ideas
  • 5. Traditional Publishing Process! (Writing!) (Conversion!) (Printing!)
  • 7. (Post)Modern Publishing Process! (Both Print and Digital) (Writing!) (Conversion!) (Conversion!) (Printing!)
  • 8. The Single-Source Solution: Replace conversions with semantic markup and automated transforms <!/>!
  • 9. ASC/DB Single-Source Workflow: AsciiDoc DocBook XML asciidoc.py DocBook XSL EPUB Stylesheets + Custom CSS EPUB DocBook XSL HTML5 Stylesheets HTML5 Print PDF Web PDF AntennaHouse + Print CSS3 AntennaHouse + Web CSS3 EPUB DocBook XSL EPUB Stylesheets Custom XSL for EPUB postprocessing + KF8/Mobi7 CSS Mobi-ready EPUB Kindlegen Mobi (KF8)Source Content Intermediate Output Final Output For Sale (optional; can start with DocBook)
  • 11. Realization #1: DocBook XSL toolchain is rather heavyweight, complex
  • 12. DocBook XSL Toolchain Stats* The XHTML5 stylesheets contain: •  33,707 lines of HTML-generation code… •  …which rely on 8,346 lines of common dependencies Or, in terms of functions, they contain: •  1,857 <xsl:template>s… •  …which rely on 272 common dependency <xsl:template>s * docbook-epub3-addon-b3!
  • 13. Customization Use Case: Find the code that generates XHTML title page content for chapters, and change it to use <h2> instead of <h1> for title heading.
  • 14. * chapter.titlepage.before.recto, chapter.titlepage.before.verso, and chapter.titlepage.verso are empty in docbook-epub3-addon-b3 distro! Customization Use Case: Step by Step 1.  Start by finding <xsl:template match="chapter"> in component.xsl, which calls… 2.  <xsl:template name="chapter.titlepage”> in titlepage.templates.xsl, which in turn calls… 3.  <xsl:template name="chapter.titlepage.before.recto">, <xsl:template name="chapter.titlepage.recto">, <xsl:template name="chapter.titlepage.before.verso">, and <xsl:template name="chapter.titlepage.verso">, which in turn call…*
  • 15. Customization Use Case: Step by Step (continued) 4.  <xsl:template> matches on the elements chapterinfo/ title, docinfo/title, info/title, title, chapterinfo/subtitle, docinfo/subtitle, info/ subtitle, and subtitle in mode="chapter.titlepage.recto.auto.mode", which in turn call… 5.  <xsl:template> matches on the elements chapterinfo/ title, docinfo/title, info/title, title, chapterinfo/subtitle, docinfo/subtitle, info/ subtitle, and subtitle in mode="chapter.titlepage.recto.mode", which in turn call…
  • 16. Customization Use Case: Step by Step (continued) 6.  <xsl:template> matches on the elements chapterinfo/ title, docinfo/title, info/title, title, chapterinfo/ subtitle, docinfo/subtitle, info/subtitle, and subtitle in mode="titlepage.mode" in titlepage.xsl which in turn contain… 7.  The logic we’re looking for that outputs an <h1> element for the chapter title. Hooray! We need to override <xsl:template match="title" mode="titlepage.mode">!
  • 17. Customizations in docbook-xsl: Five Levels of EPUB Overrides oneoff.xsl! series.xsl! core.xsl! epub3-element-mods.xsl! html5-element-mods.xsl! xhtml stylesheets! Oneoff customizations specific to a single book Customizations specific to all books in a series Customizations specific to *all* books EPUB3-specific overrides XHTML5-specific overrides Base XHTML stylesheets
  • 18. Hierarchy of overrides = Photographer: Derek Mawhinney on Oct. 23, 2005 Subject: A game of [Jenga](r) in progress Cafe Nervosa 21:19, 31 October 2005 (UTC)-- http://en.wikipedia.org/wiki/File:Jenga.JPG
  • 19. This complexity is a necessary evil, emphasis on evil
  • 20. Realization #2: DocBook Not Ideal for Digital-First Content
  • 21. Digital-First Content Development When doing digital-first (ebook/web) content development, these are the key output formats: •  EPUB (2.0 and 3.0) •  Amazon Kindle Mobi (Mobi7/KF8) •  PDF •  HTML * docbook-epub3-addon-b3!
  • 22. The Common Thread: HTML + CSS * e.g., AntennaHouse Formatter or Prince! = HTML + CSS + open source packaging = HTML + CSS + proprietary packaging = HTML + CSS + PDF processor* = HTML + CSS (duh!)
  • 23. Interactivity/Multimedia Is Ultimately All About HTML5 <canvas>! ! <audio>! ! <video>! ! <math>! ! <svg>! !
  • 24. Realization #3: Not All Authors Love Writing in DocBook 
  • 26. “Nobody’s going to learn your markup language” Books in Browsers 2012: Liza Daly & Keith Fahlgren, “The self-publishing book” http://www.youtube.com/watch?v=UWftLHopWQ0#t=5m25s
  • 27. Non-Technical Authors Don’t Like This… <?xml version="1.0" encoding="utf-8"?>! <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" ! "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">! <chapter>! <title>Autobiography of Me</title>! <para>I was born in 1980, I love chocolate ice cream, and I am a <emphasis>wicked awesome</emphasis> writer, yo!</para>! </chapter>! DocBook
  • 28. Non-Technical Authors Will Sometimes Tolerate This… == Autobiography of Me! ! I was born in 1980, I love chocolate ice cream, and I am a _wicked awesome_ writer, yo!! AsciiDoc
  • 29. But Non-Technical Authors Really Want This… Microsoft Word
  • 30. oXygen and XMLMind Do Make DocBook Authorship More Accessible, but… oXygen XMLMind
  • 31. This is the Future of Digital Content Creation:
  • 33. O’Reilly Atlas (Short and Long-Form Print, Digital, and Web Publishing)
  • 34. Next-Generation Content Authoring = •  WYSIWYG •  Web-Based (Responsive Design) •  Version-Controlled •  Seamless
  • 35. All Roads Lead to (X)HTML5…
  • 36. …But Is It Semantic Enough for Book Publishing?
  • 38. HTMLBook = •  Open Spec for Book Authoring •  Subsets XHTML5 Vocabulary and Content Model •  Adds Structural Semantics à la DocBook •  Open Source Tooling for Producing Ebook Outputs
  • 39. HTMLBook Schema (github.com/oreillymedia/HTMLBook/blob/master/schema/ htmlbook.xsd) <!-- Chapter/Appendix/Preface/etc. -->! <xs:complexType name="bookmaindiv">!   <xs:sequence>!     <xs:element ref="h1"/>!     <xs:element name="h2" minOccurs="0" maxOccurs="unbounded" type="subheading"/>!     <xs:group ref="blockelements" minOccurs="0" maxOccurs="unbounded"/>!     <xs:element name="section" minOccurs="0" maxOccurs="unbounded" type="sect1"/>!   </xs:sequence>!   <!-- Note: special data-type attr restrictions here -->!   <xs:attribute name="data-type" use="required" type="bookmaindivtype"/>!   <xs:attributeGroup ref="globals"/>! </xs:complexType>!
  • 40. HTMLBook Sample (github.com/oreillymedia/HTMLBook/blob/master/samples/ htmlbook.html <html xmlns="http://www.w3.org/1999/xhtml">!   <head>!     <title>HTMLBook Sample</title>!   </head>!   <body data-type="book" id="htmlbook">! <section data-type="chapter" id="chapter01">!        <h1>Chapter 1. HTMLBook Markup</h1>!          <p>This chapter describes and demonstrates the types of markup<a data-type="indexterm"  data- primary="markup" data-secondary="types of"></a> that might appear in a chapter. See <em>mappings.asciidoc</ em> for more information. HTMLBook borrows much of its semantics from the EPUB 3 specification, as applied via the <a href="http://idpf.org/accessibility/ guidelines/content/semantics/epub- type.php"><code>epub:type</code></a> attribute.</p>! </section>! </body>! </html>!
  • 41. HTMLBook XSL epub.xsl! !ncx.xsl! !opf.xsl! !chunk.xsl! ! !htmlbook.xsl! ! ! !common.xsl! ! ! !elements.xsl! ! ! !indexgen.xsl! ! ! !param.xsl! ! ! !tocgen.xsl! ! ! !xrefgen.xsl! (github.com/oreillymedia/HTMLBook/tree/master/htmlbook-xsl
  • 42. HTMLBook XSL Toolchain Stats The HTMLBook stylesheets contain: •  2,982 lines of HTML-processing code… (91% reduction from docbook-xsl) •  …which rely on 406 lines of common dependencies Or, in terms of functions, they contain: •  73 <xsl:template>s… (96% reduction from docbook-xsl) •  …which rely on 16 common dependency <xsl:template>s
  • 43. XHTML5 Single-Source Workflow: XHTML5 EPUB Print PDF Web PDF AntennaHouse + Print CSS3 AntennaHouse + Web CSS3 EPUB Custom XSL for EPUB postprocessing + KF8/Mobi7 CSS Mobi-ready EPUB Kindlegen Mobi (KF8) Source Content Intermediate Output Final Output For Sale Packaging XSL + CSS Packaging XSL + CSS