[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Displaying Icon in Page Margin
I've been banging my head against a problem for most of the day and Eliot Kimber suggested I bring it here. I have a specialized element wrapper in DITA that can be applied to just about any phrase (list item, table entry, para, etc.) I'm rendering to PDF via FO (XEP) and what I'd like to do is draw a small icon approximately 20px from the margin of the page wherever this element is used. If it's found inside a table cell, for example, I'd like the icon to draw to the left of the table inline with the cell where it's found. I've tried two methods, neither of which is doing what I need. The first looks like: <fo:block-container absolute-position="fixed" left="20px"> <fo:block > <fo:external-graphic src="url({concat($artworkPrefix, $noteImagePath)})" /> </fo:block> </fo:block-container> This works for locating the graphic along the left margin, but , but unfortunately the graphic is displayed at the top of the page and I haven't been able to figure out a way to find the vertical position of the element to be able to set a "top" attribute correctly. The other method which seems more promising is to use floats like so: <xsl:template match="limit"> ... <xsl:if test="@origin='fdx'"> <fo:float float="start" > <fo:block-container> <fo:block > <fo:external-graphic src="url({concat($artworkPrefix, $noteImagePath)})" xsl:use-attribute-sets="image"/> </fo:block> </fo:block-container> </fo:float> </xsl:if> <fo:inline> <xsl:if test="@memoryitem='yes'"> <xsl:attribute name="text-decoration">underline</xsl:attribute> </xsl:if> <xsl:apply-templates/> </fo:inline> </template> This seems to work as designed, but unfortunately it is drawing the graphic inside the table cell (to the left of the marked entry) and not in the margin. Any help or pointers is greatly appreciated. -bpopp
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|