xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jignesh Shah" <js...@mdnotes.com>
Subject RE: Style sheets with fo?
Date Tue, 01 Jul 2003 21:05:53 GMT

You can use the attribute xsl:use-attribute-sets="page.attrib"> or mebbe
xsl:use-attribute-sets="label.attrib"> and have the corresponding
attributes in a separate xsl spreadsheet. (Style.xsl) in my example

Hope it helps 


XSL template file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 

<xsl:include href="Style.xsl"/> 
<xsl:output method="xml" version="1.0" indent="yes"/>      

<xsl:template match="PatientData/PatientInfo">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <fo:simple-page-master master-name="first"
    <fo:region-body margin-bottom="2cm"/>
    <fo:region-after region-name="footer-first" extent ="1cm"/>


  <fo:page-sequence master-reference="firstAndRest">
  <fo:block xsl:use-attribute-sets="label.attrib">
  Hello there

For example this can be your style.xsl file
<xsl:stylesheet version = '1.0' 
<!-- page.attrib | below attribute set is for fo:simple-page-master:
     page-height, page-width, margin-top, margin-bottom, 
     margin-left, margin-right, space-after.optimum -->

<xsl:attribute-set name="page.attrib">
   <xsl:attribute name="page-height">28cm</xsl:attribute>
   <xsl:attribute name="page-width">24cm</xsl:attribute>
   <xsl:attribute name="margin-top">0.1cm</xsl:attribute>
   <xsl:attribute name="margin-bottom">0.1cm</xsl:attribute>
   <xsl:attribute name="margin-right">1cm</xsl:attribute>
   <xsl:attribute name="margin-left">1cm</xsl:attribute>

<xsl:attribute-set name="label.attrib">
   <xsl:attribute name="text-align">start</xsl:attribute>
   <xsl:attribute name="font-size">11pt</xsl:attribute>
   <xsl:attribute name="font-family">Times</xsl:attribute>
   <xsl:attribute name="font-weight">bold</xsl:attribute>
<!-- <xsl:attribute name="line-height">10pt</xsl:attribute> 
name="keep-with-next.within-page">always</xsl:attribute> -->

-----Original Message-----
From: Bonnie Yelverton [mailto:b.yelverton@verizon.net] 
Sent: Tuesday, July 01, 2003 4:58 PM
To: Fop User List
Subject: Style sheets with fo?

I'm taking a beginning course in XSL and XSL/FO for tech writers.
We are used to using style definitions for paragraphs in FrameMaker and
as well as css for html, but so far in our class we've only learned to
define styles as you go with fo. 
Is there some simple way to make all titles bold navy Arial, for
one place, so it's easy to change it to green if someone wants it
Please give me a reference to where I can study this, or even better
examples that you've been working on. 
It's frustrating going from a very styles- based formatting to having to
define them each one separately.

To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org

To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org

View raw message