OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] generating index in plain text

On Tue, May 15, 2012 at 5:58 PM, Peter Flynn <peter@silmaril.ie> wrote:
> On 14/05/12 21:49, Tim Arnold wrote:
>> hi,
>> I am creating an XML-based index file from my DocBook 5 XML source. I
>> made a copy of the javahelp xsl templates to get started.
>> My problem is that the target format requires that the <term> and the
>> <title> the term points to must be in plain text (that is, contain no
>> other markup). The target format follows this pattern:
>> <index>
>> <indexEntry>
>>   <term> stuff </term>
>>   <sortKey/>
>>   <indexTarget>
>>     <title> Title of Section </title>
>>     <sortKey/>
>>     <target file="myfile.htm" fragment="#middleofpage"/>
>>    </indexTarget>
>> </indexEntry>
>>  etc.
>> </index>
>> Is there a way to 'clean up' terms and titles so they only have text?
> Can you use normalize-space() for this?
> ///Peter

Thanks Peter!
That's exactly the information I needed:

  <xsl:value-of select="normalize-space($title)" />


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]