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


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

[docbook] XSL question


Hi,

I have begun to create my own stylesheet for processing Docbook 
document to blog. This is probably beginner's problem, but I 
haven't found an answer in "XSL Essentials" by Michael 
Fitzgerald. The issue is <sect1> element. When I create this 
template:

<xsl:template match="sect1">
      <h1>
         <xsl:value-of select="title"/>
      </h1>
      <xsl:apply-templates/>
</xsl:template>

then this piece of source code:

  <sect1><title>New vimoutliner</title>
     <warning><para>February 18, 2004</para></warning>
     <para>Ukazkovy text</para>
  </sect1>

gives this output:

<h1>New vimoutliner</h1>New vimoutliner
     <p class="date">February 18, 2004</p>
     <p>Ukazkovy text</p>

which is not what I want (text of <title> is used twice).

I tried to into <xsl:apply-templates/> some clever select, like

<xsl:apply-templates select="*[node()!='title']"/>

but it didn't help. How should I do it?

	THanks,

		Matěj

-- 
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
He uses statistics as a drunken man uses lamp-posts... for
support, rather than illumination.
      -- Andrew Lang

Attachment: pgp00000.pgp
Description: signature


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