The object of this assignment is to write an XSLT stylesheet that will transform a movie database to an XSL-FO document, which can then be converted to a PDF file. Your final PDF file should look like this.
The XML file you should use is a modified version of the XML file from assignment 4. Here it is. The changes are:
<actor> has a
<name> and optional <role><reviewer> element is now a sibling of its
of <review>, not a child element. (Having it as a child
element was a bad design.)region-before is one half inch tall, and contains the words
Movie List - your name, right aligned in 10 point type.region-after is one half inch tall, and contains the word
Page followed by the page number, centered, also in ten point type.For each movie:
Black and White.The synopsis is followed by production credits
special="yes", the name appears in italic, but NOT
the legend. (e.g., Writer: Special Guy)Production credits are followed by the cast.
<role> for the actor, then you fill the first cell
with dots by adding a <fo:leader leader-pattern="dots"/>.
In order to fill the cell, the enclosing <fo:block> must
set text-align-last="justify" as one of its attributes. Don’t ask.The cast is followed by reviews, if any.
text-aligned at the right side.<reviewer> element has type="periodical",
then its content should appear in italics.If you wish to use the extra information in the <actor>
element to do something special with lead actors or actors who deserve special
mention, you may do so, but you do not have to.
The trickiest part comes when you are handling a
<review> element and have to output the
corresponding <reviewer>. This is because
review/reviewer pairs are all in a line; they aren’t
“fenced in” by a parent element the way that
name/role pairs are enclosed in an <actor>
element.
If you are in a template that matches a <review>
element, and you want to get the corresponding <reviewer>,
use this expression: select="following-sibling::*[position()=1]".
The following-sibling::* selects all nodes on the following-sibling axis.
The [position()=1] predicate will narrow that down to the first of those
siblings, which is the <reviewer> element that you want.
Your final PDF file should look like this.