XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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), ',
'), '&#xa;')"/>
	</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@gmail.com>:
> 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS