Is there any equivalent for CSS in XSL-FO

2004-06-08 Thread Amita Rathore

Hi All,

I am creating a pdf which needs a lot
of formatting. Defining the same font size, color for multiple inlines
is redundant. 

I am looking forward to something similar
to CSS. So that I define the formatting at one place and then can reuse
the tag whereever required.

Thanks,
--
Amita Rathore



RE: Is there any equivalent for CSS in XSL-FO

2004-06-08 Thread Amit Garg



Hi,
 You can create your own template for creating the 
standard formatting attributes. You only need to use that template in each page 
and by this you can reuse the tags.


  -Original Message-From: Amita Rathore 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, June 08, 2004 11:46 
  AMTo: [EMAIL PROTECTED]Subject: Is there any 
  equivalent for CSS in XSL-FOHi All, I am creating a pdf 
  which needs a lot of formatting. Defining the same font size, color for 
  multiple inlines is redundant. I 
  am looking forward to something similar to CSS. So that I define the 
  formatting at one place and then can reuse the tag whereever required. 
  Thanks,--Amita 
  Rathore



RE: Is there any equivalent for CSS in XSL-FO

2004-06-08 Thread Amita Rathore

I created the following template in
the xsl which is using the fo tags:

xsl:template match=B
fo:inline font-weight=bold
xsl:apply-templates/
/fo:inline
/xsl:template

As per my understanding if in this xsl
i write fo:block This is a B test /B /fo:block,
the result should be displayed with test in bold. 

But the test is not getting
displayed at all. Surely I am making a mistake, what is it ?








Amit Garg [EMAIL PROTECTED]
06/08/2004 11:56 AM
Please respond to fop-user

To:
   [EMAIL PROTECTED]
cc:
   
Subject:
   RE: Is there any equivalent for CSS
in XSL-FO

   

Hi,
  You can create your
own template for creating the standard formatting attributes. You only
need to use that template in each page and by this you can reuse the tags.

-Original Message-
From: Amita Rathore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 08, 2004 11:46 AM
To: [EMAIL PROTECTED]
Subject: Is there any equivalent for CSS in XSL-FO


Hi All, 

I am creating a pdf which needs a lot of formatting. Defining the same
font size, color for multiple inlines is redundant. 

I am looking forward to something similar to CSS. So that I define the
formatting at one place and then can reuse the tag whereever required.


Thanks,
--
Amita Rathore



Re: Is there any equivalent for CSS in XSL-FO

2004-06-08 Thread Chris Bowditch
Amita Rathore wrote:
ill answer your first question first 

 I am looking forward to something similar to CSS. So that I define the
 formatting at one place and then can reuse the tag whereever required.
in XSL you can define attribute sets which define re-usuable groups of 
properties, e.g.

xsl:attribute-set name=Large Text
xsl:attribute name=font-familyHelvetica/xsl:attribute
xsl:attribute name=font-weightbold/xsl:attribute
xsl:attribute name=font-size20pt/xsl:attribute
xsl:attribute name=background-colorblue/xsl:attribute
/xsl:attribute-set
and then re-call the attribute set in your templates, e.g.
xsl:template match=p
fo:block xsl:use-attribute-set=Large Text
xsl:apply-templates/
/fo:block
/xsl:template
I created the following template in the xsl which is using the fo tags:
xsl:template match=B
fo:inline font-weight=bold
xsl:apply-templates/
/fo:inline
/xsl:template
As per my understanding if in this xsl i write fo:block This is a B 
test /B /fo:block, the result should be displayed with test in bold.

But the test is not getting displayed at all. Surely I am making a 
mistake, what is it ?
I am creating a pdf which needs a lot of formatting. Defining the same 
font size, color for multiple inlines is redundant.
The template for processing the B looks okay by itself, the problem is more 
likely to do with the template(s) that process the parent elements of B

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]