RE: [xep-support] How can I create an index

From: Katoch, Anshul <anshul.katoch@lc.ca.gov>
Date: Fri May 27 2005 - 11:23:30 PDT

Iam not sure about the tags but programatically you can handle this.

Suppose the particular name is there in 10 places in the XML. Attach Id
attribute with each tag.

<Name id="1">ABC</Name>
<Name id="2">ABC</Name>
<Name id="2">ABC</Name>

Create the fo:basic-link
<fo:block>
      <fo:basic-link internal-destination="" id="{Name}{@id}"/>
</fo:block>

From the index call the template like
 <xsl:apply-template mode="index" select="Name[Name='ABC']"/>

In Index you can refer to Name tag as

<xsl:template match="Name" mode ="index">
       <fo:block text-align="right" font-family="Times Roman"
font-size="10pt">
          <fo:page-number-citation ref-id="{.}{./@id}" />
       </fo:block>
</xsl:template>

Thanks,
Anshul

-----Original Message-----
From: Dave Pawson [mailto:davep@dpawson.co.uk]
Sent: Friday, May 27, 2005 10:26 AM
To: xmozillanickname: Xep-Support
Subject: Re: [xep-support] How can I create an index

On Thu, 2005-05-26 at 17:26 +0000, viking wrote:
> I have a stylesheet that process XML files and generates a PDFfile. I
> would like to create an index where I could provide a name and a page
> number on where to find each name throughout the document. If the
> name was mentioned on page 3 and page 10 the index should list both
> page numbers.
>
> How can I do this?

Mark each point with some xml,
In a separate mode,
xsl-for-each select = index marks
  create the link, insert the content, insert the page reference.

....Or ask on the Mulberrytech xslt list.

-- 
Regards, 
Dave Pawson
XSLT + Docbook FAQ
http://www.dpawson.co.uk
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support' in
the body of the message to majordomo@renderx.com from the address you are
subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
http://www.renderx.com/terms-of-service.html
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri, 27 May 2005 11:23:30 -0700

This archive was generated by hypermail 2.1.8 : Fri May 27 2005 - 11:46:20 PDT