- The (un)Book (draft!)
- Appendix A - The Reputation Framework
- Appendix B - Related Resources
- Meta
-
This is an old revision of the document!
This book is being written in DocBook XML, which is the format that O'Reilly likes for cross publishing to paper, the web, and other forms. We're bringing that vision to the wiki as well. All the Chapters are being automatically translated via a scripted pipeline to Dokuwiki formatting and are posted here periodically.
I've hacked together something out of Saxon-B, and sed all running on Cygwin on my PC. Don't look below if you have a weak stomach.
— Randy
rm -f $1.doku cat $1 | sed -e 's/^[ \t]*//' | sed 's/<entry>/<entry align="center">/' >temp.doku java -jar saxon9.jar -t -s:temp.doku -xsl:docbook2dokuwiki.xsl -o:temp2.doku sed -e 's/</</' < temp2.doku | sed -e 's/>/>/' | tail +2 >$1.doku mv $1.doku . rm -f temp*.doku
The sed calls, in order:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="sect1/title"> ==== <xsl:apply-templates/> ==== </xsl:template> <xsl:template match="sect2/title"> === <xsl:apply-templates/> === </xsl:template> <xsl:template match="sect3/title"> == <xsl:apply-templates/> == </xsl:template> <xsl:template match="title"> ===== <xsl:apply-templates/> ===== </xsl:template> <xsl:template match="para"> <xsl:apply-templates/><xsl:text> </xsl:text> </xsl:template> <xsl:template match="emphasis">//<xsl:apply-templates/>//</xsl:template> <xsl:template match="itemizedlist/listitem"> * <xsl:apply-templates/></xsl:template> <xsl:template match="orderedlist/listitem"> - <xsl:apply-templates/></xsl:template> <xsl:template match="listitem/para"><xsl:apply-templates/><xsl:text> </xsl:text></xsl:template> <xsl:template match="sidebar"> <xsl:text><box center blue 75%></xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="sidebar/title">| <xsl:apply-templates/><xsl:text>></xsl:text></xsl:template> <xsl:template match="sidebar/para"> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> <xsl:template match="sidebar/variablelist"> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> <xsl:template match="variablelist"><xsl:apply-templates/></xsl:template> <xsl:template match="varlistentry"><xsl:apply-templates/></xsl:template> <xsl:template match="varlistentry/term"> * **<xsl:apply-templates/>**</xsl:template> <xsl:template match="varlistentry/listitem"> * <xsl:apply-templates/></xsl:template> <xsl:template match="varlistentry/para"><xsl:apply-templates/></xsl:template> <xsl:template match="informalfigure"><xsl:apply-templates/></xsl:template> <xsl:template match="figure"> == Figure: <xsl:value-of select="title"/> == <xsl:apply-templates/></xsl:template> <xsl:template match="figure/title"></xsl:template> <xsl:template match="mediaobject"><xsl:apply-templates/></xsl:template> <xsl:template match="imageobject"><xsl:apply-templates/></xsl:template> <xsl:template match="imagedata"> <html> <center> <img src="http://buildingreputation.com/lib/exe/fetch.php?media={@fileref}"/><xsl:value-of select="."/> </center> </html> </xsl:template> <xsl:template match="textobject"><xsl:text> </xsl:text></xsl:template> <xsl:template match="table"> === <xsl:value-of select="title"/> === <html> <table align="center" border="1"> <xsl:apply-templates/> </table> </html> </xsl:template> <xsl:template match="table/title"></xsl:template> <xsl:template match="tgroup"><xsl:apply-templates/></xsl:template> <xsl:template match="thead"> <thead> <xsl:apply-templates/> </thead> </xsl:template> <xsl:template match="tbody"> <tbody> <xsl:apply-templates/> </tbody> </xsl:template> <xsl:template match="row"> <tr> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="entry"><td align="{@align}"><xsl:value-of select="."/></td></xsl:template> <xsl:template match="remark"> <color gray>[Author's comment:<xsl:apply-templates/>] </color><xsl:text> </xsl:text> </xsl:template> <xsl:template match="caution"> <xsl:text><box red 75%>{{:caution_1_.gif}}**Caution:** </xsl:text> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> <xsl:template match="warning"> <xsl:text><box red 75%>{{:warning_1_.gif}}**Warning!** </xsl:text> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> <xsl:template match="tip"> <xsl:text><box blue 75%>{{tip_1_.gif}}**Tip:** </xsl:text> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> <xsl:template match="note"> <xsl:text><box green 75%>{{:note_1_.gif}}**Note:** </xsl:text> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> <xsl:template match="important"> <xsl:text><box orange 75%>{{:important_1_.gif}}**Important!** </xsl:text> <xsl:apply-templates/><xsl:text></box> </xsl:text> </xsl:template> </xsl:stylesheet>
This is oversimplified. Don't use it. Really. I can't believe I'm using it, but I am in a hurry at the moment. You'll need the box dokuwiki plugin and the art for the annotation such as Tip and Caution. I really need to track down the O'Reilly versions of those. Little animal tracks…