forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schäfer <johannes.schae...@uidesign.de>
Subject RE: sDocBook <note><title>...</title></note>
Date Tue, 27 Jul 2004 07:17:03 GMT
> -----Original Message-----
> From: Juan Jose Pablos [mailto:cheche@che-che.com] 
> 
> Johannes Schäfer escribió:
> > Hi!
> > sDockBook allows a <title> within a <note>. 
> > The code below shows what I've come up with
> > (in common/.../document2html).
> > 
> > We use it like this:
> > <note>
> >   <title>: Title for this note</title>
> >   ...
> > </note>
> > The ":" is needed since I don't know 
> > how to put this into XSL:
> >   if( title ) ": ".title 
> > or even without the "Note".
> > 

> I think that the best approach is to come with the docbook source and 
> the html output that you would like to output. This way we could find 
> the best way to implement it..

Have you seen the "code below" that I've
put into document2html.xsl? Meant: "at the 
end of the mail" ... here it is again:

  <xsl:template match="note | warning | fixme">
    <xsl:apply-templates select="@id"/>
    <div class="frame {local-name()}">
      <div class="label">
        <xsl:choose>
          <xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
          <xsl:when test="local-name() = 'note'">Note<!-- 
js --><xsl:value-of select="title"/>
		  </xsl:when>
          <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
          <xsl:otherwise>Fixme (<xsl:value-of
select="@author"/>)</xsl:otherwise>
        </xsl:choose>
      </div>
      <div class="content">
        <xsl:apply-templates/>
      </div>
    </div>
  </xsl:template>

So, I have a solution but not a perfect one.
Better would be either to have a "Note: "+title   
or even just the title with the corresponding
blue bars and the info-icon. This would involve
checking if there is a <title> present and I
don't know how to do this. If there's no title
simply "Note" may be used/displayed (as is now).

Cheers,
Johannes


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 * D-81825
München
www.uidesign.de



Mime
View raw message