On Tue, Dec 29, 2009 at 9:23 PM, Sebastian Harl <span dir="ltr"><<a href="mailto:sh@tokkee.org">sh@tokkee.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Amit,<br>
<div class="im"><br>
On Tue, Dec 29, 2009 at 07:24:46PM +0530, Amit Gupta wrote:<br>
> On Tue, Dec 29, 2009 at 3:31 PM, Amit Gupta <<a href="mailto:amit.gupta221@gmail.com">amit.gupta221@gmail.com</a>> wrote:<br>
> > On Mon, Dec 21, 2009 at 11:59 PM, Florian Forster <<a href="mailto:octo@verplant.org">octo@verplant.org</a>>wrote:<br>
> > Just a clarification, "Instance" here will be type_instance(s) and thus can<br>
> > be anything (not just xpath), right?<br>
><br>
> I guess I understood why "Instance" has to be a xpath expression if "table"<br>
> is true. Instance xpath would return list of values which will be used as<br>
> type_instances for multiple type values returned by evaluating xpaths in<br>
> "Values". Is my understanding correct?.<br>
<br>
</div>Yep, that's right.<br>
<br>
If "Table" is false, a simple string would be sufficient as well, but<br>
changing the semantics of "Instance" depending on "Table" would be<br>
confusing -- also, people might still want to fetch the instance from<br>
the XML file.<br>
<br>
Other plugins (e.g., postgresql) handle that by introducing an option<br>
called "InstancePrefix" which expects a string as argument. That string<br>
is prepended to the type_instance.<br>
<br>
If "Table" is false, "Instance" would be optional, thus making it<br>
possible to specify a constant string as type_instance using "Instance-<br>
Prefix".<br></blockquote><div><br>Thanks for the detailed explanation. <br><br>I was thinking about the implementation of the suggested configuration
and it seems that the implementation can be simpler if we consider the
following approach:<br>
<br>
The evaluation of the <base_xpath> (i.e argument to the XPATH element) will return either of the following:<br>
a.) Single result: This can be assumed as "Table" false case. The
relative xpath expression(s) in "Values" is/are always expected to
return one text node/attribute result.<br>
b.) Multiple results : This can be assumed as "Table" true case. "Instance" xpath expression will be evaluated and result(s) will be stored in a list. Multiple results will be iterated and the relative
xpath(s) in "Values" will be evaluated relative to each of the result (node) [the
result(s) of the relative xpath(s) can be dispatched to the rrd file at the same time]. The
relative xpath expression(s) in "Values" is/are always expected to
return one text node/attribute result.<br>
<br>Do note that "Table" won't be required since single/multiple result(s) of the
<base_xpath> evaluation can be used for the same as described
above.<br><br>
Does this make sense?. Let me know if something is unclear.<br>
<br>
Regards<br>
Amit<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Cheers,<br>
Sebastian<br>
<font color="#888888"><br>
--<br>
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ <a href="http://tokkee.org/" target="_blank">http://tokkee.org/</a><br>
<br>
Those who would give up Essential Liberty to purchase a little Temporary<br>
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin<br>
<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iEYEARECAAYFAks6JgcACgkQEFEKc4UBx/zbtQCfWIIVzQr9nhm1sHZPpedUkmRV<br>
W7AAmwfaoj4/EhrGveBDh7yCbbJ7EUVv<br>
=NM8M<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br>