[xep-support] How can I create an index

Katoch, Anshul anshul.katoch at lc.ca.gov
Fri May 27 11:23:30 PDT 2005


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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20050527/23114e31/attachment.html>


More information about the Xep-support mailing list