You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(174) |
Nov
(85) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(56) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(1) |
Jul
(132) |
Aug
(5) |
Sep
|
Oct
(314) |
Nov
(133) |
Dec
(18) |
2006 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oleg T. <he...@us...> - 2005-07-19 21:18:06
|
Update of /cvsroot/mvp-xml/WebSite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24378 Modified Files: index.html Log Message: Index: index.html =================================================================== RCS file: /cvsroot/mvp-xml/WebSite/index.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- index.html 19 Jul 2005 20:56:45 -0000 1.11 +++ index.html 19 Jul 2005 21:17:57 -0000 1.12 @@ -42,7 +42,7 @@ <li><a href="xinclude/index.html">XInclude.NET</a> module<br> </li> <li><a href="xpointer/index.html">XPointer.NET</a> module</li> - <li><a href="exslt/index.html">EXSLT.NET module</a><br> + <li><a href="exslt/index.html">EXSLT.NET</a> module<br> </li> </ul> <h2><a class="mozTocH2" name="mozTocId421746"></a>2. News</h2> |
Update of /cvsroot/mvp-xml/WebSite/exslt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20137/exslt Added Files: Functions.htm Functions.xml Functions.xslt GDNDatesAndTimes-avg.xml GDNDatesAndTimes-day-abbreviation.xml GDNDatesAndTimes-day-name.xml GDNDatesAndTimes-max.xml GDNDatesAndTimes-min.xml GDNDatesAndTimes-month-abbreviation.xml GDNDatesAndTimes-month-name.xml GDNDynamic-evaluate.xml GDNFunctions.xsl GDNMath-avg.xml GDNRegularExpressions-tokenize.xml GDNSets-subset.xml GDNStrings-lowercase.xml GDNStrings-uppercase.xml buildFuncList.cmd index.html Log Message: --- NEW FILE: Functions.xslt --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/documentation" exclude-result-prefixes="exslt"> <xsl:output indent="yes" encoding="ISO8859-1"/> <!-- <xsl:template match="modules"> <modules> <xsl:for-each select="module"> <module namespace="{@namespace}"> <xsl:variable name="doc" select="document(@url)/*"/> <xsl:variable name="prefix" select="$doc/@prefix"/> <xsl:attribute name="prefix"><xsl:value-of select="$doc/@prefix"/></xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="$doc/exslt:name"/></xsl:attribute> <xsl:attribute name="homepage"><xsl:value-of select="concat('http://exslt.org/', $prefix, '/index.html')"/></xsl:attribute> <xsl:for-each select="$doc/exslt:functions/exslt:function"> <function name="{@name}" descriptionURL="{concat('http://exslt.org/', $prefix, '/functions/', @name, '/index.html')}" supported="yes"/> </xsl:for-each> </module> </xsl:for-each> </modules> </xsl:template> --> <xsl:template match="/"> <html> <head> <title>EXSLT.NET <xsl:value-of select="modules/@version"/> Function List</title> <style type="text/css"> body { font-family: Verdana, Arial, helvetica;} .module-table { width: 100%; } </style> </head> <body> <h2>EXSLT.NET <xsl:value-of select="modules/@version"/> Function List</h2> <hr/> <div>EXSLT Modules:</div> <ol> <xsl:apply-templates select="modules/module[@is-exslt-module='yes']" mode="toc"/> </ol> <div>Additional modules:</div> <ol> <xsl:apply-templates select="modules/module[@is-exslt-module='no']" mode="toc"/> </ol> <hr/> <xsl:apply-templates select="modules/module"/> </body> </html> </xsl:template> <xsl:template match="module" mode="toc"> <li> <a href="#{@name}"><xsl:value-of select="@name"/></a> </li> </xsl:template> <xsl:template match="module"> <p> <a name="{@name}"> <div class="module-name"><b>Module:</b> <xsl:value-of select="@name"/></div></a> <div class="module-ns"><b>Namespace:</b> <xsl:value-of select="@namespace"/></div> <xsl:if test="@homepage"> <div class="module-homepage"><b>Homepage:</b> <a href="{@homepage}"><xsl:value-of select="@homepage"/></a></div> </xsl:if> <xsl:if test="@is-exslt-module='no'"> <div class="note"><b>Note:</b> These functions are not part of EXSLT.</div> </xsl:if> <table border="1" class="module-table"> <tr> <th>Function name</th> <th>Alias</th> <th>Supported</th> </tr> <xsl:for-each select="function"> <tr> <td> <xsl:choose> <xsl:when test="@descriptionURL"> <a href="{@descriptionURL}"><xsl:value-of select="concat(../@prefix, ':', @name)"/></a> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(../@prefix, ':', @name)"/> </xsl:otherwise> </xsl:choose> </td> <td align="center"> <xsl:choose> <xsl:when test="@alias"> <xsl:value-of select="@alias"/> </xsl:when> <xsl:otherwise>-</xsl:otherwise> </xsl:choose> </td> <td align="center"> <xsl:attribute name="style"> <xsl:choose> <xsl:when test="@supported='yes'">color:green;</xsl:when> <xsl:otherwise>color:red;</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:value-of select="@supported"/></td> </tr> </xsl:for-each> </table> </p> <hr/> </xsl:template> </xsl:stylesheet> --- NEW FILE: index.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Mvp.Xml project: EXSLT.NET module</title> <link href="../style.css" type="text/css" rel="stylesheet"> </head> <body> <h1><a class="mozTocH1" name="mozTocId507464"></a><a href="../index.html">Mvp.Xml Project</a>: EXSLT.NET module </h1> <p>EXSLT.NET library is community-developed implementation of the <a href="http://exslt.org"> EXSLT</a> extensions to XSLT for the .NET platform. EXSLT.NET fully implements the following EXSLT modules: <a href="http://exslt.org/date/index.html">Dates and Times</a>, <a href="http://exslt.org/exsl/index.html">Common</a>, <a href="http://exslt.org/math/index.html"> Math</a>, <a href="http://exslt.org/random/index.html">Random</a>, <a href="http://exslt.org/regexp/index.html"> Regular Expressions</a>, <a href="http://exslt.org/set/index.html">Sets</a> and <a href="http://exslt.org/str/index.html">Strings</a>. In addition EXSLT.NET library provides proprietary set of useful extension functions. See full list of supported extension functions and elements in "<a href="#funclist">Extension Functions and Elements</a>" section. For more info about EXSLT and EXSLT.NET see <a href="#refs">References</a>. </p> <h2>Contents</h2> <ol> <li> <a href="#new">What's New In This Version</a> </li> <li> <a href="#install">Installation</a> </li> <li> <a href="#build">Building</a> </li> <li> <a href="#usage">Usage</a> </li> <li> <a href="#funclist">Extension Functions and Elements</a> </li> <li> <a href="#multiout">Multiple Output</a> </li> <li> <a href="#credits">License</a></li> <li><a href="#bugs">Bug Reports</a></li> <li><a href="#feedback">Feedback</a><br> </li> <li> <a href="#refs">References</a></li> </ol> <h2>1<a name="new">. What's New In This Version</a></h2> <p>Since version 1.3 EXSLT.NET is a module of the <a href="http://mvp-xml.sf.net">Mvp.Xml library</a>. The only change done during codebase transition is new namespace: <font face="Courier New">Mvp.Xml.Exslt</font> instead of <font face="Courier New"> GotDotnet.Exslt</font>. Note that XML namespace of proprietary EXSLT.NET extention functions remains unchanged and still starts with "<a href="http://gotdotnet.com/exslt">http://gotdotnet.com/exslt</a>".</p> <h2>2<a name="install">. Installation</a></h2> <p>EXSLT.NET is designed as a component for .NET Framework and actually doesn't require any installation. You can use <font face="Courier New">Mvp.Xml.Exslt.dll</font> assembly as is in your application by referencing it in Visual Studio .NET. If you want to install the dll into the GAC, run <font face="Courier New">Exslt\install.cmd</font> script. To uninstall the dll, run <font face="Courier New">Exslt\uninstall.cmd</font> script.</p> <h2>3<a name="build">. Building</a></h2> <p>EXSLT.NET source distribution contains Visual Studio .NET 2003 solution, consisting of four projects: <font face="Courier New">Exslt</font>, which is the core EXSLT.NET implementation, <font face="Courier New">ExsltTest</font> - a collection of NUnit tests for each EXSLT.NET function along with primitive command line utility for testing EXSLT.NET in XSLT, <font face="Courier New">ExsltXPathTest</font> - primitive command line utility for testing EXSLT.NET in XPath-only environment, and <font face="Courier New">MethodRenamer</font> - auxiliary command line utility for EXSLT.NET assembly building.</p> <p>All the projects can be build in Visual Studio .NET 2003. Note, that due to implementation details we are using custom script hooked to Visual Studio .NET post-build event. In this script, which you can find in <font face="Courier New">Exslt</font> project properties, we disassemble <font face="Courier New">Mvp.Xml</font> <font face="Courier New"> .Exslt.dll</font> assembly, rename methods (e.g. from <font face="Courier New">dateTime()</font> to <font face="Courier New">date-time()</font>) and assemble it back.</p> <p>You can also build EXSLT.NET in command line using provided <font face="Courier New"> Makefile</font> files. To build any of EXSLT.NET projects, run command prompt (use Visual Studio .NET 2003 Command Prompt or make sure <font face="Courier New"> csc.exe</font>, <font face="Courier New">ildasm.exe</font> and <font face="Courier New">ilasm.exe</font> are in your PATH), change directory to a project directory and run <font face="Courier New"> nmake</font>.</p> <h2>4<a name="usage">. Usage</a></h2> <p>Typically you are using EXSLT.NET module in your application via <code><font face="Courier New"> Mvp.Xml</font>.Exslt.ExsltTransform</code> class, which encapsulates EXSLT implementation under the guise of standard <code>XslTransform</code> class (<code>ExsltTransform</code> class completely duplicates <code>XslTransform</code> API from .NET 1.0 you are familiar with). So the rules of the <code>ExsltTransform</code> usage are simple: just use it instead of standard <code>XslTransform</code> class:</p> <pre class="code">using System;<br>using System.Xml.XPath;<br>using <font face="Courier New">Mvp.Xml</font>.Exslt;<br><br>public class ExsltTest <br>{<br> public static void Main() <br> { <br> ExsltTransform xslt = new ExsltTransform(); <br> xslt.Load("foo.xsl"); <br> xslt.Transform("foo.xml", "result.html"); <br> } <br>}<br></pre> <p> </p> <p>Additionally <code>ExsltTransform</code> class has two properties - <font face="Courier New"> SupportedFunctions</font> and <font face="Courier New">MultiOutput</font>, which allow you to control which features should be supported, for instance you can define that you need all extension function modules, but not multiple output support (the default settings) by setting <font face="Courier New"> SupportedFunctions</font> and <font face="Courier New">MultipleOutput</font> properies in your code before the call to the <font face="Courier New">Transform()</font> method:</p> <p></p> <pre>xslt.SupportedFunctions = ExsltFunctionNamespace.All;<br>xslt.MultiOutput = false;</pre> <p>Note: You can find more information about practical usage of the EXSLT.NET in the "<a href="http://msdn.microsoft.com/xml/default.aspx?pull=/library/en-us/dnxml/html/practexslt.asp">Building Practical Solutions with EXSLT.NET</a>" article at <a href="http://msdn.com/xml"> MSDN XML Developer Center</a>.</p> <p>It's also possible to use EXSLT.NET in XPath-only environment. For doing that one makes use of <font face="Courier New">Mvp.Xml</font> <code>.Exslt.ExsltContext</code> class:</p> <pre>XPathExpression expr = nav.Compile("set:distinct(//author)");<br>expr.SetContext(new ExsltContext(doc.NameTable));<br>XPathNodeIterator authors = nav.Select(expr);<br>while (authors.MoveNext())<br> Console.WriteLine(authors.Current.Value);<br></pre> <p>See "<a href="http://http://msdn.microsoft.com/library/en-us/dnexxml/html/xml11172003.asp">EXSLT Meets XPath</a>" article for more information.</p> <h2>5<a name="funclist">. Extension</a> Functions and Elements</h2> <p>You can find full list of extension functions EXSLT.NET supports in <font face="Courier New"> doc\Functions.xml</font> document. <a href="Functions.htm">Here is</a> HTML version.</p> <p>Note: For compatibility, some extension functions (such as <font face="Courier New">date:date-time()</font>) have camelCased alias names, e.g. <font face="Courier New">date:dateTime()</font>. Both forms are equivalent names, referring to the same function implementation, although beware that alias names are non-standard ones, so most likely they won't be recognized by other EXSLT implementations.</p> <p>The only extension element supported is <a href="http://exslt.org/exsl/elements/document/index.html"> exsl:document</a> element. See "<a href="#multiout">Multiple Output</a>" section for more info.</p> <h2>6<a name="multiout">. Multiple Output</a></h2> <p>EXSLT.NET partially supports <a href="http://exslt.org/exsl/elements/document/index.html"> <font face="Courier New">exsl:document</font></a> extension element. Not all <font face="Courier New">exsl:document</font> attributes and their values are supported in this version of teh EXSLT.NET. The supported subset of attributes and values is as follows:</p> <pre><exsl:document <br> <b>href</b> = { <i>uri-reference</i> } <br> method = { "xml" | "text" } <br> encoding = { <i>string</i> } <br> omit-xml-declaration = { "yes" | "no" }<br> standalone = { "yes" | "no" } <br> doctype-public = { <i>string</i> } <br> doctype-system = { <i>string</i> } <br> indent = { "yes" | "no" } > <br> <-- Content: template --> <br></exsl:document></pre> <p><a href="http://exslt.org/exsl/elements/document/index.html"><font face="Courier New">exsl:document</font></a> extension element is not supported when transformation is done to <font face="Courier New"> XmlReader</font> or <font face="Courier New">XmlWriter</font>. In the latter case use overloaded <font face="Courier New">Transform()</font> method, which accepts instance of <font face="Courier New">MultiXmlTextWriter</font> class to transform to.</p> <p><a href="http://exslt.org/exsl/elements/document/index.html"><font face="Courier New">exsl:document</font></a> extension element is supported through postprocessing of transformation result using customized <font face="Courier New">XmlTextWriter</font> class. This unconditionally assumes the transformation is always done in XML, so actually currently there is no way to produce real HTML (not XHTML) result documents. More specifically, main result document is always XML, but subsidiary result documents may be written either as XML or as text, depending on the <b>method</b> attribute value of the appropriate <code class="ce">exsl:document</code> element. </p> <p></p> <p>Moreover, the <code class="ce">xsl:output</code> element is <a href="/library/en-us/cpguide/html/cpconinputsoutputstoxsltransform.asp"> ignored</a>. That only affects outputting of the main result document though, because the <code class="ce">xsl:output</code> element does not affect outputting of any subsidiary result documents. It's completely controlled by the <code class="ce">exsl:document</code> element. Instead, you can get some control over outputting of the main result document using the <font face="Courier New"> MultiXmlTextWriter</font> properties inherited from the <font face="Courier New"> XmlTextWriter</font> class, particularly with <a href="/library/en-us/cpref/html/frlrfSystemXmlXmlTextWriterClassctorTopic2.asp"> encoding</a> and <a href="/library/en-us/cpref/html/frlrfSystemXmlXmlTextWriterClassFormattingTopic.asp"> indentation</a>.</p> <p><a href="http://www.w3.org/TR/xslt.html#disable-output-escaping">The disabling of output escaping</a> feature is <a href="/library/en-us/cpguide/html/cpconinputsoutputstoxsltransform.asp"> ignored</a> as always when XSL transformation is performed to an <font face="Courier New"> XmlWriter</font>.</p> <p>For more info about how it's implemented see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml06162003.asp"> "Producing Multiple Outputs from an XSL Transformation"</a> article.</p> <h2>7<a name="credits">. License</a></h2> <p>EXSLT.NET as part of the <a href="http://mvp-xml.sf.net/">Mvp.Xml project</a> is subject to the <a href="../license.html">Common Public License</a> - <a href="http://www.opensource.org/licenses/index.php"> OSI approved</a> free open-source license. It's distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.<br> </p> <h2><a class="mozTocH2" name="bugs"></a>8. Bug reports</h2> <p>Please feel free to report any bugs to the Mvp.Xml project's <a href="http://sourceforge.net/tracker/?group_id=102352&atid=633328"> Bug Tracker</a>. Feature requests are also <a href="http://sourceforge.net/tracker/?group_id=102352&atid=633331">welcome</a>.<br> </p> <h2><a class="mozTocH2" name="feedback"></a>9. Feedback</h2> <p>We appreciate any kind of feedback, feel free to post any questions or comments about EXSLT.NET module and Mvp.Xml project in general in the <a href="https://lists.sourceforge.net/mailman/listinfo/mvp-xml-help">mvp-xml-help</a> mailing list <a href="http://sourceforge.net/mailarchive/forum.php?forum=mvp-xml-help">(online archive)</a>.<br> </p> <h2>10<a name="refs">. References</a></h2> <ol> <li><!--StartFragment --> EXSLT community initiative - <a href="http://www.exslt.org/"> http://www.exslt.org</a>. </li> <li> "<a href="http://msdn.microsoft.com/library/en-us/dnexxml/html/xml05192003.asp">EXSLT: Enhancing the Power of XSLT</a>" by Dare Obasanjo, MSDN. </li> <li> "<a href="http://http//msdn.microsoft.com/library/en-us/dnexxml/html/xml11172003.asp">EXSLT Meets XPath</a>" by Dare Obasanjo, MSDN. </li> <li> "<a href="http://msdn.microsoft.com/xml/default.aspx?pull=/library/en-us/dnxml/html/practexslt.asp">Building Practical Solutions with EXSLT.NET</a>" by Oleg Tkachenko, MSDN. </li> <li> <a href="http://www.xmllab.net/Products/nxslt/tabid/62/Default.aspx">nxslt.exe</a> - EXSLT.NET enabled command line XSLT utility.</li> </ol> <p><br> </p> <hr style="width: 100%; height: 2px;"> <p> The project is hosted at <a target="_blank" href="http://www.sourceforge.net"> SourceForge</a>. Find more at the <a href="http://sourceforge.net/projects/mvp-xml">Mvp.Xml project page at SourceForge</a>.<br> <a href="http://sourceforge.net/" title="Link to SourceForge home page"><img src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" alt="SourceForge logo" border="0"></a><br> <code>$Id: index.html,v 1.1 2005/07/19 20:58:40 helgy Exp $</code><br> </p> </body> </html> --- NEW FILE: Functions.xml --- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Functions.xslt"?> <modules version="1.3"> <module namespace="http://exslt.org/dates-and-times" prefix="date" name="Dates and Times" homepage="http://exslt.org/date/index.html" is-exslt-module="yes"> <function name="format-date" alias="formatDate" descriptionURL="http://exslt.org/date/functions/format-date/index.html" supported="yes"/> <function name="parse-date" alias="parseDate" descriptionURL="http://exslt.org/date/functions/parse-date/index.html" supported="yes"/> <function name="date-time" alias="dateTime" descriptionURL="http://exslt.org/date/functions/date-time/index.html" supported="yes"/> <function name="date" descriptionURL="http://exslt.org/date/functions/date/index.html" supported="yes"/> <function name="time" descriptionURL="http://exslt.org/date/functions/time/index.html" supported="yes"/> <function name="year" descriptionURL="http://exslt.org/date/functions/year/index.html" supported="yes"/> <function name="leap-year" alias="leapYear" descriptionURL="http://exslt.org/date/functions/leap-year/index.html" supported="yes"/> <function name="month-in-year" alias="monthInYear" descriptionURL="http://exslt.org/date/functions/month-in-year/index.html" supported="yes"/> <function name="month-name" alias="monthName" descriptionURL="http://exslt.org/date/functions/month-name/index.html" supported="yes"/> <function name="month-abbreviation" alias="monthAbbreviation" descriptionURL="http://exslt.org/date/functions/month-abbreviation/index.html" supported="yes"/> <function name="week-in-year" alias="weekInYear" descriptionURL="http://exslt.org/date/functions/week-in-year/index.html" supported="yes"/> <function name="week-in-month" alias="weekInMonth" descriptionURL="http://exslt.org/date/functions/week-in-month/index.html" supported="yes"/> <function name="day-in-year" alias="dayInYear" descriptionURL="http://exslt.org/date/functions/day-in-year/index.html" supported="yes"/> <function name="day-in-month" alias="dayInMonth" descriptionURL="http://exslt.org/date/functions/day-in-month/index.html" supported="yes"/> <function name="day-of-week-in-month" alias="dayOfWeekInMonth" descriptionURL="http://exslt.org/date/functions/day-of-week-in-month/index.html" supported="yes"/> <function name="day-in-week" alias="dayInWeek" descriptionURL="http://exslt.org/date/functions/day-in-week/index.html" supported="yes"/> <function name="day-name" alias="dayName" descriptionURL="http://exslt.org/date/functions/day-name/index.html" supported="yes"/> <function name="day-abbreviation" alias="dayAbbreviation" descriptionURL="http://exslt.org/date/functions/day-abbreviation/index.html" supported="yes"/> <function name="hour-in-day" alias="hourInDay" descriptionURL="http://exslt.org/date/functions/hour-in-day/index.html" supported="yes"/> <function name="minute-in-hour" alias="minuteInHour" descriptionURL="http://exslt.org/date/functions/minute-in-hour/index.html" supported="yes"/> <function name="second-in-minute" alias="secondInMinute" descriptionURL="http://exslt.org/date/functions/second-in-minute/index.html" supported="yes"/> <function name="difference" descriptionURL="http://exslt.org/date/functions/difference/index.html" supported="yes"/> <function name="add" descriptionURL="http://exslt.org/date/functions/add/index.html" supported="yes"/> <function name="add-duration" alias="addDuration" descriptionURL="http://exslt.org/date/functions/add-duration/index.html" supported="yes"/> <function name="sum" descriptionURL="http://exslt.org/date/functions/sum/index.html" supported="yes"/> <function name="seconds" descriptionURL="http://exslt.org/date/functions/seconds/index.html" supported="yes"/> <function name="duration" descriptionURL="http://exslt.org/date/functions/duration/index.html" supported="yes"/> </module> <module namespace="http://exslt.org/common" prefix="exsl" name="Common" homepage="http://exslt.org/exsl/index.html" is-exslt-module="yes"> <function name="node-set" alias="nodeSet" descriptionURL="http://exslt.org/exsl/functions/node-set/index.html" supported="yes"/> <function name="object-type" alias="objectType" descriptionURL="http://exslt.org/exsl/functions/object-type/index.html" supported="yes"/> </module> <module namespace="http://exslt.org/math" prefix="math" name="Math" homepage="http://exslt.org/math/index.html" is-exslt-module="yes"> <function name="min" descriptionURL="http://exslt.org/math/functions/min/index.html" supported="yes"/> <function name="max" descriptionURL="http://exslt.org/math/functions/max/index.html" supported="yes"/> <function name="highest" descriptionURL="http://exslt.org/math/functions/highest/index.html" supported="yes"/> <function name="lowest" descriptionURL="http://exslt.org/math/functions/lowest/index.html" supported="yes"/> <function name="abs" descriptionURL="http://exslt.org/math/functions/abs/index.html" supported="yes"/> <function name="sqrt" descriptionURL="http://exslt.org/math/functions/sqrt/index.html" supported="yes"/> <function name="power" descriptionURL="http://exslt.org/math/functions/power/index.html" supported="yes"/> <function name="constant" descriptionURL="http://exslt.org/math/functions/constant/index.html" supported="yes"/> <function name="log" descriptionURL="http://exslt.org/math/functions/log/index.html" supported="yes"/> <function name="random" descriptionURL="http://exslt.org/math/functions/random/index.html" supported="yes"/> <function name="sin" descriptionURL="http://exslt.org/math/functions/sin/index.html" supported="yes"/> <function name="cos" descriptionURL="http://exslt.org/math/functions/cos/index.html" supported="yes"/> <function name="tan" descriptionURL="http://exslt.org/math/functions/tan/index.html" supported="yes"/> <function name="asin" descriptionURL="http://exslt.org/math/functions/asin/index.html" supported="yes"/> <function name="acos" descriptionURL="http://exslt.org/math/functions/acos/index.html" supported="yes"/> <function name="atan" descriptionURL="http://exslt.org/math/functions/atan/index.html" supported="yes"/> <function name="atan2" descriptionURL="http://exslt.org/math/functions/atan2/index.html" supported="yes"/> <function name="exp" descriptionURL="http://exslt.org/math/functions/exp/index.html" supported="yes"/> </module> <module namespace="http://exslt.org/random" prefix="random" name="Random" homepage="http://exslt.org/random/index.html" is-exslt-module="yes"> <function name="random-sequence" alias="randomSequence" descriptionURL="http://exslt.org/random/functions/random-sequence/index.html" supported="yes"/> </module> <module namespace="http://exslt.org/regular-expressions" prefix="regexp" name="Regular Expressions" homepage="http://exslt.org/regexp/index.html" is-exslt-module="yes"> <function name="test" descriptionURL="http://exslt.org/regexp/functions/test/index.html" supported="yes"/> <function name="match" descriptionURL="http://exslt.org/regexp/functions/match/index.html" supported="yes"/> <function name="replace" descriptionURL="http://exslt.org/regexp/functions/replace/index.html" supported="yes"/> </module> <module namespace="http://exslt.org/sets" prefix="set" name="Sets" homepage="http://exslt.org/set/index.html" is-exslt-module="yes"> <function name="difference" descriptionURL="http://exslt.org/set/functions/difference/index.html" supported="yes"/> <function name="intersection" descriptionURL="http://exslt.org/set/functions/intersection/index.html" supported="yes"/> <function name="distinct" descriptionURL="http://exslt.org/set/functions/distinct/index.html" supported="yes"/> <function name="has-same-node" descriptionURL="http://exslt.org/set/functions/has-same-node/index.html" supported="yes"/> <function name="leading" descriptionURL="http://exslt.org/set/functions/leading/index.html" supported="yes"/> <function name="trailing" descriptionURL="http://exslt.org/set/functions/trailing/index.html" supported="yes"/> </module> <module namespace="http://exslt.org/strings" prefix="str" name="Strings" homepage="http://exslt.org/str/index.html" is-exslt-module="yes"> <function name="tokenize" descriptionURL="http://exslt.org/str/functions/tokenize/index.html" supported="yes"/> <function name="replace" descriptionURL="http://exslt.org/str/functions/replace/index.html" supported="yes"/> <function name="padding" descriptionURL="http://exslt.org/str/functions/padding/index.html" supported="yes"/> <function name="align" descriptionURL="http://exslt.org/str/functions/align/index.html" supported="yes"/> <function name="encode-uri" descriptionURL="http://exslt.org/str/functions/encode-uri/index.html" supported="yes"/> <function name="decode-uri" descriptionURL="http://exslt.org/str/functions/decode-uri/index.html" supported="yes"/> <function name="concat" descriptionURL="http://exslt.org/str/functions/concat/index.html" supported="yes"/> <function name="split" descriptionURL="http://exslt.org/str/functions/split/index.html" supported="yes"/> </module> <!-- Additional EXSLT.NET functions --> <module namespace="http://gotdotnet.com/exslt/dates-and-times" prefix="date2" name="GotDotNet Dates and Times" is-exslt-module="no"> <function name="avg" descriptionURL="GDNDatesAndTimes-avg.xml" supported="yes"/> <function name="min" descriptionURL="GDNDatesAndTimes-min.xml" supported="yes"/> <function name="max" descriptionURL="GDNDatesAndTimes-max.xml" supported="yes"/> <function name="day-name" alias="dayName" descriptionURL="GDNDatesAndTimes-day-name.xml" supported="yes"/> <function name="day-abbreviation" alias="dayAbbreviation" descriptionURL="GDNDatesAndTimes-day-abbreviation.xml" supported="yes"/> <function name="month-name" alias="monthName" descriptionURL="GDNDatesAndTimes-month-name.xml" supported="yes"/> <function name="month-abbreviation" alias="monthAbbreviation" descriptionURL="GDNDatesAndTimes-month-abbreviation.xml" supported="yes"/> </module> <module namespace="http://gotdotnet.com/exslt/math" prefix="math2" name="GotDotNet Math" is-exslt-module="no"> <function name="avg" descriptionURL="GDNMath-avg.xml" supported="yes"/> </module> <module namespace="http://gotdotnet.com/exslt/regular-expressions" prefix="regexp2" name="GotDotNet Regular Expressions" is-exslt-module="no"> <function name="tokenize" descriptionURL="GDNRegularExpressions-tokenize.xml" supported="yes"/> </module> <module namespace="http://gotdotnet.com/exslt/sets" prefix="set2" name="GotDotNet Sets" is-exslt-module="no"> <function name="subset" descriptionURL="GDNSets-subset.xml" supported="yes"/> </module> <module namespace="http://gotdotnet.com/exslt/strings" prefix="str2" name="GotDotNet Strings" is-exslt-module="no"> <function name="uppercase" descriptionURL="GDNStrings-uppercase.xml" supported="yes"/> <function name="lowercase" descriptionURL="GDNStrings-lowercase.xml" supported="yes"/> </module> <module namespace="http://gotdotnet.com/exslt/dynamic" prefix="dyn2" name="GotDotNet Dynamic" is-exslt-module="no"> <function name="evaluate" descriptionURL="GDNDynamic-evaluate.xml" supported="yes"/> </module> </modules> --- NEW FILE: GDNRegularExpressions-tokenize.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="tokenize" namespace="http://gotdotnet.com/exslt/regular-expressions" prefix="regexp2"> <syntax> <return>node-set</return> <params> <param>string</param> <param>string</param> <param optional="yes">string</param> </params> </syntax> <description> <p>The <tt>regexp2:tokenize</tt> function breaks the input string (first argument) into a sequence of strings, treating any substring that matches the regexp (second argument) as a separator.</p> <p>Third optional argument is concatenation of regexp flags - 'm' for multiline matching and 'i' for case-insensitive matching.</p> <p>The separators themselves are not returned.<br/> The matching strings are returned as a set of 'match' elements.</p> </description> <sample> <source><![CDATA[ <input>The quick brown fox jumps over a lazy dog.</input> ]]></source> <stylesheet><![CDATA[<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:regexp2="http://gotdotnet.com/exslt/regular-expressions" exclude-result-prefixes="regexp2"> <xsl:output indent="yes"/> <xsl:template match="/"> <out> Input string: <xsl:value-of select="input"/> Tokens: <xsl:copy-of select="regexp2:tokenize(input, ' ')"/> </out> </xsl:template> </xsl:stylesheet> ]]></stylesheet> <result><![CDATA[<out> Input string: The quick brown fox jumps over a lazy dog. Tokens: <match>The</match> <match>quick</match> <match>brown</match> <match>fox</match> <match>jumps</match> <match>over</match> <match>a</match> <match>lazy</match> <match>dog.</match> </out>]]></result> </sample> </function> --- NEW FILE: GDNDynamic-evaluate.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="evaluate" namespace="http://gotdotnet.com/exslt/dynamic" prefix="dyn2"> <syntax> <return>object</return> <params> <param>node-set</param> <param>string</param> <param optional="yes">string</param> </params> </syntax> <description> <p>The <tt>dyn2:evaluate</tt> function evaluates a string as an XPath expression and returns the resulting value, which might be a boolean, number, string, node set, result tree fragment or external object.</p> <p>First node-set argument provides a context node (the first node in the passed node-set), such that selection paths are evaluated relative to it. Second string argument is the XPath expression to be evaluated. Third optional string argument provides namespace bindings to be used to resolve namespace prefixes in the XPath expression. Namespaces are defined in the XML style, as a space separated list of namespace declaration attributes.</p> <p>All namespace prefixes that are in scope for the context node (or its parent node if the context node isn't element node) can be referenced in the evaluated XPath expression. Note though that relying on namespace prefixes defined in the source XML is very unreliable. We encourage users to define namespace bindings explicitly in the third argument instead.</p> <p>If the node-set passed as first argument is empty (no context node) or the expression string passed as the second argument is an invalid XPath expression (including an empty string), this function returns an empty string. Malformed namespace declarations in the third argument are ignored.</p> <p>Note that this function is more limited than EXSLT's <a href="http://exslt.org/dyn/functions/evaluate/index.html">dyn:evaluate()</a> function. More formally: <ul> <li>No context position and context size information is available.</li> <li>No variable bindings - this function is unable to evaluate XPath expressions, which contain variable references!</li> <li>No custom extension functions - only core XPath functions and all extension functions, supported by EXSLT.NET are available.</li> <li>No current node, so the expression cannot contain the <tt>current()</tt> function calls.</li> <li>No key definition information available, so the expression cannot contain the <tt>key()</tt> function calls.</li> <li>No custom decimal format definitions are avilable, so the expression cannot contain the <tt>fomat-number()</tt> function calls that refer to a <tt><xsl:decimal-format></tt> definition.</li> </ul> </p> <p> You should only use this function if the expression must be constructed dynamically - otherwise it is much more efficient to use the expression literally. For expressions that simply give an element or attribute's name (to select a child element or attribute), it is more efficient to use an expression in the style:<br/> <code>*[name() = $expression]</code> </p> </description> <sample> <source><![CDATA[<data xmlns:o="http://orders.com"> <orders> <order id="o234">T-Shirt</order> <order id="o12">Polo Shirt</order> <order id="o332">Shoes</order> </orders> <orders xmlns="http://orders.com"> <order id="o11">Foo</order> <order id="o22">Bar</order> <order id="o44">Baz</order> </orders> <path>/data/orders/order[@id='o12']</path> <path2>orders/order[@id='o12']</path2> <path7>foo:orders/foo:order[@id='o11']</path7> </data>]]></source> <stylesheet><![CDATA[<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dyn2="http://gotdotnet.com/exslt/dynamic" exclude-result-prefixes="dyn2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="dyn2:evaluate(., concat('2', '+', '2'))"/> </test1> <test2> <xsl:copy-of select="dyn2:evaluate(., /data/path)"/> </test2> <test3> <xsl:value-of select="dyn2:evaluate(., /data/path)/@id"/> </test3> <test4> <xsl:copy-of select="dyn2:evaluate(., /data/path2)"/> </test4> <test5> <xsl:copy-of select="dyn2:evaluate(., 'o:orders/o:order')"/> </test5> <test6> <xsl:variable name="namespaces">xmlns:foo="http://orders.com" xmlns:bar='http://bar.com/'</xsl:variable> <xsl:copy-of select="dyn2:evaluate(., /data/path7, $namespaces)"/> </test6> </out> </xsl:template> </xsl:stylesheet>]]></stylesheet> <result><![CDATA[<out> <test1>4</test1> <test2> <order id="o12" xmlns:o="http://orders.com">Polo Shirt</order> </test2> <test3>o12</test3> <test4> <order id="o12" xmlns:o="http://orders.com">Polo Shirt</order> </test4> <test5> <order id="o11" xmlns:o="http://orders.com" xmlns="http://orders.com">Foo</order> <order id="o22" xmlns:o="http://orders.com" xmlns="http://orders.com">Bar</order> <order id="o44" xmlns:o="http://orders.com" xmlns="http://orders.com">Baz</order> </test5> <test6> <order id="o11" xmlns:o="http://orders.com" xmlns="http://orders.com">Foo</order> </test6> </out>]]></result> </sample> </function> --- NEW FILE: GDNStrings-uppercase.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="uppercase" namespace="http://gotdotnet.com/exslt/strings" prefix="str2"> <syntax> <return>string</return> <params> <param>string</param> </params> </syntax> <description> <p>This function returns a copy of argument string in uppercase, using the casing rules of the current culture.</p> </description> <sample> <source><![CDATA[<input>The Quick Brown Fox Jumps Over a Lazy Dog.</input>]]></source> <stylesheet><![CDATA[<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str2="http://gotdotnet.com/exslt/strings" extension-element-prefixes="str2"> <xsl:template match="/"> <out><xsl:value-of select="str2:uppercase(input)"/></out> </xsl:template> </xsl:stylesheet>]]></stylesheet> <result><![CDATA[<out>THE QUICK BROWN FOX JUMPS OVER A LAZY DOG.</out>]]></result> </sample> </function> --- NEW FILE: GDNStrings-lowercase.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="lowercase" namespace="http://gotdotnet.com/exslt/strings" prefix="str2"> <syntax> <return>string</return> <params> <param>string</param> </params> </syntax> <description> <p>This function returns a copy of argument string in lowercase, using the casing rules of the current culture.</p> </description> <sample> <source><![CDATA[<input>The Quick Brown Fox Jumps Over a Lazy Dog.</input>]]></source> <stylesheet><![CDATA[<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str2="http://gotdotnet.com/exslt/strings" extension-element-prefixes="str2"> <xsl:template match="/"> <out><xsl:value-of select="str2:lowercase(input)"/></out> </xsl:template> </xsl:stylesheet>]]></stylesheet> <result><![CDATA[<out>the quick brown fox jumps over a lazy dog.</out>]]></result> </sample> </function> --- NEW FILE: GDNDatesAndTimes-max.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="max" namespace="http://gotdotnet.com/exslt/dates-and-times" prefix="date2"> <syntax> <return>string</return> <params> <param>node-set</param> </params> </syntax> <description> <p>The <tt>date2:avg</tt> function returns maximum duration.<br/> String values of nodes in the argument nodeset must be in the format defined for xs:duration in [<a href="http://www.w3.org/TR/xmlschema-2/#duration">3.2.6 duration</a>] of [<a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</a>].</p> <p>If the argument is empty nodeset or string value of any node in the nodeset is not in correct format, empty string is returned.</p> <p>The return value is a string in the format defined for xs:duration in [<a href="http://www.w3.org/TR/xmlschema-2/#duration">3.2.6 duration</a>] of [<a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</a>].</p> </description> <sample> <source><![CDATA[ <root> <timespan>P1M</timespan> <timespan>P3M</timespan> </root>]]></source> <stylesheet><![CDATA[ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times"> <xsl:template match="/"> Maximum time interval is <xsl:value-of select="date2:max(root/timespan)"/>. </xsl:template> </xsl:stylesheet>]]></stylesheet> <result>Maximum time interval is P90D.</result> </sample> </function> --- NEW FILE: GDNDatesAndTimes-month-name.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="month-name" namespace="http://gotdotnet.com/exslt/dates-and-times" prefix="date2"> <syntax> <return>string</return> <params> <param optional="yes">string</param> <param>string</param> </params> </syntax> <description> <p>The <tt>date2:month-name</tt> function is I18N extension of the <a href="http://exslt.org/date/functions/month-name/index.html"><tt>date:month-name</tt></a> function.<br/> Second non-optional argument is valid according to RFC 1766 culture name (supported by <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationCultureInfoClassTopic.asp">System.Globalization.CultureInfo</a> class of .NET framework) in "<languagecode2>-<country/regioncode2>" format, e.g. "en-US" or "he-IL". </p> </description> <sample> <source><![CDATA[ <root> <date>2004-09-01</date> </root>]]></source> <stylesheet><![CDATA[ <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:template match="root"> Month name in Italian: <xsl:value-of select="date2:month-name(date, 'it-IT')"/> </xsl:template> </xsl:stylesheet>]]></stylesheet> <result>Month name in Italian: settembre</result> </sample> </function> --- NEW FILE: GDNDatesAndTimes-min.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="min" namespace="http://gotdotnet.com/exslt/dates-and-times" prefix="date2"> <syntax> <return>string</return> <params> <param>node-set</param> </params> </syntax> <description> <p>The <tt>date2:avg</tt> function returns minimum duration.<br/> String values of nodes in the argument nodeset must be in the format defined for xs:duration in [<a href="http://www.w3.org/TR/xmlschema-2/#duration">3.2.6 duration</a>] of [<a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</a>].</p> <p>If the argument is empty nodeset or string value of any node in the nodeset is not in correct format, empty string is returned.</p> <p>The return value is a string in the format defined for xs:duration in [<a href="http://www.w3.org/TR/xmlschema-2/#duration">3.2.6 duration</a>] of [<a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</a>].</p> </description> <sample> <source><![CDATA[ <root> <timespan>P1M</timespan> <timespan>P3M</timespan> </root>]]></source> <stylesheet><![CDATA[ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times"> <xsl:template match="/"> Minimum time interval is <xsl:value-of select="date2:min(root/timespan)"/>. </xsl:template> </xsl:stylesheet>]]></stylesheet> <result>Minimum time interval is P30D.</result> </sample> </function> --- NEW FILE: GDNDatesAndTimes-avg.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="avg" namespace="http://gotdotnet.com/exslt/dates-and-times" prefix="date2"> <syntax> <return>string</return> <params> <param>node-set</param> </params> </syntax> <description> <p>The <tt>date2:avg</tt> function returns average duration.<br/> String values of nodes in the argument nodeset must be in the format defined for xs:duration in [<a href="http://www.w3.org/TR/xmlschema-2/#duration">3.2.6 duration</a>] of [<a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</a>].</p> <p>If the argument is empty nodeset or string value of any node in the nodeset is not in correct format, empty string is returned.</p> <p>The return value is a string in the format defined for xs:duration in [<a href="http://www.w3.org/TR/xmlschema-2/#duration">3.2.6 duration</a>] of [<a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</a>].</p> </description> <sample> <source><![CDATA[ <root> <timespan>P1M</timespan> <timespan>P3M</timespan> </root>]]></source> <stylesheet><![CDATA[ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times"> <xsl:template match="/"> Average time interval is <xsl:value-of select="date2:avg(root/timespan)"/>. </xsl:template> </xsl:stylesheet>]]></stylesheet> <result>Average time interval is P60D.</result> </sample> </function> --- NEW FILE: GDNDatesAndTimes-day-name.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="day-name" namespace="http://gotdotnet.com/exslt/dates-and-times" prefix="date2"> <syntax> <return>string</return> <params> <param optional="yes">string</param> <param>string</param> </params> </syntax> <description> <p>The <tt>date2:day-name</tt> function is I18N extension of the <a href="http://exslt.org/date/functions/day-name/index.html"><tt>date:day-name</tt></a> function.<br/> Second non-optional argument is valid according to RFC 1766 culture name (supported by <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationCultureInfoClassTopic.asp">System.Globalization.CultureInfo</a> class of .NET framework) in "<languagecode2>-<country/regioncode2>" format, e.g. "en-US" or "he-IL". </p> </description> <sample> <source><![CDATA[ <root> <date>2004-09-01</date> </root>]]></source> <stylesheet><![CDATA[ <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:template match="root"> Day name in Russian: <xsl:value-of select="date2:day-name(date, 'ru-RU')"/> </xsl:template> </xsl:stylesheet>]]></stylesheet> <result>Day name in Russian: ÑÑеда</result> </sample> </function> --- NEW FILE: GDNMath-avg.xml --- <?xml-stylesheet type="text/xsl" href="GDNFunctions.xsl"?> <function name="avg" namespace="http://gotdotnet.com/exslt/math" prefix="math2"> <syntax> <return>number</return> <params> <param>node-set</param> </params> </syntax> <description> <p>The <tt>math2:avg</tt> function returns average value of the nodes passed as the argument.</p> <p> If the node set is empty, or if the result of converting the string values of any of the nodes to a number is NaN, then NaN is returned.</p> </description> <sample> <source><![CDATA[<values> <value>7</value> <value>11</value> <value>8</value> <value>4</value> </values> ]]></source> <stylesheet><![CDATA[<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math2="http://gotdotnet.com/exslt/math" exclude-result-prefixes="math2"> <xsl:template match="/"> <avg> Average value: <xsl:value-of select="math2:avg(values/value)"/>. </avg> </xsl:template> </xsl:stylesheet> ]]></stylesheet> <result> Average value: 7.5.</result> </sample> </function> --- NEW FILE: GDNFunctions.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="function"> <html> <head> <title>EXSLT.NET. Additional extenstion functions: <xsl:value-of select="concat(@prefix,':', @name)"/> </title> </head> <body> <h2>EXSLT.NET. Additional extenstion functions: <xsl:value-of select="concat(@prefix,':', @name)"/> </h2> <p> <b>Namespace: </b> <xsl:value-of select="@namespace"/> </p> <xsl:apply-templates select="syntax"/> <xsl:copy-of select="description"/> <xsl:apply-templates select="sample"/> </body> </html> </xsl:template> <xsl:template match="syntax"> <h3>Function Syntax</h3> <p> <i> <xsl:value-of select="return"/> </i> <xsl:value-of select="../@prefix"/>:<xsl:value-of select="../@name"/> (<xsl:for-each select="params/param"> <i> <xsl:value-of select="."/> <xsl:if test="@optional='yes'">?</xsl:if> <xsl:if test="position() != last()">, </xsl:if> </i> </xsl:for-each>)</p> </xsl:template> <xsl:template match="sample"> <h3>Example:</h3> <xsl:apply-templates/> </xsl:template> <xsl:template match="source"> <h4>Source XML document:</h4> <pre><xsl:value-of select="."/></pre> </xsl:template> <xsl:template match="stylesheet"> <h4>Stylesheet:</h4> <pre><xsl:value-of select="."/></pre> </xsl:template> <xsl:template match="result"> <h4>Result:</h4> <pre><xsl:value-of select="."/></pre> </xsl:template> </xsl:stylesheet> --- NEW FILE: Functions.htm --- <html> <head> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>EXSLT.NET 1.3 Function List</title> <style type="text/css"> body { font-family: Verdana, Arial, helvetica;} .module-table { width: 100%; } </style> </head> <body> <h2>EXSLT.NET 1.3 Function List</h2> <hr> <div>EXSLT Modules:</div> <ol> <li> <a href="#Dates and Times">Dates and Times</a> </li> <li> <a href="#Common">Common</a> </li> <li> <a href="#Math">Math</a> </li> <li> <a href="#Random">Random</a> </li> <li> <a href="#Regular Expressions">Regular Expressions</a> </li> <li> <a href="#Sets">Sets</a> </li> <li> <a href="#Strings">Strings</a> </li> </ol> <div>Additional modules:</div> <ol> <li> <a href="#GotDotNet Dates and Times">GotDotNet Dates and Times</a> </li> <li> <a href="#GotDotNet Math">GotDotNet Math</a> </li> <li> <a href="#GotDotNet Regular Expressions">GotDotNet Regular Expressions</a> </li> <li> <a href="#GotDotNet Sets">GotDotNet Sets</a> </li> <li> <a href="#GotDotNet Strings">GotDotNet Strings</a> </li> <li> <a href="#GotDotNet Dynamic">GotDotNet Dynamic</a> </li> </ol> <hr> <p> <a name="Dates and Times"> <div class="module-name"> <b>Module:</b> Dates and Times</div> </a> <div class="module-ns"> <b>Namespace:</b> http://exslt.org/dates-and-times</div> <div class="module-homepage"> <b>Homepage:</b> <a href="http://exslt.org/date/index.html">http://exslt.org/date/index.html</a></div> <table border="1" class="module-table"> <tr> <th>Function name</th> <th>Alias</th> <th>Supported</th> </tr> <tr> <td> <a href="http://exslt.org/date/functions/format-date/index.html">date:format-date</a> </td> <td align="center">formatDate</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/parse-date/index.html">date:parse-date</a> </td> <td align="center">parseDate</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/date-time/index.html">date:date-time</a> </td> <td align="center">dateTime</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/date/index.html">date:date</a> </td> <td align="center">-</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/time/index.html">date:time</a> </td> <td align="center">-</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/year/index.html">date:year</a> </td> <td align="center">-</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/leap-year/index.html">date:leap-year</a> </td> <td align="center">leapYear</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/month-in-year/index.html">date:month-in-year</a> </td> <td align="center">monthInYear</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/month-name/index.html">date:month-name</a> </td> <td align="center">monthName</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/month-abbreviation/index.html">date:month-abbreviation</a> </td> <td align="center">monthAbbreviation</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/week-in-year/index.html">date:week-in-year</a> </td> <td align="center">weekInYear</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/week-in-month/index.html">date:week-in-month</a> </td> <td align="center">weekInMonth</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/day-in-year/index.html">date:day-in-year</a> </td> <td align="center">dayInYear</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/day-in-month/index.html">date:day-in-month</a> </td> <td align="center">dayInMonth</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/day-of-week-in-month/index.html">date:day-of-week-in-month</a> </td> <td align="center">dayOfWeekInMonth</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/day-in-week/index.html">date:day-in-week</a> </td> <td align="center">dayInWeek</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/day-name/index.html">date:day-name</a> </td> <td align="center">dayName</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/day-abbreviation/index.html">date:day-abbreviation</a> </td> <td align="center">dayAbbreviation</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/hour-in-day/index.html">date:hour-in-day</a> </td> <td align="center">hourInDay</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/minute-in-hour/index.html">date:minute-in-hour</a> </td> <td align="center">minuteInHour</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/second-in-minute/index.html">date:second-in-minute</a> </td> <td align="center">secondInMinute</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> <a href="http://exslt.org/date/functions/difference/index.html">date:difference</a> </td> <td align="center">-</td> <td align="center" style="color:green;">yes</td> </tr> <tr> <td> ... [truncated message content] |
From: Oleg T. <he...@us...> - 2005-07-19 20:58:07
|
Update of /cvsroot/mvp-xml/WebSite/exslt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19961/exslt Log Message: Directory /cvsroot/mvp-xml/WebSite/exslt added to the repository |
From: Oleg T. <he...@us...> - 2005-07-19 20:56:54
|
Update of /cvsroot/mvp-xml/WebSite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19657 Modified Files: index.html Log Message: Index: index.html =================================================================== RCS file: /cvsroot/mvp-xml/WebSite/index.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- index.html 17 Jan 2005 07:55:41 -0000 1.10 +++ index.html 19 Jul 2005 20:56:45 -0000 1.11 @@ -42,6 +42,8 @@ <li><a href="xinclude/index.html">XInclude.NET</a> module<br> </li> <li><a href="xpointer/index.html">XPointer.NET</a> module</li> + <li><a href="exslt/index.html">EXSLT.NET module</a><br> + </li> </ul> <h2><a class="mozTocH2" name="mozTocId421746"></a>2. News</h2> Mvp.Xml News: <a |
From: Oleg T. <he...@us...> - 2005-07-19 20:27:51
|
Update of /cvsroot/mvp-xml/EXSLT/v1/src/Exslt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10482/v1/src/Exslt Removed Files: ReadMe.htm Log Message: --- ReadMe.htm DELETED --- |
Update of /cvsroot/mvp-xml/EXSLT/v1/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9496/v1/doc Removed Files: Functions.htm Functions.xml Functions.xslt GDNDatesAndTimes-avg.xml GDNDatesAndTimes-day-abbreviation.xml GDNDatesAndTimes-day-name.xml GDNDatesAndTimes-max.xml GDNDatesAndTimes-min.xml GDNDatesAndTimes-month-abbreviation.xml GDNDatesAndTimes-month-name.xml GDNDynamic-evaluate.xml GDNFunctions.xsl GDNMath-avg.xml GDNRegularExpressions-tokenize.xml GDNSets-subset.xml GDNStrings-lowercase.xml GDNStrings-uppercase.xml buildFuncList.cmd Log Message: --- GDNDatesAndTimes-month-abbreviation.xml DELETED --- --- Functions.xml DELETED --- --- GDNDatesAndTimes-min.xml DELETED --- --- GDNDynamic-evaluate.xml DELETED --- --- GDNStrings-uppercase.xml DELETED --- --- GDNStrings-lowercase.xml DELETED --- --- GDNDatesAndTimes-max.xml DELETED --- --- GDNDatesAndTimes-month-name.xml DELETED --- --- Functions.xslt DELETED --- --- GDNDatesAndTimes-avg.xml DELETED --- --- GDNDatesAndTimes-day-name.xml DELETED --- --- GDNMath-avg.xml DELETED --- --- GDNFunctions.xsl DELETED --- --- Functions.htm DELETED --- --- GDNDatesAndTimes-day-abbreviation.xml DELETED --- --- buildFuncList.cmd DELETED --- --- GDNSets-subset.xml DELETED --- --- GDNRegularExpressions-tokenize.xml DELETED --- |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:41
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/GotDotNet/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/GotDotNet/Dynamic Added Files: evaluate.xslt source.xml Log Message: --- NEW FILE: evaluate.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dyn2="http://gotdotnet.com/exslt/dynamic" exclude-result-prefixes="dyn2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="dyn2:evaluate(., concat('2', '+', '2'))"/> </test1> <test2> <xsl:copy-of select="dyn2:evaluate(., /data/path)"/> </test2> <test3> <xsl:value-of select="dyn2:evaluate(., /data/path)/@id"/> </test3> <test4> <xsl:copy-of select="dyn2:evaluate(., /data/path2)"/> </test4> <test5> <xsl:value-of select="dyn2:evaluate(/no/such/node, /data/path2)"/> </test5> <test6> <xsl:copy-of select="dyn2:evaluate(., '')"/> </test6> <test7> <xsl:copy-of select="dyn2:evaluate(., /data/path3)"/> </test7> <test8> <xsl:copy-of select="dyn2:evaluate(., 'dyn2:evaluate(., str:concat(path4|path5|path6))')"/> </test8> <test9> <xsl:copy-of select="dyn2:evaluate(., 'orders/order[last()]')"/> </test9> <test10> <xsl:variable name="namespaces">xmlns:foo="http://orders.com" xmlns:bar='http://bar.com/'</xsl:variable> <xsl:copy-of select="dyn2:evaluate(., /data/path7, $namespaces)"/> </test10> <test11> <xsl:copy-of select="dyn2:evaluate(., /data/path7, '')"/> </test11> <test12> <xsl:variable name="namespaces"> xmlns:bar='http://bar.com/" xmlns:foo = "http://orders.com" </xsl:variable> <xsl:copy-of select="dyn2:evaluate(., /data/path7, $namespaces)"/> </test12> <test13> <xsl:copy-of select="dyn2:evaluate(., 'current()')"/> </test13> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="evaluate.xslt"?> <data xmlns:o="http://orders.com"> <orders> <order id="o234">T-Shirt</order> <order id="o12">Polo Shirt</order> <order id="o332">Shoes</order> </orders> <orders xmlns="http://orders.com"> <order id="o11">Foo</order> <order id="o22">Bar</order> <order id="o44">Baz</order> </orders> <path>/data/orders/order[@id='o12']</path> <path2>orders/order[@id='o12']</path2> <path3>o:orders/o:order[@id='o44']</path3> <path4>/data</path4> <path5>/orders/order</path5> <path6>[@id='o332']</path6> <path7>foo:orders/foo:order[@id='o11']</path7> </data> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:41
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/GotDotNet/Math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/GotDotNet/Math Added Files: avg.xslt source.xml Log Message: --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="avg.xslt"?> <data> <values> <value>7</value> <value>11</value> <value>8</value> <value>4</value> <bad-value>12a</bad-value> </values> </data> --- 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:math2="http://gotdotnet.com/exslt/math" exclude-result-prefixes="math2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> Average value: <xsl:value-of select="math2:avg(values/value)"/>. </test1> <test2> Average value: <xsl:value-of select="math2:avg(values/bad-value)"/>. </test2> <test3> Average value: <xsl:value-of select="math2:avg(no/such/nodes)"/>. </test3> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:41
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests Added Files: availability.xslt invoice-processor.xsl invoice.xml regexp-match-test.xslt test.xml Log Message: --- NEW FILE: invoice-processor.xsl --- <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" exclude-result-prefixes="exsl"> <xsl:template match="/"> <!-- Main result document - confirmation --> <html> <head> <title>Thank you for purchasing!</title> </head> <body> <h2>Thank you for purchasing at fabrikam.com!</h2> </body> <xsl:apply-templates mode="order"/> </html> </xsl:template> <xsl:template match="invoice" mode="order"> <!-- Additional result document - SOAP message for fabrikam.com order processing web service --> <exsl:document href="soap/order.xml" indent="yes"> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns:Order xmlns:ns="urn:fabrikam-com:orders"> <xsl:apply-templates mode="order"/> </ns:Order> </soap:Body> </soap:Envelope> </exsl:document> </xsl:template> <xsl:template match="item" mode="order"> <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> --- NEW FILE: test.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="D:\projects\EXSLT.NET\ExsltTest\tests\availability.xslt"?> <root> </root> --- NEW FILE: availability.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:date="http://exslt.org/dates-and-times" xmlns:math="http://exslt.org/math" xmlns:random="http://exslt.org/random" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:set="http://exslt.org/sets" xmlns:str="http://exslt.org/strings" xmlns:date2="http://gotdotnet.com/exslt/dates-and-times" xmlns:math2="http://gotdotnet.com/exslt/math" xmlns:regexp2="http://gotdotnet.com/exslt/regular-expressions" xmlns:set2="http://gotdotnet.com/exslt/sets" xmlns:str2="http://gotdotnet.com/exslt/strings" xmlns:dyn2="http://gotdotnet.com/exslt/dynamic" exclude-result-prefixes="exsl date math regexp set str date2 math2 regexp2 set2 random dyn2"> <xsl:template match="/"> <html> <head> <title>EXSLT.NET regression test - functions availability</title> </head> <body> <h3>EXSLT.NET regression test - functions availability</h3> <xsl:apply-templates select="document('../../../doc/Functions.xml')/*/module"/> </body> </html> </xsl:template> <xsl:template match="module"> <p> <h4><xsl:if test="@is-exslt-module='yes'">EXSLT: </xsl:if> <xsl:value-of select="@name"/></h4> <table border="1" width="100%"> <tr> <th>Function name</th> <th>Availability</th> </tr> <xsl:apply-templates select="function"/> </table> </p> </xsl:template> <xsl:template match="function"> <tr> <xsl:variable name="fn" select="concat(../@prefix, ':', @name)"/> <td><xsl:value-of select="$fn"/></td> <td align="center"> <xsl:choose> <xsl:when test="function-available($fn)"> <span style="color:green">Ok</span> </xsl:when> <xsl:otherwise> <span style="color:red">Not available</span> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:template> </xsl:stylesheet> --- NEW FILE: regexp-match-test.xslt --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:regexp="http://exslt.org/regular-expressions"> <xsl:template match="/"> -------------------------------------------------------------------- Test 1, expected results: Part 1 = http://www.bayes.co.uk/xml/index.xml?/xml/utils/rechecker.xml Part 2 = http Part 3 = www.bayes.co.uk Part 4 = Part 5 = /xml/index.xml?/xml/utils/rechecker.xml Results: <xsl:for-each select="regexp:match('http://www.bayes.co.uk/xml/index.xml?/xml/utils/rechecker.xml', '(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> -------------------------------------------------------------------- Test 2, expected results: Part 1 = This Part 2 = is Part 3 = a Part 4 = test Part 5 = string Results: <xsl:for-each select="regexp:match('This is a test string', '(\w+)', 'g')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> -------------------------------------------------------------------- Test 3, expected results: Part 1 = his Part 2 = is Part 3 = a Part 4 = test Results: <xsl:for-each select="regexp:match('This is a test string', '([a-z])+ ', 'g')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> -------------------------------------------------------------------- Test 4, expected results: Part 1 = This Part 2 = is Part 3 = a Part 4 = test Results: <xsl:for-each select="regexp:match('This is a test string', '([a-z])+ ', 'gi')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> -------------------------------------------------------------------- Test 5, expected results: Part 1 = 22/12/2003 21:00 AcmeService DB updated Part 2 = 22/12/2003 Part 3 = 21:00 Part 4 = AcmeService Part 5 = DB updated Results: <xsl:for-each select="regexp:match ('22/12/2003 21:00 AcmeService DB updated', '(\d{1,2}/\d{1,2}/\d{4})\s+(\d{2}:\d{2})\s+(\w*)\s+(.*)')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> </xsl:template> </xsl:stylesheet> --- NEW FILE: invoice.xml --- <invoice> <item>Wallabee</item> <item>Wombat</item> <item>Wren</item> </invoice> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:41
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/GotDotNet/Sets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/GotDotNet/Sets Added Files: source.xml subset.xslt Log Message: --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="subset.xslt"?> <data> <doc> <city name="Paris" country="France"/> <city name="Madrid" country="Spain"/> <city name="Vienna" country="Austria"/> <city name="Barcelona" country="Spain"/> <city name="Salzburg" country="Austria"/> <city name="Bonn" country="Germany"/> <city name="Lyon" country="France"/> <city name="Hannover" country="Germany"/> <city name="Calais" country="France"/> <city name="Berlin" country="Germany"/> </doc> </data> --- NEW FILE: subset.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set2="http://gotdotnet.com/exslt/sets" exclude-result-prefixes="set2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:variable name="all-cities" select="doc/city"/> <xsl:variable name="all-spanish-cities" select="doc/city[@country='Spain']"/> Set of Spanish cities is a subset of all cities, right? <xsl:value-of select="set2:subset($all-spanish-cities, $all-cities)"/> Set of all cities is a subset of Spanish cities, right? <xsl:value-of select="set2:subset($all-cities, $all-spanish-cities)"/> </test1> <test2> <xsl:value-of select="set2:subset(doc/city, /no/such/node)"/> </test2> <test3> <xsl:value-of select="set2:subset(/no/such/node, doc/city)"/> </test3> <test4> <xsl:value-of select="set2:subset(/no/such/node, /no/such/node)"/> </test4> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:41
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/GotDotNet/Strings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/GotDotNet/Strings Added Files: lowercase.xslt source.xml uppercase.xslt Log Message: --- NEW FILE: lowercase.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str2="http://gotdotnet.com/exslt/strings" extension-element-prefixes="str2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str2:lowercase(input)"/> </test1> <test2> <xsl:value-of select="str2:lowercase('')"/> </test2> <test3> <xsl:value-of select="str2:lowercase(input-ru)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: uppercase.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str2="http://gotdotnet.com/exslt/strings" extension-element-prefixes="str2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str2:uppercase(input)"/> </test1> <test2> <xsl:value-of select="str2:uppercase('')"/> </test2> <test3> <xsl:value-of select="str2:uppercase(input-ru)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:40
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/Math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/Math Added Files: abs.xslt acos.xslt asin.xslt atan.xslt atan2.xslt constant.xslt cos.xslt exp.xslt highest.xslt log.xslt lowest.xslt max.xslt min.xslt power.xslt random.xslt sin.xslt source.xml sqrt.xslt tan.xslt Log Message: --- NEW FILE: atan.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:atan(0.5)"/> </test1> <test2> <xsl:value-of select="math:atan(-0.9)"/> </test2> <test3> <xsl:value-of select="math:atan(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:atan(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:atan(-22 div 0)"/> </test5> <test6> <xsl:value-of select="math:atan(0)"/> </test6> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: asin.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:asin(0.5)"/> </test1> <test2> <xsl:value-of select="math:asin(-0.9)"/> </test2> <test3> <xsl:value-of select="math:asin(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:asin(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:asin(-22 div 0)"/> </test5> <test6> <xsl:value-of select="math:asin(0)"/> </test6> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: lowest.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> lowest orders: <xsl:copy-of select="math:lowest(/data/orders/order)"/> </test1> <test2> lowest orders: <xsl:copy-of select="math:lowest(/no/such/nodes)"/> </test2> <test3> lowest orders: <xsl:copy-of select="math:lowest(/data/bad-data)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: highest.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> Max orders: <xsl:copy-of select="math:highest(/data/orders/order)"/> </test1> <test2> Max orders: <xsl:copy-of select="math:highest(/no/such/nodes)"/> </test2> <test3> Max orders: <xsl:copy-of select="math:highest(/data/bad-data)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: log.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:log(-22.9)"/> </test1> <test2> <xsl:value-of select="math:log(22.9)"/> </test2> <test3> <xsl:value-of select="math:log(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:log(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:log(-22 div 0)"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: atan2.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:atan2(0.5, 0.7)"/> </test1> <test2> <xsl:value-of select="math:atan2(-0.9, -0.4)"/> </test2> <test3> <xsl:value-of select="math:atan2(/data/bad-data, 4)"/> </test3> <test4> <xsl:value-of select="math:atan2(22 div 0, 3)"/> </test4> <test5> <xsl:value-of select="math:atan2(-22 div 0, 2)"/> </test5> <test6> <xsl:value-of select="math:atan2(0, 0)"/> </test6> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: power.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:power(3, 2)"/> </test1> <test2> <xsl:value-of select="math:power(-22.9, 3.5)"/> </test2> <test3> <xsl:value-of select="math:power(/data/bad-data, /data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:power(22 div 0, 3)"/> </test4> <test5> <xsl:value-of select="math:power(334, -22 div 0)"/> </test5> <test6> <xsl:value-of select="math:power(2, -2)"/> </test6> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: sin.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:sin(360)"/> </test1> <test2> <xsl:value-of select="math:sin(-22.9)"/> </test2> <test3> <xsl:value-of select="math:sin(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:sin(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:sin(-22 div 0)"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: exp.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:exp(30)"/> </test1> <test2> <xsl:value-of select="math:exp(-22)"/> </test2> <test3> <xsl:value-of select="math:exp(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:exp(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:exp(-22 div 0)"/> </test5> <test6> <xsl:value-of select="math:exp(2.5)"/> </test6> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet type="text/xsl" href="acos.xslt"?> <data> <orders> <order>100</order> <order>1.99</order> <order>12.99</order> <order>59.99</order> <order>2.99</order> <order>1.99</order> <order>999.99</order> <order>123.45</order> <order>999.99</order> </orders> <bad-data>23.99]</bad-data> <bad-data>22.99</bad-data> </data> --- NEW FILE: cos.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:cos(360)"/> </test1> <test2> <xsl:value-of select="math:cos(-22.9)"/> </test2> <test3> <xsl:value-of select="math:cos(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:cos(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:cos(-22 div 0)"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: tan.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:tan(360)"/> </test1> <test2> <xsl:value-of select="math:tan(-22.9)"/> </test2> <test3> <xsl:value-of select="math:tan(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:tan(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:tan(-22 div 0)"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: random.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:variable name="rnd" select="math:random()"/> <xsl:value-of select="$rnd >= 0 and $rnd <= 1"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: acos.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:acos(0.5)"/> </test1> <test2> <xsl:value-of select="math:acos(-0.9)"/> </test2> <test3> <xsl:value-of select="math:acos(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:acos(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:acos(-22 div 0)"/> </test5> <test6> <xsl:value-of select="math:acos(0)"/> </test6> </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:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> Minimal order: <xsl:value-of select="math:min(/data/orders/order)"/> </test1> <test2> Minimal order: <xsl:value-of select="math:min(/no/such/nodes)"/> </test2> <test3> Minimal order: <xsl:value-of select="math:min(/data/bad-data)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: sqrt.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:sqrt(9)"/> </test1> <test2> <xsl:value-of select="math:sqrt(-22.9)"/> </test2> <test3> <xsl:value-of select="math:sqrt(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:sqrt(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:sqrt(-22 div 0)"/> </test5> </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:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> Max order: <xsl:value-of select="math:max(/data/orders/order)"/> </test1> <test2> Max order: <xsl:value-of select="math:max(/no/such/nodes)"/> </test2> <test3> Max order: <xsl:value-of select="math:max(/data/bad-data)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: constant.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:constant('PI', 10)"/> </test1> <test2> <xsl:value-of select="math:constant('E', 100)"/> </test2> <test3> <xsl:value-of select="math:constant('SQRRT2', 10)"/> </test3> <test4> <xsl:value-of select="math:constant('LN2', 3)"/> </test4> <test5> <xsl:value-of select="math:constant('LN10', 3)"/> </test5> <test6> <xsl:value-of select="math:constant('LOG2E', 4)"/> </test6> <test7> <xsl:value-of select="math:constant('SQRT1_2', 5)"/> </test7> <test8> <xsl:value-of select="math:constant('PI', -1)"/> </test8> <test9> <xsl:value-of select="math:constant('PI', 22 div 0)"/> </test9> <test10> <xsl:value-of select="math:constant('PI', -22 div 0)"/> </test10> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: abs.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" exclude-result-prefixes="math"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:value-of select="math:abs(-22.9)"/> </test1> <test2> <xsl:value-of select="math:abs(22.9)"/> </test2> <test3> <xsl:value-of select="math:abs(/data/bad-data)"/> </test3> <test4> <xsl:value-of select="math:abs(22 div 0)"/> </test4> <test5> <xsl:value-of select="math:abs(-22 div 0)"/> </test5> </out> </xsl:template> </xsl:stylesheet> |
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltXPathTest/obj/Debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltXPathTest/obj/Debug Added Files: ExsltXPathTest.dll ExsltXPathTest.dll.incr ExsltXPathTest.exe ExsltXPathTest.exe.incr ExsltXPathTest.projdata Log Message: --- NEW FILE: ExsltXPathTest.exe.incr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ExsltXPathTest.projdata --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ExsltXPathTest.exe --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ExsltXPathTest.dll.incr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ExsltXPathTest.dll --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/GotDotNet/RegularExpressions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/GotDotNet/RegularExpressions Added Files: source.xml tokenize.xslt Log Message: --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="tokenize.xslt"?> <data> <input>The quick brown fox jumps over a lazy dog.</input> </data> --- NEW FILE: tokenize.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:regexp2="http://gotdotnet.com/exslt/regular-expressions" exclude-result-prefixes="regexp2"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="regexp2:tokenize(input, ' ')"/> </test1> <test2> <xsl:copy-of select="regexp2:tokenize(input, ' ', 'm')"/> </test2> <test3> <xsl:copy-of select="regexp2:tokenize(input, ' ', 'i')"/> </test3> <test4> <xsl:copy-of select="regexp2:tokenize(input, ' ', 'mi')"/> </test4> <test5> <xsl:copy-of select="regexp2:tokenize(input, ' ', '')"/> </test5> <test6> <xsl:copy-of select="regexp2:tokenize(/no/such/node, ' ')"/> </test6> <test7> <xsl:copy-of select="regexp2:tokenize(input, '')"/> </test7> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/Random In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/Random Added Files: random-sequence.xslt source.xml Log Message: --- NEW FILE: source.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: random-sequence.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:random="http://exslt.org/random" exclude-result-prefixes="random"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="count(random:random-sequence(10))"/> </test1> <test2> <xsl:value-of select="count(random:random-sequence())"/> </test2> <test3> <xsl:value-of select="count(random:random-sequence(0))"/> </test3> <test4> <xsl:value-of select="count(random:random-sequence(3.5, 0.5))"/> </test4> <test5> <xsl:value-of select="count(random:random-sequence(-5))"/> </test5> <test6> <xsl:value-of select="count(random:random-sequence(5, 0))"/> </test6> <test7> <xsl:value-of select="count(random:random-sequence(5, 5 div 0))"/> </test7> <test8> <xsl:value-of select="count(random:random-sequence(5, -0.5))"/> </test8> </out> </xsl:template> </xsl:stylesheet> |
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/DatesAndTimes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/DatesAndTimes Added Files: add-duration.xslt add.xslt date-time.xslt date.xslt day-abbreviation.xslt day-in-month.xslt day-in-week.xslt day-in-year.xslt day-name.xslt day-of-week-in-month.xslt difference.xslt duration.xslt format-date.xslt hour-in-day.xslt leap-year.xslt minute-in-hour.xslt month-abbreviation.xslt month-in-year.xslt month-name.xslt parse-date.xslt second-in-minute.xslt seconds.xslt source.xml sum.xslt time.xslt week-in-month.xslt week-in-year.xslt year.xslt 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:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:month-name(date)"/> </test1> <test2> <xsl:value-of select="date:month-name(bad-date)"/> </test2> <test3> <xsl:value-of select="date:month-name('2004-01-19T07:59:02')"/> </test3> <test4> <xsl:value-of select="date:month-name('2004-02-19T07:59:02')"/> </test4> <test5> <xsl:value-of select="date:month-name('2004-03-19T07:59:02')"/> </test5> <test6> <xsl:value-of select="date:month-name('2004-04-19T07:59:02')"/> </test6> <test7> <xsl:value-of select="date:month-name('2004-05-19T07:59:02')"/> </test7> <test8> <xsl:value-of select="date:month-name('2004-06-19T07:59:02')"/> </test8> <test9> <xsl:value-of select="date:month-name('2004-07-19T07:59:02')"/> </test9> <test10> <xsl:value-of select="date:month-name('2004-08-19T07:59:02')"/> </test10> <test11> <xsl:value-of select="date:month-name('2004-09-19T07:59:02')"/> </test11> <test12> <xsl:value-of select="date:month-name('2004-10-19T07:59:02')"/> </test12> <test13> <xsl:value-of select="date:month-name('2004-11-19T07:59:02')"/> </test13> <test14> <xsl:value-of select="date:month-name('2004-12-19T07:59:02')"/> </test14> <test15> <xsl:value-of select="date:month-name('2004-13-19T07:59:02')"/> </test15> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: duration.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:duration(994241336)"/> </test1> <test2> <xsl:value-of select="date:duration(1000274342)"/> </test2> <test3> <xsl:value-of select="date:duration(10368000)"/> </test3> <test4> <xsl:value-of select="date:duration(63072000)"/> </test4> <test5> <xsl:value-of select="date:duration(7776000)"/> </test5> <test6> <xsl:value-of select="date:duration(-7776000)"/> </test6> <test7> <xsl:value-of select="date:duration(11 div 0)"/> </test7> <test8> <xsl:value-of select="date:duration(0)"/> </test8> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: day-in-week.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:day-in-week(date)"/> </test1> <test2> <xsl:value-of select="date:day-in-week(bad-date)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: day-in-year.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:day-in-year(date)"/> </test1> <test1> <xsl:value-of select="date:day-in-year(bad-date)"/> </test1> </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:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:day-name(date)"/> </test1> <test2> <xsl:value-of select="date:day-name(bad-date)"/> </test2> <test3> <xsl:value-of select="date:day-name('2004-09-19T07:59:02')"/> </test3> <test4> <xsl:value-of select="date:day-name('2004-09-20T07:59:02')"/> </test4> <test5> <xsl:value-of select="date:day-name('2004-09-21T07:59:02')"/> </test5> <test6> <xsl:value-of select="date:day-name('2004-09-22T07:59:02')"/> </test6> <test7> <xsl:value-of select="date:day-name('2004-09-23T07:59:02')"/> </test7> <test8> <xsl:value-of select="date:day-name('2004-09-24T07:59:02')"/> </test8> <test9> <xsl:value-of select="date:day-name('2004-09-25T07:59:02')"/> </test9> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: hour-in-day.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:hour-in-day(date)"/> </test1> <test2> <xsl:value-of select="date:hour-in-day(bad-date)"/> </test2> <test3> <xsl:value-of select="date:hour-in-day(time)"/> </test3> <test4> <xsl:value-of select="date:hour-in-day(date3)"/> </test4> <test5> <xsl:value-of select="date:hour-in-day(time2)"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: add-duration.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:add-duration('P1YT2S', 'P2D')"/> </test1> <test2> <xsl:value-of select="date:add-duration('P3M2D', 'PT5H2M')"/> </test2> <test3> <xsl:value-of select="date:add-duration('ZZZ', 'P2Y')"/> </test3> <test4> <xsl:value-of select="date:add-duration('', 'P2Y')"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: second-in-minute.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:second-in-minute(date)"/> </test1> <test2> <xsl:value-of select="date:second-in-minute(bad-date)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: week-in-year.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:week-in-year(date)"/> </test1> <test1> <xsl:value-of select="date:week-in-year(bad-date)"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: format-date.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:format-date(date, 'yyyy.MM.dd G HH:mm:ss z')"/> </test1> <test2> <xsl:value-of select="date:format-date(date, 'EEE, MMM d, yyyy')"/> </test2> <test3> <xsl:value-of select="date:format-date(date, 'h:mm a')"/> </test3> <test4> <xsl:value-of select="date:format-date(date, 'hh a, zzzz')"/> </test4> <test5> <xsl:value-of select="date:format-date(date, 'K:mm a, z')"/> </test5> <test6> <xsl:value-of select="date:format-date(date, 'yyyyy.MMMMM.dd GGG hh:mm aaa')"/> </test6> <test7> <xsl:value-of select="date:format-date(date, 'EEE, d MMM yyyy HH:mm:ss Z')"/> </test7> <test8> <xsl:value-of select="date:format-date(date, 'yyMMddHHmmssZ')"/> </test8> <test9> <xsl:value-of select="date:format-date(/no/such/node, 'yyMMddHHmmssZ')"/> </test9> <test10> <xsl:value-of select="date:format-date(date, '')"/> </test10> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="parse-date.xslt"?> <data> <date>2001-07-04T12:08:56+02:00</date> <date2>2001-09-12T07:59:02+02:00</date2> <date3>2001-09-12T07:59:02</date3> <time>07:59:02+02:00</time> <time2>07:59:02</time2> <bad-date>2001/07/04</bad-date> <d>P1YT2S</d> <d>P2D</d> <d>P3M2D</d> <d>PT5H2M</d> <bad-d>PM3D</bad-d> <dates> <test1>2001.07.04 AD 12:08:56 +02:00</test1> <test2>Wed, Jul 4, 2001</test2> <test3>12:08 PM</test3> <test4>12 PM, +02:00</test4> <test5>0:08 PM, +02:00</test5> <test6>02001.July.04 AD 12:08 PM</test6> <test7>Wed, 4 Jul 2001 12:08:56 +0200</test7> <test8>010704120856+0200</test8> <test9/> <test10/> </dates> </data> --- 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:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:month-abbreviation(date)"/> </test1> <test2> <xsl:value-of select="date:month-abbreviation(bad-date)"/> </test2> <test3> <xsl:value-of select="date:month-abbreviation('2004-01-19T07:59:02')"/> </test3> <test4> <xsl:value-of select="date:month-abbreviation('2004-02-19T07:59:02')"/> </test4> <test5> <xsl:value-of select="date:month-abbreviation('2004-03-19T07:59:02')"/> </test5> <test6> <xsl:value-of select="date:month-abbreviation('2004-04-19T07:59:02')"/> </test6> <test7> <xsl:value-of select="date:month-abbreviation('2004-05-19T07:59:02')"/> </test7> <test8> <xsl:value-of select="date:month-abbreviation('2004-06-19T07:59:02')"/> </test8> <test9> <xsl:value-of select="date:month-abbreviation('2004-07-19T07:59:02')"/> </test9> <test10> <xsl:value-of select="date:month-abbreviation('2004-08-19T07:59:02')"/> </test10> <test11> <xsl:value-of select="date:month-abbreviation('2004-09-19T07:59:02')"/> </test11> <test12> <xsl:value-of select="date:month-abbreviation('2004-10-19T07:59:02')"/> </test12> <test13> <xsl:value-of select="date:month-abbreviation('2004-11-19T07:59:02')"/> </test13> <test14> <xsl:value-of select="date:month-abbreviation('2004-12-19T07:59:02')"/> </test14> <test15> <xsl:value-of select="date:month-abbreviation('2004-13-19T07:59:02')"/> </test15> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: minute-in-hour.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:minute-in-hour(date)"/> </test1> <test2> <xsl:value-of select="date:minute-in-hour(bad-date)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: seconds.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:seconds(date)"/> </test1> <test2> <xsl:value-of select="date:seconds(date2)"/> </test2> <test3> <xsl:value-of select="date:seconds('P120D')"/> </test3> <test4> <xsl:value-of select="date:seconds('P2Y')"/> </test4> <test5> <xsl:value-of select="date:seconds('P3M')"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: year.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:year(date)"/> </test1> <test1> <xsl:value-of select="date:year(bad-date)"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: add.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:add(date, 'P2D')"/> </test1> <test2> <xsl:value-of select="date:add(date2, 'PT5H2M')"/> </test2> <test3> <xsl:value-of select="date:add(bad-date, 'P2Y')"/> </test3> <test4> <xsl:value-of select="date:add(date3, 'P2DT1H1M')"/> </test4> <test5> <xsl:value-of select="date:add('2000-01-12T12:13:14Z', 'P1Y3M5DT7H10M3S')"/> </test5> <test6> <xsl:value-of select="date:add('2000-01', '-P3M')"/> </test6> <test7> <xsl:value-of select="date:add('2000-01-12', 'PT33H')"/> </test7> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: month-in-year.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:month-in-year(date)"/> </test1> <test1> <xsl:value-of select="date:month-in-year(bad-date)"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: week-in-month.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:week-in-month(date)"/> </test1> <test1> <xsl:value-of select="date:week-in-month(bad-date)"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: sum.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:sum(d)"/> </test1> <test2> <xsl:value-of select="date:sum(d|bad-d)"/> </test2> <test3> <xsl:value-of select="date:sum(/no/such/nodes)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: day-in-month.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:day-in-month(date)"/> </test1> <test1> <xsl:value-of select="date:day-in-month(bad-date)"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: day-of-week-in-month.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:day-of-week-in-month(date)"/> </test1> <test2> <xsl:value-of select="date:day-of-week-in-month(bad-date)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: parse-date.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: date-time.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:date-time() = date:date-time()"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- 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:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:day-abbreviation(date)"/> </test1> <test2> <xsl:value-of select="date:day-abbreviation(bad-date)"/> </test2> <test3> <xsl:value-of select="date:day-abbreviation('2004-09-19T07:59:02')"/> </test3> <test4> <xsl:value-of select="date:day-abbreviation('2004-09-20T07:59:02')"/> </test4> <test5> <xsl:value-of select="date:day-abbreviation('2004-09-21T07:59:02')"/> </test5> <test6> <xsl:value-of select="date:day-abbreviation('2004-09-22T07:59:02')"/> </test6> <test7> <xsl:value-of select="date:day-abbreviation('2004-09-23T07:59:02')"/> </test7> <test8> <xsl:value-of select="date:day-abbreviation('2004-09-24T07:59:02')"/> </test8> <test9> <xsl:value-of select="date:day-abbreviation('2004-09-25T07:59:02')"/> </test9> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: leap-year.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:leap-year(date)"/> </test1> <test2> <xsl:value-of select="date:leap-year('2004-04-01')"/> </test2> <test3> <xsl:value-of select="date:leap-year(bad-date)"/> </test3> <test4> <xsl:value-of select="date:leap-year('2000-04')"/> </test4> <test5> <xsl:value-of select="date:leap-year('2100')"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: difference.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:difference(date, date2)"/> </test1> <test2> <xsl:value-of select="date:difference(date2, date)"/> </test2> <test3> <xsl:value-of select="date:difference(bad-date, date)"/> </test3> <test4> <xsl:value-of select="date:difference('', date)"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: date.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:date(date)"/> </test1> <test2> <xsl:value-of select="date:date(bad-date)"/> </test2> <test3> <xsl:value-of select="date:date(date3)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: time.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="date:time(date)"/> </test1> <test2> <xsl:value-of select="date:time(bad-date)"/> </test2> <test3> <xsl:value-of select="date:time(date3)"/> </test3> <test4> <xsl:value-of select="date:time(time)"/> </test4> <test5> <xsl:value-of select="date:time(time2)"/> </test5> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltXPathTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltXPathTest Added Files: .cvsignore AssemblyInfo.cs ExsltXPathTest.cs ExsltXPathTest.csproj ExsltXPathTest.csproj.user ExsltXPathTest.csproj.vspscc ExsltXPathTest.dll ExsltXPathTest.exe Makefile Mvp.Xml.Exslt.dll Log Message: --- NEW FILE: .cvsignore --- bin obj *.user *.suo *.dll *.pdb *.exe --- NEW FILE: ExsltXPathTest.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{705AA213-1D02-4CD2-9ED5-A7D9668C714D}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "ExsltXPathTest" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Exe" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "ExsltXPathTest" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "ExsltXPathTest.ExsltXPathTest" > <Config Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" IncrementalBuild = "true" NoStdLib = "false" NoWarn = "" Optimize = "false" OutputPath = ".\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <Config Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "TRACE" DocumentationFile = "" DebugSymbols = "false" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "true" OutputPath = ".\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> </Settings> <References> <Reference Name = "System" AssemblyName = "System" HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" /> <Reference Name = "Mvp.Xml.Exslt" AssemblyName = "Mvp.Xml.Exslt" HintPath = "..\..\src\Exslt\Mvp.Xml.Exslt.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "ExsltXPathTest.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "Makefile" BuildAction = "None" /> <File RelPath = "tests\books.xml" BuildAction = "Content" /> <File RelPath = "tests\foo.xml" BuildAction = "Content" /> </Include> </Files> </CSHARP> </VisualStudioProject> --- NEW FILE: ExsltXPathTest.cs --- using System; using Mvp.Xml.Exslt; using System.Xml; using System.Xml.XPath; namespace ExsltXPathTest { /// <summary> /// Test of XPath-only EXSLT. /// </summary> public class ExsltXPathTest { public static void Main(string[] args) { if (args.Length != 2) { PrintUsage(); return; } XPathDocument doc = new XPathDocument(args[0]); XPathNavigator nav = doc.CreateNavigator(); XPathExpression expr = nav.Compile(args[1]); ExsltContext ctxt = new ExsltContext(nav.NameTable); expr.SetContext(ctxt); object o = nav.Evaluate(expr); if (o is XPathNodeIterator) { XPathNodeIterator ni = (XPathNodeIterator)o; while (ni.MoveNext()) { Console.WriteLine("Node - type:{0}, name:{1}, value:{2}", ni.Current.NodeType, ni.Current.Name, ni.Current.Value); } } else { Console.WriteLine(o); } } private static void PrintUsage() { Console.WriteLine("ExsltXPathTest usage:"); Console.WriteLine("ExsltXPathTest.exe source XPath-expression"); } } } --- NEW FILE: ExsltXPathTest.exe --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Mvp.Xml.Exslt.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ExsltXPathTest.csproj.user --- <VisualStudioProject> <CSHARP LastOpenVersion = "7.10.3077" > <Build> <Settings ReferencePath = "D:\projects\EXSLT.NET\Exslt\;D:\projects\Mvp.Xml\EXSLT\v2\src\Exslt\;D:\projects\Mvp.Xml\EXSLT\v1\src\Exslt\" > <Config Name = "Debug" EnableASPDebugging = "false" EnableASPXDebugging = "false" EnableUnmanagedDebugging = "false" EnableSQLServerDebugging = "false" RemoteDebugEnabled = "false" RemoteDebugMachine = "" StartAction = "Project" StartArguments = "" StartPage = "" StartProgram = "" StartURL = "" StartWorkingDirectory = "" StartWithIE = "true" /> <Config Name = "Release" EnableASPDebugging = "false" EnableASPXDebugging = "false" EnableUnmanagedDebugging = "false" EnableSQLServerDebugging = "false" RemoteDebugEnabled = "false" RemoteDebugMachine = "" StartAction = "Project" StartArguments = "" StartPage = "" StartProgram = "" StartURL = "" StartWorkingDirectory = "" StartWithIE = "true" /> </Settings> </Build> <OtherProjectSettings CopyProjectDestinationFolder = "" CopyProjectUncPath = "" CopyProjectOption = "0" ProjectView = "ProjectFiles" ProjectTrust = "0" /> </CSHARP> </VisualStudioProject> --- NEW FILE: AssemblyInfo.cs --- using System.Reflection; using System.Runtime.CompilerServices; // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // [assembly: AssemblyTitle("")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.*")] // // In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. // // Use the attributes below to control which key is used for signing. // // Notes: // (*) If no key is specified, the assembly is not signed. // (*) KeyName refers to a key that has been installed in the Crypto Service // Provider (CSP) on your machine. KeyFile refers to a file which contains // a key. // (*) If the KeyFile and the KeyName values are both specified, the // following processing occurs: // (1) If the KeyName can be found in the CSP, that key is used. // (2) If the KeyName does not exist and the KeyFile does exist, the key // in the KeyFile is installed into the CSP and used. // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. // When specifying the KeyFile, the location of the KeyFile should be // relative to the project output directory which is // %Project Directory%\obj\<configuration>. For example, if your KeyFile is // located in the project directory, you would specify the AssemblyKeyFile // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] --- NEW FILE: Makefile --- all: @echo off @echo ########### Builds Exslt library... cd ..\Exslt nmake @echo ########### Builds ExsltXPathTest utility... cd ..\ExsltXPathTest csc /r:..\Exslt\GotDotNet.Exslt.dll /out:ExsltXPathTest.exe /target:exe *.cs /debug- /optimize+ copy ..\Exslt\GotDotNet.Exslt.dll GotDotNet.Exslt.dll --- NEW FILE: ExsltXPathTest.csproj.vspscc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ExsltXPathTest.dll --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/Common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/Common Added Files: node-set.xslt object-type.xslt source.xml Log Message: --- NEW FILE: node-set.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" exclude-result-prefixes="exsl"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:variable name="rtf"> <foo> <bar>baz</bar> </foo> </xsl:variable> <xsl:for-each select="exsl:node-set($rtf)/*"> <xsl:copy-of select="."/> </xsl:for-each> </test1> <test2> <xsl:variable name="rtf"> <foo> <bar>baz</bar> </foo> some text </xsl:variable> <xsl:for-each select="exsl:node-set($rtf)/node()"> <xsl:copy-of select="."/> </xsl:for-each> </test2> <test3> <xsl:variable name="var" select="/*"/> <xsl:for-each select="exsl:node-set($var)/*"> <xsl:copy-of select="."/> </xsl:for-each> </test3> <test4> <xsl:for-each select="exsl:node-set('text')"> <xsl:copy-of select="."/> </xsl:for-each> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: object-type.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" exclude-result-prefixes="exsl"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:variable name="node" select="/data"/> <xsl:variable name="string" select="'string'"/> <xsl:variable name="number" select="11"/> <xsl:variable name="rtf"> <foo/> </xsl:variable> <xsl:variable name="boolean" select="true()"/> Node: <xsl:value-of select="exsl:object-type($node)"/> String: <xsl:value-of select="exsl:object-type($string)"/> Number: <xsl:value-of select="exsl:object-type($number)"/> RTF: <xsl:value-of select="exsl:object-type($rtf)"/> Boolean: <xsl:value-of select="exsl:object-type($boolean)"/> </test1> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltXPathTest/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltXPathTest/tests Added Files: books.xml foo.xml Log Message: --- NEW FILE: foo.xml --- <root> <section id="dfn3"></section> </root> --- NEW FILE: books.xml --- <?xml version="1.0" encoding="UTF-8"?> <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="books.xsd"> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book id="bk103"> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> <book id="bk104"> <author>Corets, Eva</author> <title>Oberon's Legacy</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2001-03-10</publish_date> <description>In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant.</description> </book> <book id="bk105"> <author>Corets, Eva</author> <title>The Sundered Grail</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2001-09-10</publish_date> <description>The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy.</description> </book> <book id="bk106"> <author>Randall, Cynthia</author> <title>Lover Birds</title> <genre>Romance</genre> <price>4.95</price> <publish_date>2000-09-02</publish_date> <description>When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled.</description> </book> <book id="bk107"> <author>Thurman, Paula</author> <title>Splish Splash</title> <genre>Romance</genre> <price>4.95</price> <publish_date>2000-11-02</publish_date> <description>A deep sea diver finds true love twenty thousand leagues beneath the sea.</description> </book> <book id="bk108"> <author>Knorr, Stefan</author> <title>Creepy Crawlies</title> <genre>Horror</genre> <price>4.95</price> <publish_date>2000-12-06</publish_date> <description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description> </book> <book id="bk109"> <author>Kress, Peter</author> <title>Paradox Lost</title> <genre>Science Fiction</genre> <price>6.95</price> <publish_date>2000-11-02</publish_date> <description>After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum.</description> </book> <book id="bk110"> <author>O'Brien, Tim</author> <title>Microsoft .NET: The Programming Bible</title> <genre>Computer</genre> <price>36.95</price> <publish_date>2000-12-09</publish_date> <description>Microsoft's .NET initiative is explored in detail in this deep programmer's reference.</description> </book> <book id="bk111"> <author>O'Brien, Tim</author> <title>MSXML3: A Comprehensive Guide</title> <genre>Computer</genre> <price>36.95</price> <publish_date>2000-12-01</publish_date> <description>The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more.</description> </book> <book id="bk112"> <author>Galos, Mike</author> <title>Visual Studio 7: A Comprehensive Guide</title> <genre>Computer</genre> <price>49.95</price> <publish_date>2001-04-16</publish_date> <description>Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment.</description> </book> </catalog> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/results/GotDotNet/Strings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/results/GotDotNet/Strings Added Files: lowercase.xml uppercase.xml Log Message: --- NEW FILE: uppercase.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: lowercase.xml --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/GotDotNet/DatesAndTimes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/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: 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: 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: 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> |
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/Sets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/Sets Added Files: difference.xslt distinct.xslt has-same-node.xslt intersection.xslt leading.xslt source.xml trailing.xslt Log Message: --- NEW FILE: distinct.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:distinct(orders/order/product)"/> </test1> <test2> <xsl:copy-of select="set:distinct(set/*)"/> </test2> <test3> <xsl:copy-of select="set:distinct(/no/such/nodes)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: difference.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:difference(set/*, set/foo[@bar])"/> </test1> <test2> <xsl:copy-of select="set:difference(set/*, set/*)"/> </test2> <test3> <xsl:copy-of select="set:difference(/no/such/nodes, set/foo[@bar])"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="leading.xslt"?> <data> <set> <foo bar="baz">1</foo> <foo>2</foo> <foo bar="baz">3</foo> <foo>4</foo> <foo bar="baz">5</foo> </set> <orders> <order date="2003-12-12"> <product>Dress Shirt</product> <size>M</size> <color>Blue</color> <quantity>10</quantity> </order> <order date="2003-12-20"> <product>Dress Shirt</product> <size>XL</size> <color>White</color> <quantity>5</quantity> </order> <order date="2003-12-25"> <product>Geeky TShirt</product> <size>XL</size> <color>Black</color> <quantity>30</quantity> </order> </orders> </data> --- NEW FILE: has-same-node.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:has-same-node(set/*, set/foo)"/> </test1> <test2> <xsl:copy-of select="set:has-same-node(set/foo[not(@bar)], set/foo[@bar])"/> </test2> <test3> <xsl:copy-of select="set:has-same-node(set/*, /no/such/nodes)"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: intersection.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:intersection(set/*, set/foo[@bar])"/> </test1> <test2> <xsl:copy-of select="set:intersection(set/*, set/*)"/> </test2> <test3> <xsl:copy-of select="set:intersection(/no/such/nodes, set/foo[@bar])"/> </test3> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: leading.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:leading(set/*, set/foo[.=3])"/> </test1> <test2> <xsl:copy-of select="set:leading(set/*, set)"/> </test2> <test3> <xsl:copy-of select="set:leading(set/*, /no/such/nodes)"/> </test3> <test4> <xsl:copy-of select="set:leading(/no/such/nodes, set/*)"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: trailing.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="set:trailing(set/*, set/foo[.=3])"/> </test1> <test2> <xsl:copy-of select="set:trailing(set/*, set)"/> </test2> <test3> <xsl:copy-of select="set:trailing(set/*, /no/such/nodes)"/> </test3> <test4> <xsl:copy-of select="set:trailing(/no/such/nodes, set/*)"/> </test4> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/RegularExpressions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/RegularExpressions Added Files: match.xslt replace.xslt source.xml test.xslt Log Message: --- NEW FILE: test.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:regexp="http://exslt.org/regular-expressions" exclude-result-prefixes="regexp"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:if test="not(regexp:test(email/valid, '\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if> </test1> <test2> <xsl:if test="not(regexp:test(email/invalid, '\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if> </test2> <test3> <xsl:if test="not(regexp:test('', '\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if> </test3> <test4> <xsl:if test="not(regexp:test(email/valid, ''))">Email address is not valid.</xsl:if> </test4> <test5> <xsl:if test="not(regexp:test(email/valid, '\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', ''))">Email address is not valid.</xsl:if> </test5> <test6> <xsl:if test="not(regexp:test(email/valid, '\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', 'dummy'))">Email address is not valid.</xsl:if> </test6> <test7> <xsl:if test="not(regexp:test(email/valid, '\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', 'g'))">Email address is not valid.</xsl:if> </test7> <test8> <xsl:if test="regexp:test('FOO', 'foo', 'i')">Ok</xsl:if> </test8> <test9> <xsl:if test="regexp:test('FOO', 'foo')">Ok</xsl:if> </test9> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: replace.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:regexp="http://exslt.org/regular-expressions" exclude-result-prefixes="regexp"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="regexp:replace(text, '<[^>]*>', 'g', '')"/> </test1> <test2> <xsl:value-of select="regexp:replace(text, '<[^>]*>', '', '')"/> </test2> <test3> <xsl:value-of select="regexp:replace('fooBar', 'BAR', 'i', 'Baz')"/> </test3> <test4> <xsl:value-of select="regexp:replace(/no/such/node, 'BAR', 'i', 'Baz')"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="replace.xslt"?> <data> <email> <valid>jo...@mi...</valid> <invalid>foo@bar</invalid> </email> <entry>22/12/2003 21:00 AcmeService DB updated</entry> <text><![CDATA[<b>Bold</b> and <i>italics</i> aren't allowed here.]]></text> </data> --- NEW FILE: match.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:regexp="http://exslt.org/regular-expressions" exclude-result-prefixes="regexp"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:for-each select="regexp:match('http://www.bayes.co.uk/xml/index.xml?/xml/utils/rechecker.xml', '(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> </test1> <test2> <xsl:for-each select="regexp:match('This is a test string', '(\w+)', 'g')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> </test2> <test3> <xsl:for-each select="regexp:match('This is a test string', '([a-z])+ ', 'g')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> </test3> <test4> <xsl:for-each select="regexp:match('This is a test string', '([a-z])+ ', 'gi')"> Part <xsl:value-of select="position()" /> = <xsl:value-of select="." /> </xsl:for-each> </test4> <test5> <xsl:variable name="tokens" select="regexp:match(entry, '(\d{1,2}/\d{1,2}/\d{4})\s+(\d{2}:\d{2})\s+(\w*)\s+(.*)')"/> <entry date="{$tokens[2]}" time="{$tokens[3]}" application="{$tokens[4]}" message="{$tokens[5]}"/> </test5> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:39
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/tests/EXSLT/Strings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/tests/EXSLT/Strings Added Files: align.xslt concat.xslt decode-uri.xslt encode-uri.xslt padding.xslt replace.xslt source.xml split.xslt tmp0000.xml tokenize.xslt Log Message: --- NEW FILE: decode-uri.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str:decode-uri('http://www.example.com/my%20r%C3%A9sum%C3%A9.html')"/> </test1> <test2> <xsl:value-of select="str:decode-uri('http://www.example.com/my%20r%E9sum%E9.html','iso-8859-1')"/> </test2> <test3> <xsl:value-of select="str:decode-uri('http://www.example.com/my%20r%E9sum%E9.html','not-supported-enc')"/> </test3> <test4> <xsl:value-of select="str:decode-uri('http://www.example.com/my%20r%E9sum%E9.html','')"/> </test4> <test4> <xsl:value-of select="str:decode-uri(url, '')"/> </test4> <test5> <xsl:value-of select="str:decode-uri(uri)"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: padding.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str:padding(20, '_')"/> </test1> <test2> <xsl:value-of select="str:padding(5, 'abc')"/> </test2> <test3> <xsl:value-of select="str:padding(10, '')"/> </test3> <test4> <xsl:value-of select="str:padding(12)"/> </test4> <test5> <xsl:value-of select="str:padding(0, 'foo')"/> </test5> <test6> <xsl:value-of select="str:padding(-2, 'foo')"/> </test6> <test7> <xsl:value-of select="str:padding(-4)"/> </test7> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: concat.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str:concat(list/*)"/> </test1> <test2> <xsl:value-of select="str:concat(/no/such/nodes)"/> </test2> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: replace.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="str:replace('foo bar', 'bar', 'baz')"/> </test1> <test2> <xsl:copy-of select="str:replace('foo bar', 'no', 'baz')"/> </test2> <test3> <xsl:value-of select="str:replace(email, '@', '@NOSPAM')"/> </test3> <test4> <xsl:value-of select="str:replace('', 'foo', 'bar')"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: tmp0000.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> <?xml-stylesheet type="text/xsl" href="D:\docbook\docbook-xsl-1.66.0\fo\docbook.xsl"?> <article> <title>Article Title</title> <sect1> <title>Section1 Title</title> <para>Text</para> </sect1> </article> --- NEW FILE: align.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str:align(name, str:padding(20, '_'), 'left')"/> </test1> <test2> <xsl:value-of select="str:align(name, str:padding(20, '_'), 'center')"/> </test2> <test3> <xsl:value-of select="str:align(name, str:padding(20, '_'), 'right')"/> </test3> <test4> <xsl:value-of select="str:align(name, str:padding(20, '_'))"/> </test4> <test5> <xsl:value-of select="str:align(name, str:padding(20, '_'), 'none')"/> </test5> <test6> <xsl:value-of select="str:align(name, str:padding(2, '*'), 'center')"/> </test6> <test7> <xsl:value-of select="str:align('', '*******', 'center')"/> </test7> <test8> <xsl:value-of select="str:align('foo', '')"/> </test8> <test9> <xsl:value-of select="str:align('foo', '******', '')"/> </test9> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: split.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:copy-of select="str:split('a, simple, list', ', ')"/> </test1> <test2> <xsl:copy-of select="str:split('date math str')"/> </test2> <test3> <xsl:copy-of select="str:split('foo', '')"/> </test3> <test4> <xsl:copy-of select="str:split('cats and dogs', ' and ')"/> </test4> <test5> <xsl:copy-of select="str:split('', ' and ')"/> </test5> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: tokenize.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <out> <test1> <xsl:copy-of select="str:tokenize('2001-06-03T11:40:23', '-T:')"/> </test1> <test2> <xsl:copy-of select="str:tokenize('date math str')"/> </test2> <test3> <xsl:copy-of select="str:tokenize('foo', '')"/> </test3> <test4> <xsl:copy-of select="str:tokenize('', '-')"/> </test4> </out> </xsl:template> </xsl:stylesheet> --- NEW FILE: source.xml --- <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="split.xslt"?> <data> <email>jo...@do...</email> <name>Danny</name> <uri>http://www.example.com/my résumé.html</uri> <list> <a>abcd</a> <b>efgh</b> <c></c> <d>kl<e>ml</e></d> </list> </data> --- NEW FILE: encode-uri.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="data"> <out> <test1> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html',false())"/> </test1> <test2> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html',true())"/> </test2> <test3> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html',false(),'iso-8859-1')"/> </test3> <test4> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html',false(),'not-supported-enc')"/> </test4> <test5> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html%24',false())"/> </test5> <test6> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html%2sss',false())"/> </test6> <test7> <xsl:value-of select="str:encode-uri('http://www.ex%ample.com/my résumé.html',false())"/> </test7> <test8> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html',false(),'')"/> </test8> <test9> <xsl:value-of select="str:encode-uri('http://www.example.com/my résumé.html',true(),'')"/> </test9> <test9> <xsl:value-of select="str:encode-uri(uri ,true(),'')"/> </test9> </out> </xsl:template> </xsl:stylesheet> |
From: Oleg T. <he...@us...> - 2005-07-19 19:47:25
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/results/GotDotNet/Math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29285/v1/test/ExsltTest/results/GotDotNet/Math Added Files: avg.xml Log Message: --- NEW FILE: avg.xml --- (This appears to be a binary file; contents omitted.) |