At 2006-03-22 17:23 +0000, Lloyd Thompson wrote:
I am writing XSL-FO to produce a questionnaire document. For this I
will need to create empty text-boxes and tick-boxes.
When I've had to create quiz layouts, I've used <block-container>
very effectively: if the quiz had a specified distance *including*
the question, the question is flowed inside the <block-container>,
whereas if the quiz had a specified distance for just the answer, the
question is flowed before the <block-container>.
Here is the test bed that I used to learn this ... these are the
first two questions from our evaluation form for our hands-on XSL
training ... the first has the question inside the block container,
the second has the question before the block container:
<list-item>
<list-item-label text-align="end" end-indent="label-end()">
<block>1)</block>
</list-item-label>
<list-item-body start-indent="body-start()">
<block-container block-progression-dimension="2.3cm">
<block start-indent="0pt">
<xsl:text>Did the material cover what you were expecting?</xsl:text>
</block>
</block-container>
</list-item-body>
</list-item>
<list-item>
<list-item-label text-align="end" end-indent="label-end()">
<block>2)</block>
</list-item-label>
<list-item-body start-indent="body-start()">
<block space-before="inherited-property-value(font-size) * .5"
text-align-last="justify">
<xsl:text>Quality of the presentation slides:</xsl:text>
<leader/>
<xsl:text>(poor) 1 - 10 (excellent): </xsl:text>
<leader leader-pattern="rule" leader-length="1cm"
rule-thickness="1pt"/>
</block>
<block space-before="inherited-property-value(font-size) * .5">
<xsl:text>How might the presentation slides be improved?</xsl:text>
</block>
<block-container block-progression-dimension="2.0cm"
start-indent="0pt"
space-before="inherited-property-value(font-size) * .5">
<block/>
</block-container>
</list-item-body>
</list-item>
For tick-boxes, I use a bordered <inline-container>, as in the
following also from my evaluation sheet, though this appears to only
work in Antenna House and not in XEP or in Ibex, and I haven't
bothered to figure out who is right and who is wrong ... it might
only be an issue of those tools not supporting <inline-container>:
<block space-before="inherited-property-value(font-size) * .5"
text-align-last="justify">
<xsl:text>Would you like to be contacted for information</xsl:text>
<xsl:text> on future courses from either the event</xsl:text>
<xsl:text> organizers or directly from Crane?</xsl:text>
<leader/>
<inline-container width="1em" height="1em"
alignment-adjust="text-after-edge"
border-style="solid" border-width="1pt">
<block><leader/></block>
</inline-container>
<xsl:text> No </xsl:text>
<inline-container width="1em" height="1em"
alignment-adjust="text-after-edge"
border-style="solid" border-width="1pt">
<block><leader/></block>
</inline-container>
<xsl:text> Yes</xsl:text>
</block>
From my understanding of XSL-FO the above should be right.
I hope this helps.
. . . . . . . . Ken
At 2006-03-22 17:23 +0000, Lloyd Thompson wrote:
Greetings,
I am writing XSL-FO to produce a questionnaire document. For this I
will need to create empty text-boxes and tick-boxes. So far, I have
managed to produce text-boxes using fo:table; the text-boxes are
simply cells that contain borders. The problem is that this box
grows as the text in another column spans over more than one line,
so ideally I want to place a fixed size box in the table.
What is the best way to go about doing this? I tried to create an
empty fo:block and specified attributes for height and width but
unfortunatley as the box is not populated, it appears as a flat
line. Do I have to produce an SVG?
Many thanks,
Lloyd
--
Upcoming XSLT/XSL-FO hands-on courses: Washington,DC 2006-06-12/16
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--