From: Oleg T. <he...@us...> - 2005-10-16 20:13:20
|
Update of /cvsroot/mvp-xml/EXSLT/v2/test/ExsltTest/tests/GotDotNet/DatesAndTimes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14178/v2/test/ExsltTest/tests/GotDotNet/DatesAndTimes Added Files: avg.xslt day-abbreviation.xslt day-name.xslt max.xslt min.xslt month-abbreviation.xslt month-name.xslt source.xml Log Message: --- NEW FILE: month-name.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times" exclude-result-prefixes="date2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> Month name in Italian: <xsl:value-of select="date2:month-name(date, 'it-IT')"/> </test1> <test2> <xsl:value-of select="date2:month-name(date, 'no-such-culture')"/> </test2> <test3> <xsl:value-of select="date2:month-name(bad-data, 'it-IT')"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: day-name.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times" exclude-result-prefixes="date2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> Day name in Russian: <xsl:value-of select="date2:day-name(date, 'ru-RU')"/> </test1> <test2> <xsl:value-of select="date2:day-name(date, 'no-such-culture')"/> </test2> <test3> <xsl:value-of select="date2:day-name(bad-data, 'en-US')"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="max.xslt"?> <data> <timespan>P1M</timespan> <timespan>P3M</timespan> <timespan>P3M2D</timespan> <bad-data>PY3M2D</bad-data> <date>2004-09-01</date> </data> --- NEW FILE: day-abbreviation.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times" exclude-result-prefixes="date2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> Day name abbreviation in Swedish: <xsl:value-of select="date2:day-abbreviation(date, 'sv-SE')"/> </test1> <test2> <xsl:value-of select="date2:day-abbreviation(date, 'no-such-culture')"/> </test2> <test3> <xsl:value-of select="date2:day-abbreviation(bad-data, 'en-US')"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: month-abbreviation.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times" exclude-result-prefixes="date2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> Month name abbreviation in Turkish: <xsl:value-of select="date2:month-abbreviation(date, 'tr-TR')"/> </test1> <test2> <xsl:value-of select="date2:month-abbreviation(date, 'no-such-culture')"/> </test2> <test3> <xsl:value-of select="date2:month-abbreviation(bad-data, 'en-US')"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: min.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date2:min(timespan)"/> </test1> <test2> <xsl:value-of select="date2:min(/no/such/nodes)"/> </test2> <test2> <xsl:value-of select="date2:min(bad-data)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: max.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date2:max(timespan)"/> </test1> <test2> <xsl:value-of select="date2:max(/no/such/nodes)"/> </test2> <test2> <xsl:value-of select="date2:max(bad-data)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: avg.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> Average time interval is <xsl:value-of select="date2:avg(timespan)"/>. </test1> <test2> Average time interval is <xsl:value-of select="date2:avg(/no/such/nodes)"/>. </test2> <test2> Average time interval is <xsl:value-of select="date2:avg(bad-data)"/>. </test2> </out> </xsl:template> </xsl:stylesheet> |