<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [xep-support] How can I create an index</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Iam not sure about the tags but programatically you can handle this.</FONT>
</P>

<P><FONT SIZE=2>Suppose the particular name is there in 10 places in the XML. Attach Id attribute with each tag. </FONT>
</P>

<P><FONT SIZE=2>&lt;Name id=&quot;1&quot;&gt;ABC&lt;/Name&gt;</FONT>
<BR><FONT SIZE=2>&lt;Name id=&quot;2&quot;&gt;ABC&lt;/Name&gt;</FONT>
<BR><FONT SIZE=2>&lt;Name id=&quot;2&quot;&gt;ABC&lt;/Name&gt;</FONT>
</P>

<P><FONT SIZE=2>Create the fo:basic-link </FONT>
<BR><FONT SIZE=2>&lt;fo:block&gt; </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fo:basic-link internal-destination=&quot;&quot; id=&quot;{Name}{@id}&quot;/&gt; </FONT>
<BR><FONT SIZE=2>&lt;/fo:block&gt; </FONT>
</P>

<P><FONT SIZE=2>From the index call the template like </FONT>
<BR><FONT SIZE=2>&nbsp;&lt;xsl:apply-template mode=&quot;index&quot; select=&quot;Name[Name='ABC']&quot;/&gt;</FONT>
</P>

<P><FONT SIZE=2>In Index you can refer to Name tag as</FONT>
</P>

<P><FONT SIZE=2>&lt;xsl:template match=&quot;Name&quot; mode =&quot;index&quot;&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fo:block text-align=&quot;right&quot; font-family=&quot;Times Roman&quot; font-size=&quot;10pt&quot;&gt; </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fo:page-number-citation ref-id=&quot;{.}{./@id}&quot; /&gt; </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/fo:block&gt; </FONT>
<BR><FONT SIZE=2>&lt;/xsl:template&gt;</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>Thanks,</FONT>
<BR><FONT SIZE=2>Anshul</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Dave Pawson [<A HREF="mailto:davep@dpawson.co.uk">mailto:davep@dpawson.co.uk</A>] </FONT>
<BR><FONT SIZE=2>Sent: Friday, May 27, 2005 10:26 AM</FONT>
<BR><FONT SIZE=2>To: xmozillanickname: Xep-Support</FONT>
<BR><FONT SIZE=2>Subject: Re: [xep-support] How can I create an index</FONT>
</P>
<BR>

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

<P><FONT SIZE=2>Mark each point with some xml,</FONT>
<BR><FONT SIZE=2>In a separate mode, </FONT>
<BR><FONT SIZE=2>xsl-for-each select = index marks</FONT>
<BR><FONT SIZE=2>&nbsp; create the link, insert the content, insert the page reference.</FONT>
</P>

<P><FONT SIZE=2>....Or ask on the Mulberrytech xslt list.</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Regards, </FONT>
</P>

<P><FONT SIZE=2>Dave Pawson</FONT>
<BR><FONT SIZE=2>XSLT + Docbook FAQ</FONT>
<BR><FONT SIZE=2><A HREF="http://www.dpawson.co.uk" TARGET="_blank">http://www.dpawson.co.uk</A></FONT>
</P>

<P><FONT SIZE=2>-------------------</FONT>
<BR><FONT SIZE=2>(*) 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.</FONT></P>

<P><FONT SIZE=2>(*) By using the Service, you expressly agree to these Terms of Service <A HREF="http://www.renderx.com/terms-of-service.html" TARGET="_blank">http://www.renderx.com/terms-of-service.html</A></FONT>
</P>

</BODY>
</HTML>