Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
xml:id
and permalinkLecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
<title>
elements
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Extensibility
Define your grammar
XML core extensions (linking,...)
Interoperability
Cross-platform software support
Open standard, no vendor lock-in
Tons of (processing) frameworks / APIs
Quote from How and Why Are Companies Using XML?.
It's Not about You! It is about publishers.
they think it's “their” content
they want
to use it, re-use it, slice it, and dice it
to own it and control it
to have access to it and be able to move it
XML for publishing ...
saves time and money
is platform independent
avoids vendor lock-in
can be validated for QA
allows for creating different target formats
Refrain from fancy catalogs
Stick to simple layouts
Technical documentation
Law publications
Words, images, audio / video
Chapters / sections, tables, lists
Physical formatting (boldface, text size/color, ...)
Structure | Presentation |
---|---|
|
Structure / content | Presentation (PDF) |
---|---|
|
Pros | Cons |
---|---|
|
|
Well structured documents
Focus on content rather than style
Clearly defined semantics
Automated generation supporting multiple output channels
Pros | Cons |
---|---|
|
|
HTML |
|
Docbook |
|
---|---|---|---|
LaTeX |
|
Rendering |
First section |
HTML |
|
---|---|
Docbook |
|
LaTeX |
|
|
|
<section version="5.1"
xmlns="http://docbook.org/ns/docbook"
...>
<title>A Title</title>
<para>A paragraph</para>
</section>
Software specific support:
|
|
|
|
|
Different HTML versions
Static text
Single or chunked output
No full text search
HTML 5 based
Client side full text search index by virtue of JavaScript (Apache Lucene)
JavaScript based navigation
3-rd party tool integration e.g. MathJax
|
Focus on Formatting Objects
Multiple formatting engines
Multiple print formats
View | Docbook | HTML |
---|---|---|
Some text. |
|
<p style='color:red'
>Some text.</p> |
Caution: No style / formatting related parameters in Docbook.
This is by design and on purpose.
Reference: See Paragraph elements.
View | Docbook | HTML |
---|---|---|
.
|
|
|
View | Docbook | HTML |
---|---|---|
””.
|
|
|
View | Docbook | HTML |
---|---|---|
.
|
|
|
View | Docbook | HTML |
---|---|---|
.
|
|
|
See List elements.
View | Docbook | HTML |
---|---|---|
. |
|
|
View | Docbook | HTML |
---|---|---|
|
|
|
Docbook | HTML |
---|---|
|
|
$ |x| = \left\{ \begin{array}{rl} -x
&\mbox{if $x<0$} \\ x &\mbox{otherwise}
\end{array} \right.$
|
See Formal elements.
Mountain spring |
|
.
|
|
Video courtesy of Big Buck Bunny. |
|
View | Docbook |
---|---|
CautionBeware of overheating! |
|
See Admonition elements: important, note, tip, warning.
|
|
|
|
See <chapter>
,
<section>
,
<sect1>
,
<sect2>
,
<sect3>
,
<sect4>
,
<5>
, <sect5>
,
<sect6>
,
<simplesect>
,
<refentry>
.
Referential integrity by ID / IDREF constraints:
<chapter id="intro">
...
<chapter> ...
See <xref linkend="intro"/> ...
These are “usual” hypertext links:
<para>See
<link href="http://tdg.docbook.org">Docbook</link>
.</para>
|
|
<chapter id="introduction" ❶> ... <section xml:id="firstSection" ❶> <title>First section</title> <para>A stable link</para> </section> <section> <!-- no xml:id attribute--> <title>Second section</title> <para>No stable link</para> ... |
<!-- file introduction.html --> <html> ... <h2 id="firstSection" ❶>First section</h2> <p>A stable link</p> <h2 id="d03213" ❷>Second section</h2> <p>No stable link</p> |
❶ |
The page's URI based on |
❷ |
Stable
|
❸ |
Unstable
|
Important elements (<chapter>
,
<section>
, <table>
...) must provide an
xml:id value.
Modify underlying RelaxNG schema.
Result: Restricted schema (Inheritance relationship)
Add Schematron integrity rule on top of schema.
<s:pattern>
<s:title>Mandatory Id definition constraint</s:title>
<s:rule context="db:chapter|db:section|db:table|db:qandaset">
<s:assert test="@xml:id"
>Each chapter,section, table ... must have a unique id.</s:assert>
</s:rule>
</s:pattern>
<book ...> <title>XML for Newbies</title> <chapter xml:id="intro"> <title>Introduction</title> <para>...</para> </chapter> <chapter xml:id="work"> <title>Working with objects</title> <para>...</para> </chapter> </book> |
Navigation structure.
|
Synthetically generated filenames.
<book ...> <title>XML for Newbies</title> <chapter xml:id="intro"> <title>Introduction</title> <para>...</para> </chapter> <chapter xml:id="work"> <title>Working with objects</title> <para>...</para> </chapter> </book> |
Navigation structure.
|
Providing link stability:
<xsl:template match="d:videodata">
<video controls="controls" preload="auto">
<xsl:attribute name="title">
<xsl:value-of select="normalize-space(../../../d:title)"/>
</xsl:attribute>
<xsl:variable name="imageFilename">
<xsl:call-template name="mediaobject.filename">
<xsl:with-param name="object" select=".."/>
</xsl:call-template>
</xsl:variable>
<source src="{$imageFilename}" type='video/mp4' />
<source src="{$imageFilename}.ogv"/>
</video>
</xsl:template>
div.example > p.title,
div.figure > p.title,fig
div.table > p.title,
div.procedure > p.title,
div.equation > p.title {
color: #394986;
font-weight: bold;
}
CSS
Plugins e.g. representing tables.
Folding mode by CSS.
Multiple author editing conflicts
User interface limits
No document component reuse
<book version="5.1" xmlns="http://docbook.org/ns/docbook"> <chapter version="5.1" xml:id="start"> <title>Start</title> <para>See <xref linkend="intro" ❶/>.</para> </chapter> <chapter xml:id="intro" ❷> <title>Introduction</title> <para>Basic stuff.</para> </chapter> </book>
<book version="5.1" ❶ xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"> ❷ <xi:include href="start.xml" ❸ xpointer="element(/1)"/> ❹ <xi:include href="intro.xml" ❺ xpointer="element(/1)"/> ❻ </book> |
<chapter version="5.1" ❶ xmlns="http://docbook.org/ns/docbook"> <title>Start</title> <para>See <xref linkend="intro"/>.</para> </chapter> |
<chapter version="5.1" ❶ xmlns="http://docbook.org/ns/docbook"> <title>Introduction</title> <para>Basic stuff.</para> </chapter> |
Schema | Doc instance |
---|---|
|
|
Problem regarding Figure 664, “Single source publishing”:
|
|
<xsl:template match="/book">
<html>
<head> ... </head>
<body>
<h1>
<xsl:value-of select="title"/>
</h1>
</body>
</html>
</xsl:template>
|
|
gets converted to: |
|
|
Further reading starting from Online and print versions.
“Hello, world ...” style sample FO document.