[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Adding a border to graphics

Subject: Adding a border to graphics
From: Nancy Brandt <nancy_brndt@xxxxxxxxx>
Date: Tue, 30 Oct 2007 05:34:26 -0700 (PDT)
 Adding a border to graphics
Hi guys!

I have encountered the following issue:

I wanna have two kinds of images in my documents: 
with a border and without a border.

So I did two things:

1) in my template for bordered images I inserted a
"role" attribute with value "bordered" like that:

<xsl:template match="diagram_border"> 
<xsl:element name="figure">
    <xsl:attribute name="id">
      <xsl:value-of select="@ref"/>
    </xsl:attribute>
    <xsl:attribute name="role">
    <xsl:value-of select="@bordered"/>
    </xsl:attribute>	    
    <title>
      <xsl:value-of select="@t"/>
    </title>
    <mediaobject>
      <imageobject>
        <xsl:element name="imagedata">
          <xsl:attribute
name="width">80%</xsl:attribute>
          <xsl:attribute
name="scalefit">1</xsl:attribute>
          <xsl:attribute name="fileref">
	  <xsl:value-of select="concat('images/', @ref,
'.png')"/>
          </xsl:attribute>
        </xsl:element>
      </imageobject>
    </mediaobject>
  </xsl:element>
</xsl:template>


2) I added the following in the customization layer:

<xsl:template match="imagedata">
<fo:external-graphic>
    <xsl:if test="ancestor::figure[role|@bordered]">
    <xsl:attribute
name="border-color">black</xsl:attribute>
    <xsl:attribute
name="border-style">solid</xsl:attribute>
    </xsl:if>
</fo:external-graphic>
</xsl:template>

However, it does not work. Please, advise!

Thanks in advance,
Nancy


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.