RE: how can I create template for manipulating embedded and exter nal style sheet present in the html page? Is it possible?

2004-09-08 Thread Eldho George
Hai all
Thanks clay Leeds.
Thank you for your nice reply. I got your idea.But again some
problem.Actually my problem is to create a pdf converter.It is able to
convert  any  web page into pdf.Whenever an external stylesheet present in
the html file I want to read that css file and read each value from css and
use it with corresponding template.

According to your suggestion, I have to create different attribute set
depending upon the css.I would like to know how can i dynamically insert
these attribute set into corresponding template.Classes are also present in
the css.How can i solve this problem



Thanks and Regards

Eldho George
Junior Software Engineer
Ocwen Financial Solution Pvt.Ltd.
Ph:56671234-1050


-Original Message-
From: Clay Leeds [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 11:09 PM
To: [EMAIL PROTECTED]
Subject: Re: how can I create template for manipulating embedded and
external style sheet present in the html page? Is it possible?

On Sep 6, 2004, at 7:06 AM, Eldho George wrote:
 Hi,

 I would like to know how can I create template for manipulating 
 embedded and external style sheet present in the html page? Is it 
 possible?

 Please help meplease tell me is it possible with 
 xslt+xsl-fo? I already created template for processing inline style 
 attribute.

Is it possible for you to create an attribute-set and use that to 
modify your pages/tables, etc. document-wide? Here's a link which might 
help[1].

BTW, this isn't a tool for 'converting' a CSS file to XSL/XSLT. You 
would have to set up an attribute-set, and then implement it for the 
document using the use-attribute-set attribute.

Hope this helps!

Web Maestro Clay

[1]
http://www.xml.com/lpt/a/2003/06/11/short-xslt.html


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


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


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



Re: how can I create template for manipulating embedded and exter nal style sheet present in the html page? Is it possible?

2004-09-08 Thread Clay Leeds
On Sep 7, 2004, at 10:13 PM, Eldho George wrote:
Hai all
Thanks clay Leeds.
Thank you for your nice reply. I got your idea.But again some
problem.Actually my problem is to create a pdf converter.It is able to
convert  any  web page into pdf.Whenever an external stylesheet 
present in
the html file I want to read that css file and read each value from 
css and
use it with corresponding template.

According to your suggestion, I have to create different attribute set
depending upon the css.I would like to know how can i dynamically 
insert
these attribute set into corresponding template.Classes are also 
present in
the css.How can i solve this problem
I don't know the answer to these questions. I would suspect you would 
want to create one attribute set which holds your 'defaults' 
(font-family, font-size, color, background-color, etc.) and then a 
different attribute-set for each 'class'. You (or someone you hire) can 
probably write something fairly quickly, which will take a CSS file, 
and output an attribute-set. If you do, it would be great if you could 
post it back for others to use.

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


RE: how can I create template for manipulating embedded and exter nal style sheet present in the html page? Is it possible?

2004-09-07 Thread Eldho George
Hi mike

Thank you for your reply. Thank you..

Actually my problem is i want to convert a web page into PDF. What is my
logic is i created one servlet.In that servlet
i am reading the content of url(html content).I apply W3C tidy to make it as
xhtml.I created an xsl file using xslt and xsl-fo.
I created template for all the html 4.0 tags and its working properly.(Some
problem with table).Then applying xhtml and xsl to 
XSLTInputHandler of fop and render it to PDF.

My problem is with table only

table width=.I created template for width attribute.

xsl:attribute-set name=table-structure
xsl:attribute name=table-layoutauto/xsl:attribute
xsl:attribute name=space-before10pt/xsl:attribute
xsl:attribute name=space-after10pt/xsl:attribute
/xsl:attribute-set


fo:table xsl:use-attribute-sets=table-structure
xsl:when test=@width
xsl:attribute name=width
xsl:call-template name=createwidth/
/xsl:attribute
/xsl:when
/fo:table

But all the time the table will be displayed on the entire page width.
suppose we are creating a table with 2 column.
In html this will be displayed as a small table (depending upon the table
content).But my problem is in PDF it will be displayed 
in entire page width. How can i solve this problem..Please help
me.

Following is the overview of my table layout

xsl:attribute-set name=table-structure
xsl:attribute name=table-layoutauto/xsl:attribute
xsl:attribute name=space-before10pt/xsl:attribute
xsl:attribute name=space-after10pt/xsl:attribute
xsl:attribute name=border-styleoutset/xsl:attribute
xsl:attribute name=border-collapseseparate/xsl:attribute
xsl:attribute name=border-spacing2px/xsl:attribute
/xsl:attribute-set

fo:table xsl:use-attribute-sets=table-structure

xsl:for-each
select=tr[1]/th|tr[1]/td|thead/tr[1]/th|thead/tr[1]/td|tbody/tr[1]/th|tbody
/tr[1]/td
fo:table-column
column-width=proportional-column-width(1)/
/xsl:for-each

!--==handle tbody element =--
!--==handle thead element =--
!--==handle tfoot element =--

/fo:table

Thanks in advance
Cheers
george





-Original Message-
From: Mike Trotman [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 06, 2004 9:21 PM
To: [EMAIL PROTECTED]
Subject: Re: how can I create template for manipulating embedded and
external style sheet present in the html page? Is it possible?



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
A quick response as I'm not sure I understand your question - but I
think you're saying you can process all the 'inline' style + other
attributes in an HTML document - but that you want ot be able to
implement CSS class styles in FO-PDF?

If so - that is not easy - particularly as CSS - XSL-FO attributes
don't always map straightforwardly and some have different names,
and detecting precedence, context and dealing with multiple CSS
stylesheets is difficult.

A useful utility from RenderX  which may help you to map equivalent
attributes is at http://www.renderx.com/~renderx/portal/fo2html.html.
This maps XSLFO - HTML - and does a pretty good job.

The way I deal with this problem is to turn the CSS stylesheets into XML
documents - and then add attributes for the XSLFO equivalents.
The structure of this XML depends on how much of the complexity of CSS
you want to capture.)
(this document can the be used to produce the CSS stylesheets as well.)
I then load this document as a parameter when processing and lookup any
formatting for the element / class I am dealing with.
(I find this easier than trying to define fixed attribute sets.)

With XSL / XML based output formatting it is nearly always easier to
have a core XML document from which all other output (including HTML) is
generated.
If your HTML is well formed XML /  XHTML then your task is easier.

FOP 0.20.5 does not suppor table-with-caption - and many other
processors also do not.
FOP 0.20.5 does not support table-layout='auto' (only 'fixed') - and
this is also true of many other processors - so I don't know how you are
getting the table to fit the width of the page.
unless you are specifying that the inline-progression dimension='100%'.

Eldho George wrote:

|  
|
| Hi,
|
|  
|
|  
|
| I would like to know *how can I create template for manipulating
| embedded and external style sheet present in the html page? Is