<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE : [Nagios-devel] Réf. : Nagios-devel digest, Vol 1 #833 - 11 msgs</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> Ah, that makes sense, in a way. I thought that "use" would </FONT>
<BR><FONT SIZE=2>> be handled in </FONT>
<BR><FONT SIZE=2>> the same way as the other properties at read time, and then </FONT>
<BR><FONT SIZE=2>> the last value </FONT>
<BR><FONT SIZE=2>> read would prevail, and then in a subsequent pass the "use" </FONT>
<BR><FONT SIZE=2>> clauses would </FONT>
<BR><FONT SIZE=2>> be expanded.</FONT>
</P>
<P><FONT SIZE=2>In the current code, it is done this way. Any 'use' directive overwrites the previous one without being interpreted.</FONT>
</P>
<P><FONT SIZE=2>> if I understand well, "use" is handled specially at read </FONT>
<BR><FONT SIZE=2>> time, right ?</FONT>
</P>
<P><FONT SIZE=2>No. Another reason why it cannot be handled at read time is that the current syntax allows to "use" a template even if it is defined later in the same file or in another.</FONT></P>
<P><FONT SIZE=2>One way to allow multiple template uses in an object could be to replace the 'template' field in xodtemplate objects by a template linked list and modify the code in the xodtemplate_resolve_<object>() functions to apply missing properties from this template list. But, before doing that, we should extend the template syntax to include more template combination options.</FONT></P>
</BODY>
</HTML>