Hi all,

I'm building a basic gradebook app for a professor I happen to know (my
wife) using XSLTForms, and while it's been working great for most of my
forms, I'm encountering difficulties when using <xf:repeat> inside of
tables.  I would appreciate any suggestions or troubleshooting hints folks
here might have.  I'm using XSLTForms (trunk rev. 522 from
http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/trunk/build/) with
FF9 on Mac OS X.  Here's the relevant portion of my form:

   <div xmlns="http://www.w3.org/1999/xhtml";>
       <table>
           <thead>
               <tr>
                   <th>Student</th>
                   *<!-- one heading for the name of each assessment (i.e.,
tests and assignments) -->*
                   <xf:repeat
nodeset="instance('course')/assessments/assessment">
                       <th><xf:output ref="name"/></th>
                   </xf:repeat>
                   <th>Final Letter Grade</th>
               </tr>
           </thead>
           <tbody>
               *<!-- one row for each student record: name, grades for each
assessment, final grade -->*
               <xf:repeat nodeset="instance('students')/student"
id="repeat-students">
                   <tr>
                       <td><xf:output value="concat(surname, ', ',
forename)"/></td>
                       <xf:repeat
nodeset="instance('course')/assessments/assessment" id="repeat-assessments">
                           <td><xf:input
ref="instance('students')/student[index('repeat-students')]/course-record/assessments/assessment[index('repeat-assessments')]/grade"/></td>
                       </xf:repeat>
                       <td><xf:input ref="course-record/final-grade"/></td>
                   </tr>
               </xf:repeat>
           </tbody>
       </table>
   </div>

Here the "courses" instance contains info about each course, including
assessments (i.e., tests and assignments), and the "students" instance
contains info about each student's grades -- for each assessment and for
the final grade.

The result in FF9 is quite odd.  Instead of a structure I would expect like:

  Student  Test 1  Test 2  Final Letter Grade
  -----------  ---------  ----------  ---------------------------
  Joe        80       81        B-
  Sue        90       91        A-
  ...

I get something like:

  Test 1   Test 2   Final Letter Grade
  ---------   ---------   --------------------------
  Joe
  A-      Sue    Bill    Harry  Melinda   ...

Such an odd rendering suggests to me that either (1) there is a problem
with my coding of the form (2) there is an XSLTForms issue or (3) both.
 I'm not sure which it is.  When I search the list archives I see some
references to problems XSLTForms has with tables and repeats, and Alain's
suggestion to use the trunk version of XSLTForms and to use thead/tbody.
 I'm using trunk and using thead/tbody, so we can rule those factors out.
 I've also tried using the alternate "attributes" syntax for repeats
(detailed at http://www.w3.org/TR/xforms/#ui.repeat.via.attrs), and the
rendering of the form is even more unrecognizable.  So I'm not sure how
best to continue troubleshooting the issue.  Could anyone suggest some
ideas?  I'm happy to provide more info.

Thanks,
Joe
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to