CS99I Showing a two-level XML file Page-by-page with the XMLDSO applet

Sample by Gio Wiederhold based [Sean McGrath: XML by Example; Prentice Hall, 1998.]

Applet

use listing (with XML comments)


<applet code=com.ms.xml.dso.XMLDSO.class
width=100%
height=50
id=xmldso
>
<PARAM NAME="url" VALUE="../../movies/Hitchlines.xml">
</applet>
<H2>Listing of all Hitchcock movies, page by page.</H2>
<INPUT TYPE="button" VALUE="Next" ONCLICK="table.nextPage();">
<INPUT TYPE="button" VALUE="Prev" ONCLICK="table.previousPage();">
<INPUT TYPE="button" VALUE="Last" ONCLICK="table.lastPage();">
<INPUT TYPE="button" VALUE="First" ONCLICK="table.firstPage();">

<!-- errors: Values on director data line do not show -->
<!-- major problem: how to handle multiple tables -->
<TABLE DATAPAGESIZE=8 ID=table WIDTH=100% datasrc=#xmldso>
<THEAD><TH>DId:</TH><TD><DIV datafld=director></TD>
<TH>FirstYear:</TH><TD><DIV datafld=firstYear></TD>
<TH>Director</TH><TD><DIV datafld=dirname></TD>
<TH Colspan=4>Films</TH></THEAD>
<TR><TH>FId</TH><TH>Title</TH><TH>Year</TH>
<TH>Director</TH><TH>Producer(s)</TH><TH>Studio</TH>
<TH>Process</TH><TH>Type</TH><TH>Award</TH><TH>Locale</TH>
<TH>Notes</TH></THEAD>
<TR>
<TD><DIV datafld=Fid></TD>
<TD><DIV datafld=title></TD>
<TD><DIV datafld=year></TD>
<TD><DIV datafld=dname></TD>
<TD><DIV datafld=prods></TD>
<TD><DIV datafld=studio></TD>
<TD><DIV datafld=prc></TD>
<TD><DIV datafld=type></TD>
<TD><DIV datafld=award></TD>
<TD><DIV datafld=lc></TD>
<TD><DIV datafld=notes></TD>
</TR>
</TABLE>
<INPUT TYPE="button" VALUE="Next" ONCLICK="table.nextPage();">
<INPUT TYPE="button" VALUE="Prev" ONCLICK="table.previousPage();">
<INPUT TYPE="button" VALUE="Last" ONCLICK="table.lastPage();">
<INPUT TYPE="button" VALUE="First" ONCLICK="table.firstPage();">

Execution


Listing of all Hitchcock movies, page by page.


DId: FirstYear: Director:Coverage:

Switch of table occurs when identifier not found
FIdTitleYear DirectorProducer(s)Studio ProcessTypeAwardLocale Notes

But this picks up top part again instead of going to 1940 director entry
DId: FirstYear: Director:Coverage:

FIdTitleYear DirectorProducer(s)Studio ProcessTypeAwardLocale Notes