Re: Release Date vs. Highlight Until Date
Thanks for your suggestions. I am not sure the CMS vendor supports XSL 2.0. After looking more at the system I think I'll implement an XSL extension to
It is the XML Schema date time or xs:dateTime datatype. You are lucky -- this is the easiest to sort, since it allows for simple string sorting. You would do something like:
<xsl:template match="items"> <xsl:apply-template select="item"> <xsl:sort select="@release-date"/> </xsl:apply-templates> </xsl:template>
Therefore, since a single XML document contains both the IA and the content, I think I can do something like (half code, half psuedo-code):
personally, I would avoid extension functions as much as humanly possible (you don't need them -- I never use them in the CMS, but do when offline for batch processing).
Is it possible to write a single XPath query that merges the equivalent of the
this works, but stay away from xsl:for-each until you uinderstand what you are doing.
//itemYou would want to apply-templates like I have shown above then you can check the position of the node (continuing on my XSL above):
<xsl:template match="item"> <xsl:if test="position() < 6"> <xsl:apply-templates/> </xsl:if> </xsl:template>
No, you are getting it, but heading in a wrong direction. Stay away from xsl:for-each.
<> Thanks again,
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format