<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.4712.0">
<TITLE>Select tag</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">While working on an extension of the select tag, I noted that if I passed a nameexpr attribute, it was bombing at lines 293-4 of tags.py and raising the error reflected in the source code below:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">        if not self.has_attrib('name') and not self.has_attrib('alias'):</FONT>

<BR><FONT SIZE=2 FACE="Arial">            self.raise_error('missing "name", "nameexpr", or "alias" attribute')</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I changed the block to:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">        if not self.has_attrib('name') and not self.has_attrib('nameexpr') and not self.has_attrib('alias'):</FONT>

<BR><FONT SIZE=2 FACE="Arial">            self.raise_error('missing "name", "nameexpr", or "alias" attribute')</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Now my code works like a charm.  I just wanted to verify that nameexpr was left out unintentionally and that I hadn't tried to correct something that was left out with good reason.  Perhaps the issue is that since select boxes pass arrays, one shouldn't be able to loop through values to produce select boxes whose names are arrays (resulting in arrays of arrays passed to the Web server).  Or can Albatross/standard Web servers handle that?  If nameexpr is not an allowed param here, I wonder if it might be a good idea to add a brief explanation to the error, such as "nameexpr attribute not allowed in al-select tag."</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I also noted that the code in question bombed even though it was listed between <al-comment></al-comment> tags. I had the code on one system that didn't try to parse what was between the comment tags.  This behavior began when I moved the code to another system.  The first was running python 2.2.1 and the second 2.2.2.  Consider the following two nearly identical chunks of code:</FONT></P>

<P><FONT SIZE=2 FACE="Arial"><al-comment></FONT>

<BR><FONT SIZE=2 FACE="Arial">    <al-select name="helloABCDE"></FONT>

<BR><FONT SIZE=2 FACE="Arial">        <al-option value="Hello"></al-option></FONT>

<BR><FONT SIZE=2 FACE="Arial">    </al-select></FONT>

<BR><FONT SIZE=2 FACE="Arial"></al-comment></FONT>
</P>

<P><FONT SIZE=2 FACE="Arial"><al-comment></FONT>

<BR><FONT SIZE=2 FACE="Arial">    <al-select name="hello"></FONT>

<BR><FONT SIZE=2 FACE="Arial">        <al-option value="Hello"></al-option></FONT>

<BR><FONT SIZE=2 FACE="Arial">    </al-select></FONT>

<BR><FONT SIZE=2 FACE="Arial"></al-comment></FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">The first raises:</FONT>
</P>

<P><FONT FACE="Times New Roman">File "/usr/local/lib/python2.2/site-packages/albatross/template.py", line 63, in raise_error raise TemplateError('%s:%s: %s' % (self.filename, self.line_num, msg)) TemplateError: /path/to/stuff/templates/ballot.html:14: missing "name", "nameexpr", or "alias" attribute </FONT></P>

<P><FONT FACE="Times New Roman">The second works like a charm. Is this possibly a python version issue?  Thanks,</FONT>

<BR><FONT FACE="Times New Roman">D</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Arial">=====================</FONT>

<BR><FONT SIZE=2 FACE="Arial">Daryl L. L. Houston</FONT>

<BR><FONT SIZE=2 FACE="Arial">Software Developer/E-commerce Specialist</FONT>

<BR><FONT SIZE=2 FACE="Arial">Mediapulse, Inc.</FONT>

<BR><FONT SIZE=2 FACE="Arial">800.380.4514</FONT>

<BR><FONT SIZE=2 FACE="Arial">865-482-4455 ext. 21</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

</BODY>
</HTML>