DifferenceToXmlDoc (UserStatistics function): Difference between revisions
m (1 revision) |
m (match syntax table to syntax template, tags and edits) |
||
Line 1: | Line 1: | ||
{{Template:UserStatistics:DifferenceToXmlDoc subtitle}} | {{Template:UserStatistics:DifferenceToXmlDoc subtitle}} | ||
The <var>DifferenceToXmlDoc</var> method returns to an [[<var>[[XmlDoc_class#The_XmlDoc_class|XML document]]</var> the difference in values between one <var>[[UserStatistics_class|UserStatistics]]</var> object and another for all [[UserStatistics class#login|Login]] (also called "Final") statistics with non-zero values (by default) or for all Login statistics including those with zero values. | |||
==Syntax== | ==Syntax== | ||
{{Template:UserStatistics:DifferenceToXmlDoc syntax}} | {{Template:UserStatistics:DifferenceToXmlDoc syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th | <tr><th>%doc</th> | ||
<td>A [[Janus SOAP]] XmlDoc object variable to contain the listing of the difference values of the Login statistics. </td></tr> | <td>A [[Janus SOAP]] XmlDoc object variable to contain the listing of the difference values of the Login statistics. </td></tr> | ||
<tr><th | <tr><th>%userStatistics</th> | ||
<td>A | <td>A <var>userStatistics</var> object variable. </td></tr> | ||
<tr><th> | <tr><th>ustatOld</th> | ||
<td>An older UserStatistics object variable for the same user login as | <td>An older <var>UserStatistics</var> object variable for the same user login as <var class="term">userStatistics</var>.</td></tr> | ||
<tr><th | <tr><th>Zeros</th> | ||
<td>This <var>[[Methods#Named parameters|Name-Required]]</var> argument (<var class="term">Zeros</var>) is a <var>[[boolean]]</var> value that indicates whether differences with a zero value should be included in the returned data. <var class="term">Zeros</var> is an optional argument that defaults to <code>False</code>, which results in non-zero values only being included. </td></tr> | |||
<tr><th | <tr><th>AttributeValues</th> | ||
<td>This <var>Name-Required</var> argument (<code>AttributeValues</code>) is a <var>[[boolean]]</var> value that indicates whether statistic values are to be displayed as text or as value attributes within their XML document elements. For example, <code><DKRD>1107</DKRD></code> is text format, and <code><DKRD value="1107"/></code> is attribute-value format. The default value is <code>False</code>, which produces text format. </td></tr> | |||
<tr><th | <tr><th>AttributeNames</th> | ||
<td>This <var>Name-Required</var> argument (<code>AttributeNames</code>) is a <var>[[boolean]]</var> value that indicates whether statistic names are to be displayed within their XML document elements as the element name or as the value of a "name" attribute. For example, <code><DKRD>1107</DKRD></code> is element-name format, and the following is name-as-attribute format: | |||
<tr><th | <p class="code"><nowiki><stat name="DKRD"> | ||
1107 | |||
</stat> | |||
</nowiki></p> | |||
The default value is <code>False</code>, which produces element-name format.</td></tr> | |||
<tr><th>NamesToLower</th> | |||
<td>This <var>Name-Required</var> argument (<code>NamesToLower</code>) is a <var>[[boolean]]</var> value that indicates whether statistic names are to be displayed in lowercase characters. The default value is <code>False</code>.</td></tr> | |||
</table> | </table> | ||
==Examples== | ==Examples== | ||
<ol><li> | |||
The display of non-zero difference statistics below is produced | The display of non-zero difference statistics below is produced by a sequence of statements like the following: | ||
by a sequence of statements like the following: | <p class="code">%doc is object xmldoc | ||
<p class="code" | |||
%statStart is object userstatistics | %statStart is object userstatistics | ||
%statEnd is object userstatistics | %statEnd is object userstatistics | ||
. . . | . . . | ||
%doc = %statEnd:differencetoXmlDoc(%statStart, zeros=false) | %doc = %statEnd:differencetoXmlDoc(%statStart, zeros=false) | ||
%doc: | %doc:print | ||
</p> | |||
The following are sample results: | The following are sample results: | ||
<p class="code"><nowiki><UserStatisticsDifferences time="20080903121750819" | <p class="code"><nowiki><UserStatisticsDifferences time="20080903121750819" | ||
Line 55: | Line 46: | ||
</UserStatisticsDifferences> | </UserStatisticsDifferences> | ||
</nowiki></p> | </nowiki></p> | ||
<li>Using the: | |||
<p class="code">%doc = %statEnd:differencetoXmlDoc(%statStart)</p> | |||
statement would | statement would return all the statistics, including those with a <code>0</code> value. | ||
return all the statistics, including those with a <code>0</code> value. | </ol> | ||
==See also== | ==See also== | ||
<ul> | |||
<li><var>[[Difference (UserStatistics function)|Difference]]</var> which returns the value differences between two <var>UserStatistics</var> objects for the Login statistic you specify. | |||
<li><var>[[DifferenceToString (UserStatistics function)|DifferenceToString]]</var> which returns to a <var>longstring</var> containing the value differences for all, or all non-zero, Login statistics. | |||
</ul> | |||
{{Template:UserStatistics:DifferenceToXmlDoc footer}} | {{Template:UserStatistics:DifferenceToXmlDoc footer}} |
Revision as of 11:10, 30 March 2011
Login timestamps difference in xml format (UserStatistics class)
The DifferenceToXmlDoc method returns to an [[XML document the difference in values between one UserStatistics object and another for all Login (also called "Final") statistics with non-zero values (by default) or for all Login statistics including those with zero values.
Syntax
%doc = userStatistics:DifferenceToXmlDoc( ustatOld, [Zeros= boolean], - [AttributeValues= boolean], - [AttributeNames= boolean], - [NamesToLower= boolean])
Syntax terms
%doc | A Janus SOAP XmlDoc object variable to contain the listing of the difference values of the Login statistics. |
---|---|
%userStatistics | A userStatistics object variable. |
ustatOld | An older UserStatistics object variable for the same user login as userStatistics. |
Zeros | This Name-Required argument (Zeros) is a boolean value that indicates whether differences with a zero value should be included in the returned data. Zeros is an optional argument that defaults to False , which results in non-zero values only being included. |
AttributeValues | This Name-Required argument (AttributeValues ) is a boolean value that indicates whether statistic values are to be displayed as text or as value attributes within their XML document elements. For example, <DKRD>1107</DKRD> is text format, and <DKRD value="1107"/> is attribute-value format. The default value is False , which produces text format. |
AttributeNames | This Name-Required argument (AttributeNames ) is a boolean value that indicates whether statistic names are to be displayed within their XML document elements as the element name or as the value of a "name" attribute. For example, <DKRD>1107</DKRD> is element-name format, and the following is name-as-attribute format:
<stat name="DKRD"> 1107 </stat> The default value isFalse , which produces element-name format. |
NamesToLower | This Name-Required argument (NamesToLower ) is a boolean value that indicates whether statistic names are to be displayed in lowercase characters. The default value is False . |
Examples
-
The display of non-zero difference statistics below is produced by a sequence of statements like the following:
%doc is object xmldoc %statStart is object userstatistics %statEnd is object userstatistics . . . %doc = %statEnd:differencetoXmlDoc(%statStart, zeros=false) %doc:print
The following are sample results:
<UserStatisticsDifferences time="20080903121750819" userNumber="20" loginTime="20080903115821710" baseTime="20080903121750818"> <SQWR>2</SQWR> <MOVE>2</MOVE> <DKAR>2</DKAR> </UserStatisticsDifferences>
- Using the:
%doc = %statEnd:differencetoXmlDoc(%statStart)
statement would return all the statistics, including those with a
0
value.
See also
- Difference which returns the value differences between two UserStatistics objects for the Login statistic you specify.
- DifferenceToString which returns to a longstring containing the value differences for all, or all non-zero, Login statistics.