[dokusite] XML, XSLT: Caution und Note: Soll der Titel (z.B. Achtung) eingabef?hig sein oder per default stehen?

"Roger Fischer" <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general.german
Message-ID <[email protected]>
Caution und Note auf:
http://nbwz.bitflux.ch/introductions/cms/


Hier im Vergleich der eingegebene Text (Tag View)
-------------------------------------------------
(Docbook Tags, siehe www.docbook.org; einzige Abweichung: titel statt title)

<section><titel>Deutscher Untertitel</titel>
<para>
 I don't particullary enjoy talking about myself. But since you are reading
this, there must be the slighest of interest.
</para>
<para>
Since 1992 I have been working as a designer or programmer or one sort or
another. I've worked in such exotic places as Livermore, Berkeley, and
Irvine California. I've also worked in less interesting places like San
Francisco, Paris, Zurich and Hamburg.
<caution>Passen Sie auf mit wellformed Monorom Design:).</caution>
</para>
<para>
Being a native California gives me a great advantage over non-natives. I'm
not sure what that advantage is, but I am sure it is there. I have never
surfed and I am a poor skateboarder. I do say 'dude' often.
</para>
<note>Dies ist eine Anmerkung. Dies ist eine Anmerkung. Dies ist eine
Anmerkung. Dies ist eine Anmerkung. Dies ist eine deutsche Anmerkung in
einem englischen Text.</note>

<para>
I enjoy romantic strolls, cilantro and the evening news.
<note><title>I LOVE</title>I love the sea.</note>
 I'm a water symbol, which perhaps explains why I fear waking up in Salt
Late City, Moscow or in jail. I dislike petrol and those who hate country
music. They really should listen to more country music, there is some good
country music, I just can't name it.
</para>
<para>
** If you would like to help me escape from Berkeley, send cash, design
work, coding jobs, or water. And I'm running low on first aid supplies and
5.56mm rounds. A subway map of Tokyo would also be great.
</para>
</section>


Frage zu Caution (analog bei Note):
-----------------------------------
Soll der Titel eingabefähig sein oder per default stehen?

ANTWORT:
Mit xsl:choose können wir beides machen:)
Per default steht nun "ACHTUNG!" und "Tipp" (Anmerkung tönt ziemlich
komisch).

$PROJECT_DIR/xsl/docbook/html/admon.xsl

<xsl:choose>
<xsl:when test="./title">
<td class="nav" valign="top" width="464"><b><xsl:value-of
select="title"/></b><br/>
<span class="nav"><xsl:apply-templates/></span><br/>
<br/>
</td>
</xsl:when>
<xsl:otherwise>
<td class="nav" valign="top" width="464"><b>ACHTUNG!</b><br/>
<span class="nav"><xsl:apply-templates/></span><br/>
<br/>
</td>
</xsl:otherwise>
</xsl:choose>






--
roger fischer | bitflux GmbH | schöneggstrasse 5 | ch-8004 zürich
tel +41 1 240 56 72 | mobil +41 78 607 75 06 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected]

OSCOM - Open Source Content Management
http://www.oscom.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.