[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schema: "Best used with the ______ tool"
Running the following transform against that file using Kernow's performance testing facility: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="http://www.example.com/test" exclude-result-prefixes="xs t"> <xsl:param name="age" select="25" as="xs:integer"/> <xsl:param name="gender" select="'female'" as="xs:string"/> <xsl:template match="/"> <xsl:for-each select="/t:people/person[@gender eq $gender][xs:integer(@age) lt $age]"> <xsl:value-of select="concat(string-join((@first, @last, @age), ', '), '
')"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> Gives this result: Ran 5 times Run 1: 445 ms Run 2: 178 ms Run 3: 216 ms Run 4: 335 ms Run 5: 163 ms Ignoring first 2 times Total Time (last 3 runs): 714 ms Average Time (last 3 runs): 238 ms That time includes writing the result to the output window. 2008/12/3 Andrew Welch <andrew.j.welch@g...>: > Hi Boris, > >> Note how in the XQuery case I had to invent a delimiter (':') for >> the first, last, and age fields so that I could pass them as a string >> from XQuery to the programming language. I then had to manually parse >> this string and convert the age field to unsigned short. To me, this >> doesn't look easier than data binding at all. > > Surely you wouldn't return a delimited string, you would return person > nodes and then select the values from the returned nodes? > > Also, the comparison isn't quite right - the only fair thing would be > time how long it takes to output the information to a file or standard > out (the gui language would likely be different in either case, say > swing vs html) > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|