This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Interactive reading


Overriding templates in the docbook xsls could get messy. The stylesheet
below avoids that by using apply-imports. It causes the elements to be
processed with the imported docbook templates, but then you have a
chance to write in whatever markup you need. The reason I do table and
informaltable separately like that is because they both can occur inside
para, but also can occur as block level elements as peers to other
paras. I add the not(ancestor::table) to avoid having the 'comment'
button showing up in every cell in a table. There are probably other
cases besides these you'll have to account for that aren't occurring to
me right now. 

Btw., I think an annotation mechanism like you describe would be a nice
feature. Please let me know what you come up with.

Thanks,
David

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

  <xsl:import href="path_to/html/docbook.xsl"/>

<xsl:output method="html"
            encoding="ISO-8859-1"
            indent="no"/>

  <xsl:template match="para[not(ancestor::table)]">
    <xsl:apply-imports/>
    <!-- Your stuff here -->
  </xsl:template>

  <xsl:template match="table[not(parent::para)] |
informaltable[not(parent::para)]">
    <xsl:apply-imports/>
    <!-- Your stuff here -->
  </xsl:template>

</xsl:stylesheet>

-----Original Message-----
From: Joachim Ziegler [mailto:ziegler@algorilla.de]
Sent: Sunday, September 15, 2002 11:26 AM
To: docbook-apps@lists.oasis-open.org
Subject: Re: DOCBOOK-APPS: Interactive reading


Am Donnerstag, 12. September 2002 19:05 schrieb Dave Pawson:
> The W3C have this thing called Annotea which is essentially
> the same thing.... but for HTML?
>
> Regards DaveP

but you need a special server and a special browser to make and view
these 
annotations.

this is more complicated than simply embedding the annotations in plain
HTML.

btw, is there an easy possiblity to extend the DocBook Stylesheets, so
that 
after normal processing of a <para>, I can add some special markup to
the 
final output (something like a "hook")?

this would help me to built an easy to use annotation mechanism.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]