DifferenceToXmlDoc (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>XmlDoc with difference of all Login statistic value</b></span>
{{Template:UserStatistics:DifferenceToXmlDoc subtitle}}
[[Category:UserStatistics methods|DifferenceToXmlDoc function]]
The <var>DifferenceToXmlDoc</var> method returns to an <var>[[XmlDoc_class|XmlDoc]]</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.
[[Category:System methods]]
<!--DPL?? Category:UserStatistics methods|DifferenceToXmlDoc function: XmlDoc with difference of all Login statistic value-->
==Syntax==
<!--DPL?? Category:System methods|DifferenceToXmlDoc (UserStatistics function): XmlDoc with difference of all Login statistic value-->
{{Template:UserStatistics:DifferenceToXmlDoc syntax}}
<p>
DifferenceToXmlDoc is a member of the [[UserStatistics class]].
</p>
 
This method returns to an XML document the difference in values between one
UserStatistics object and another for all Login statistics with non-zero values
(by default) or for all Login statistics (as an option).


See the description of [[UserStatistics class#login|login statistics]].
===Syntax===
  %doc = %ustat:DifferenceToXmlDoc( %ustatOld              -
                                  [,&nbsp;Zeros=bool]            -
                                  [,&nbsp;AttributeValues=bool]  -
                                  [,&nbsp;AttributeNames=bool]  -
                                  [,&nbsp;NamestoLower=bool] )
===Syntax terms===
===Syntax terms===
<dl>
<table class="syntaxTable">
<dt><i>%doc</i>
<tr><th>%doc</th>
<dd>A [[Janus SOAP]] XmlDoc object variable to contain the listing of the difference
<td>A <var class="product">[[Janus SOAP]]</var> <var>XmlDoc</var> object variable to contain the listing of the difference values of the Login statistics. </td></tr>
values of the Login statistics.
<dt><i>%ustat</i>
<dd>A UserStatistics object variable.
<dt><i>%ustatOld</i>
<dd>An older UserStatistics object variable for the same user login
as ''%ustat''.
<dt><b>Zeros= </b><i>bool</i>
<dd>This name required argument (<tt>Zeros</tt>) 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 <tt>False</tt>, which
results in non-zero values only being included.
<dt><b>AttributeValues= </b><i>bool</i>
<dd>This name required argument (<tt>AttributeValues</tt>) 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, <tt><DKRD>1107</DKRD></tt> is text format,
<tr><th>%userStatistics</th>
and <tt><DKRD value="1107"/></tt> is attribute-value format.
<td>A <var>userStatistics</var> object variable. </td></tr>


The default value is <tt>False</tt>, which produces text format.
<tr><th>ustatOld</th>
<dt><b>AttributeNames= </b><i>bool</i>
<td>An older <var>UserStatistics</var> object variable for the same user login as <var class="term">userStatistics</var>.</td></tr>
<dd>This name required argument (<tt>AttributeNames</tt>) 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 &ldquo;name&rdquo; attribute.


For example, <tt><DKRD>1107</DKRD></tt> is element-name format,
<tr><th><var>Zeros</var></th>
and the following is name-as-attribute format:
<td>This [[Methods#Named parameters|name required]] argument (<var>Zeros</var>) is a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> value that indicates whether differences with a zero value should be included in the returned data. <var>Zeros</var> is an optional argument that defaults to <var>False</var>, which results in non-zero values only being included. </td></tr>
<pre>
    <stat name="DKRD">
      1107
    </stat>
</pre>


The default value is <tt>False</tt>, which produces element-name format.
<tr><th><var>AttributeValues</var></th>
<dt><b>NamesToLower= </b><i>bool</i>
<td>This name required argument 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. 
<dd>This name required argument (<tt>NamesToLower</tt>) is a boolean value
<p>
that indicates whether statistic names are to be displayed in lowercase
The default value is <var>False</var>, which produces text format. </p></td></tr>
characters.
The default value is <tt>False</tt>.
<dt><b>AttributeNames= </b><i>bool</i>


</dl>
<tr><th><var>AttributeNames</var></th>
===Usage Notes===
<td>This name required argument 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:
<ul>
<p class="code"><stat name="DKRD">
<li>The [[Difference (UserStatistics function)|Difference]] function returns the value
    1107
differences between two UserStatistics objects for the Login statistic you specify.
</stat>
The [[DifferenceToString (UserStatistics function)|DifferenceToString]] function returns to a longstring
</p>
the value differences for all, or all non-zero, Login statistics.
The default value is <var>False</var>, which produces element-name format.</td></tr>
</ul>


===Examples===
<tr><th><var>NamesToLower</var></th>
<td>This name required argument is a <var>Boolean</var> value that indicates whether statistic names are to be displayed in lowercase characters. The default value is <var>False</var>.</td></tr>
</table>


The display of non-zero difference statistics below is produced
==Examples==
by a sequence of statements like the following:
<ol><li>
<pre>
The display of non-zero difference statistics below is produced by a sequence of statements like the following:
    %doc is object xmldoc
<p class="code">%doc is object xmldoc
    %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:Print
%doc:print
</pre>
</p>
The following are sample results:
<p class="code"><nowiki><UserStatisticsDifferences time="20080903121750819"
userNumber="20" loginTime="20080903115821710"
baseTime="20080903121750818">
  <SQWR>2</SQWR>
  <MOVE>2</MOVE>
  <DKAR>2</DKAR>
</UserStatisticsDifferences>
</nowiki></p>
<li>Using the following statement would return all the statistics, including those with a <code>0</code> value:
<p class="code">%doc = %statEnd:differencetoXmlDoc(%statStart)</p>
</ol>


The following are sample results:
==See also==
<pre>
<ul>
    <UserStatisticsDifferences time="20080903121750819"
<li><var>[[Difference (UserStatistics function)|Difference]]</var> returns the value differences between two <var>UserStatistics</var> objects for the Login statistic you specify.
    userNumber="20" loginTime="20080903115821710"
    baseTime="20080903121750818">
      <SQWR>2</SQWR>
      <MOVE>2</MOVE>
      <DKAR>2</DKAR>
    </UserStatisticsDifferences>
</pre>


A <tt>%doc = %statEnd:differencetoXmlDoc(%statStart)</tt>
<li><var>[[DifferenceToString (UserStatistics function)|DifferenceToString]]</var> returns a <var>longstring</var> containing the value differences for all, or all non-zero, Login statistics.
statement would
</ul>
return all the statistics, including those with a <tt>0</tt> value.
{{Template:UserStatistics:DifferenceToXmlDoc footer}}

Latest revision as of 21:35, 20 November 2012

Login timestamps difference in xml format (UserStatistics class)

The DifferenceToXmlDoc method returns to an XmlDoc 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 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 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 is False, which produces element-name format.
NamesToLower This name required argument is a Boolean value that indicates whether statistic names are to be displayed in lowercase characters. The default value is False.

Examples

  1. 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>

  2. Using the following statement would return all the statistics, including those with a 0 value:

    %doc = %statEnd:differencetoXmlDoc(%statStart)

See also

  • Difference returns the value differences between two UserStatistics objects for the Login statistic you specify.
  • DifferenceToString returns a longstring containing the value differences for all, or all non-zero, Login statistics.