Subject: RE: [xsl] XSLT Sort and choose last items problem From: "thei" <thei@xxxxxxxxx> Date: Tue, 11 Feb 2003 01:20:56 +1000 |
Thanks Jeni for the previous solution, but I do have an additional problem: This is best explained with an example: if you go to this page you will see that there is a "Previous" link but no "Next" link - http://journal.the-i.org/?31.01.2003 If you go to this page you will see there is a "Next" link but no "Previous" link - http://journal.the-i.org/?01.02.2003 This is because, once again, the days span across a month element. This is a sample XML file: <journal> <year> <month date="1"> <day date="1"> <contents/> <day date="2"> ... </month> <month date="2"> <day date="1"> <contents/> <day date="2"> ... </month> ... </year> </journal> The complete xsl file can be viewed at http://journal.the-i.org/xsl/day.xsl or the appropriate snippet for the "Previous" link, (where $day is the numeric (xs:gDay) @date attribute of the current day): <xsl:if test="../day[@date=$day -1]"> <a href="?{../day[@date=$day -1]/@date}.{../@date}.{../../@date}" title="View the previous journal entry"> <xsl:text>Previous</xsl:text> </a> </xsl:if> This works for day elements within the same month, but doesn't work for the first or last day of a month. Sincerely, Ned Martin http://nedmartin.org/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT Sort and choose last, Jeni Tennison | Thread | Re: [xsl] XSLT Sort and choose last, Jeni Tennison |
RE: [xsl] preceding-sibling inside , Sandeep_Karandikar | Date | R: [xsl] &, Tamorri Claudio |
Month |