For example, what AsciiDoc emits might look something like:

<?dbfo border-left-color="black"?>

In the XSL stylesheet, you'll then need something like:

<xsl:variable name="border-left-color">
    <xsl:call-template name="pi.dbfo_border-left-color"/>
 </xsl:variable>

  <xsl:if test="$border-left-color != ''">
    <xsl:attribute name="border-left-color">
      <xsl:value-of select="$border-left-color"/>
    </xsl:attribute>
  </xsl:if>

It ain't pretty, but it gets the job done.

-Dan



On Fri, Apr 12, 2013 at 2:40 PM, Dan Allen <[email protected]> wrote:

> Did you see my response to your previous message. It's a solution to your
> specific requirement of coloring a background cell.
>
> As far as other types of styling, that's a bit tougher. It's all in the
> hand-off between DocBook and XSL-FO. You need to sort out what the XSL
> needs to find in the DocBook to get the appropriate XSL-FO output. Then you
> need to get AsciiDoc to put that into the DocBook it generates.
>
> I do agree that it would be nice if AsciiDoc supported a generic way of
> passing a role to a table cell. Currently it can do things like halign,
> valign, etc, but it doesn't have an "open" attribute assignment.
>
> You're probably going to need to pass some addition processing
> instructions through to the XSL template and then process them there.
> Customizing the XSL template is complex and tests your patience, but it is
> *extremely* powerful once you sort it out (though you will still want to
> gouge your eyes out).
>
> -Dan
>
>
> On Fri, Apr 12, 2013 at 2:27 PM, Mark Volkmann 
> <[email protected]>wrote:
>
>> I see that I can do this to apply formatting to a run of text.
>> 1) surround the text with # delimiters (or others)
>> 2) precede the first # with [role-name]
>> 3) define a CSS class for role-name
>> 4) refer to the CSS file in the a2x command with --stylesheet
>> some-name.css
>>
>> However, I haven't found a way to format a table cell.
>> I can use [role-name] to assign a role to the text in a table cell, but
>> not to the cell itself (the td tag in the case of HTML output).
>> I need this so I can set the background color of a cell so the background
>> color completely fills the cell.
>> Is there a way to do this?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "asciidoc" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/asciidoc?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Dan Allen
> Principal Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
>
> http://google.com/profiles/dan.j.allen
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>



-- 
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to