Skip to content
Snippets Groups Projects
Commit a443ec53 authored by Goik Martin's avatar Goik Martin
Browse files

Doc separation of concerns

parent bca69293
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
XmlCross/Ref/Intro/html5Sample.png

18.2 KiB

This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Html 5 sample</title>
</head>
<body>
<section>
<h1>Introduction</h1>
<p>Some content</p>
</section>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<book version="5.0" xml:id="xmlc" xmlns="http://docbook.org/ns/docbook"
<book version="5.1" xml:id="xmlc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi="http://www.w3.org/2001/XInclude"
......@@ -22,10 +22,13 @@
</author>
</info>
<chapter xml:id="chap_Overview">
<chapter annotations="slide" xml:id="chap_Overview">
<title>Overview</title>
<figure annotations="slide" xml:id="xmlc_fig_MultiFormat">
<para>Single source publishing aims at creating different output formats
from a given document source:</para>
<figure xml:id="xmlc_fig_MultiFormat">
<title>Single source publishing</title>
<mediaobject>
......@@ -35,7 +38,12 @@
</mediaobject>
</figure>
<figure annotations="slide" xml:id="xmlc_fig_DocSeparate">
<para>Conceptionally each format implements a view to our source in
question. Separating a document's structure from its derived (visual)
presentation greatly facilitates this task. From an abstract perspective
we may conceive a document having:</para>
<figure xml:id="xmlc_fig_DocSeparate">
<title>Separating Structure, content and format</title>
<mediaobject>
......@@ -45,14 +53,98 @@
</mediaobject>
</figure>
<figure annotations="slide" xml:id="xmlc_fig_LaTeXexample">
<para>We shed some light on a document's structure and
presentation:</para>
<figure xml:id="xmlc_fig_StructureHtml">
<title>HTML 5 pure structure</title>
<informaltable border="1">
<tr>
<th>Structure</th>
<th>Presentation</th>
</tr>
<tr>
<td><programlisting language="xml">&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;Test&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;section&gt;
&lt;h1&gt;Intro&lt;/h1&gt;
&lt;p&gt;Some content&lt;/p&gt;
&lt;/section&gt;
&lt;/body&gt;
&lt;/html&gt;</programlisting></td>
<td><mediaobject>
<imageobject>
<imagedata fileref="Ref/Intro/html5Sample.png" valign="top"/>
</imageobject>
</mediaobject></td>
</tr>
</informaltable>
</figure>
<para>Separating a document's structure from its presentation(s) provides
a number of benefits:</para>
<figure xml:id="xmlc_fig_benefitsBySeparation">
<title>Separating structure and presentation(s)</title>
<informaltable border="1">
<tr>
<th>Pros</th>
<th>Cons</th>
</tr>
<tr>
<td><itemizedlist>
<listitem>
<para>Separation of editing / formatting concerns</para>
</listitem>
<listitem>
<para>Focus on content rather than formatting</para>
</listitem>
<listitem>
<para>Oblivious to format evolution (e.g. Epub)</para>
</listitem>
<listitem>
<para>Well suited for SCM, <quote>diff-ing</quote></para>
</listitem>
</itemizedlist></td>
<td valign="top"><itemizedlist>
<listitem>
<para>No <quote>true</quote> WYSIWYG</para>
</listitem>
<listitem>
<para>Fixed formatting rules, no flexibility</para>
</listitem>
<listitem>
<para>Less layout control, especially in print</para>
</listitem>
</itemizedlist></td>
</tr>
</informaltable>
</figure>
<figure xml:id="xmlc_fig_LaTeXexample">
<title>Using LaTeX</title>
<informaltable border="1">
<tr>
<th>Code</th>
<th>Structure / content</th>
<th>Generated PDF</th>
<th>Presentation (PDF)</th>
</tr>
<tr valign="top">
......@@ -77,8 +169,7 @@
</informaltable>
</figure>
<figure annotations="slide" xml:base="xmlc_fig_ProsCons"
xml:id="xmlc_fig_TexProsCons">
<figure xml:base="xmlc_fig_ProsCons" xml:id="xmlc_fig_TexProsCons">
<title>Pros and cons of TeX / LaTeX</title>
<informaltable border="1">
......@@ -121,7 +212,7 @@
</listitem>
<listitem>
<para>Authoring tool support</para>
<para>Bad authoring <quote>office</quote> tool support</para>
<itemizedlist>
<listitem>
......@@ -129,7 +220,11 @@
</listitem>
<listitem>
<para>Inverse authoring</para>
<para>Inverse editing</para>
</listitem>
<listitem>
<para>Cryptic messages</para>
</listitem>
</itemizedlist>
</listitem>
......
......@@ -96,7 +96,7 @@
</xsl:template>
<xsl:template match="d:chapter|d:section" mode="slideDescendants">
<xsl:apply-templates select="*" mode="slideDescendants"/>
<xsl:apply-templates select="d:section|d:figure" mode="slideDescendants"/>
</xsl:template>
<xsl:template match="d:title" mode="slideDescendants"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment