xsl-list
[Top] [All Lists]

Re: Is the a way to hide index information that is contained in linked data?

2004-12-15 11:20:26
Hi,

You use xsl:value-of to get the title text. Change it to xsl:apply-templates with mode="filter" and add the following to your stylesheet:

<!-- filter out unwanted text -->
<xsl:template match="indexterm" mode="filter" />

Grtz,
Geert

Betty(_dot_)Risher(_at_)jeppesen(_dot_)com wrote:

Hello,

I am having an issue with index information that is contained within
linked-to elements.
When I display the information in the link, it is picking up the
<indexterm> data from within the linked element.
Xml, output description and xslt coding attached.  All suggestions are
appreciated.

Betty

XML Example:
      <chapter id="T01">
            <title> Using the Text</title>
            <sect1 id="T01-01">
                  <title>Overview</title>
                  <para>This chapter describes the following:</para>
                  <unorderedlist>
                        <listitem label="bullet">
                              <para>
                                    <autoxref linkend="T01-04"
format="Heading"/>
                              </para>
                        </listitem>
                        <listitem label="bullet">
                              <para>
                                    <autoxref linkend="T01-05"
format="Heading"/>
                              </para>
                        </listitem>
            </sect1>
            <sect1 id="T01-04">
                  <title>Using the Text</title>
                  <para>All of the applications installed on your common
interface. The following sections provide information to help you interpret
the interface.</para>
                  <sect2 id="T01-04-01">
                        <title>The <indexterm>TEXT:interface;interface, for
the TEXT</indexterm>TEXT Interface</title>
                        <para>Although each application has a unique
function on the TEXT, they all conform to standard interface guidelines
</para>
_________________________________

When displaying in the browser the link comes out as:
 Using the Text
Overview

This chapter describes the following:

. The TEXT:interface;interface, for the TEXT  TEXT Interface      <--
highlighted information is the data from the linked information
. initializing flights;flights:initializing Initializing a Flight       <--
Italized information is the data that should be displayed (only)

Using the Text
All of the applications installed on your common interface. The following
sections provide information to help you interpret the interface.

The TEXT Interface
Although each application has a unique function on the TEXT, they all
conform to standard interface guidelines

Initializing a Flight
________________________________

My xslt code for the hyperlinks

      <xsl:template match="autoxref">
            <xsl:variable name="linkName">
                  <xsl:value-of select="@linkend"/>
            </xsl:variable>
            <xsl:choose>
                  <xsl:when test="@format = 'HeadingPage'">
                        <span>
                              <a href="#{(_at_)linkend}" style="color:blue">
                                    <xsl:value-of
select="key('setKey',@linkend)/title"/>
                                    <xsl:value-of select="title"/>   (Note
have tried with <xsl:value-of select= "."/> as well)
                                                               (also tried
using <xsl:apply-templates/> in next when statement)
                              </a>
                        </span>
                  </xsl:when>
                  <xsl:when test="@format = 'Heading'">
                        <span>
                              <a href="#{(_at_)linkend}" style="color:blue">
                                    <xsl:value-of
select="key('setKey',@linkend)/title"/>
                                    <xsl:apply-templates/>
                                    <!--xsl:value-of select="."/-->
                              </a>
                        </span>
                  </xsl:when>
            </xsl:choose>
      </xsl:template>






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
Geert(_dot_)Josten(_at_)Daidalos(_dot_)nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>