[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Assigning serial numbers

Subject: Assigning serial numbers
From: "Siddhi Thakkar" <siddhi.thakkar@xxxxxxxxxxxxxx>
Date: Sat, 10 Apr 2010 12:07:27 +0530
 Assigning serial numbers
Dear Experts,

I need to create an HTML table of dead links and assign serial numbers to it. Here is what my input looks like:

<para id="p1"> .....some text..... <a href="p5">.....</a> ...some text..... </para>
<article id="p2"> ......some text..... <a href="p1">......</a> text2 </article>
<section id="p3">.....some text....<a href="p9">.....</a>...........</section>

Since two of the href attribute values listed above (p5 and p9) have no corresponding id values, these are the dead links. Please note that I have got the list of such links, I AM ONLY STUCK AT PROVIDING SERIAL NOS. Mentioned below is my XSL code:

<xsl:output method="html"/>
<xsl:template match="/">

<xsl:template match="//a">
<xsl:for-each select="@href">
<xsl:if test="not(for $x in //@id return $x[$x=current()])">
<!-- This is where I would like to write the code to assign serial number-->
<xsl:value-of select="current()"/>

<xsl:template match="text()"/>
<!--CODE END-->


Thanks much,

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.