<!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><Name id="1">ABC</Name></FONT>
<BR><FONT SIZE=2><Name id="2">ABC</Name></FONT>
<BR><FONT SIZE=2><Name id="2">ABC</Name></FONT>
</P>
<P><FONT SIZE=2>Create the fo:basic-link </FONT>
<BR><FONT SIZE=2><fo:block> </FONT>
<BR><FONT SIZE=2> <fo:basic-link internal-destination="" id="{Name}{@id}"/> </FONT>
<BR><FONT SIZE=2></fo:block> </FONT>
</P>
<P><FONT SIZE=2>From the index call the template like </FONT>
<BR><FONT SIZE=2> <xsl:apply-template mode="index" select="Name[Name='ABC']"/></FONT>
</P>
<P><FONT SIZE=2>In Index you can refer to Name tag as</FONT>
</P>
<P><FONT SIZE=2><xsl:template match="Name" mode ="index"></FONT>
<BR><FONT SIZE=2> <fo:block text-align="right" font-family="Times Roman" font-size="10pt"> </FONT>
<BR><FONT SIZE=2> <fo:page-number-citation ref-id="{.}{./@id}" /> </FONT>
<BR><FONT SIZE=2> </fo:block> </FONT>
<BR><FONT SIZE=2></xsl:template></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>> I have a stylesheet that process XML files and generates a PDFfile. I </FONT>
<BR><FONT SIZE=2>> would like to create an index where I could provide a name and a page </FONT>
<BR><FONT SIZE=2>> number on where to find each name throughout the document. If the </FONT>
<BR><FONT SIZE=2>> name was mentioned on page 3 and page 10 the index should list both </FONT>
<BR><FONT SIZE=2>> page numbers.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> 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> 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>