HighDots Forums  

any converter out there from in-tag styled html to css-based pages?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss any converter out there from in-tag styled html to css-based pages? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lbrtchx@gmail.com
 
Posts: n/a

Default any converter out there from in-tag styled html to css-based pages? - 12-12-2008 , 09:46 AM






~
and BTW preferably open source and in java ;-)
~
Thanks
lbrtchx

Reply With Quote
  #2  
Old   
pecan
 
Posts: n/a

Default Re: any converter out there from in-tag styled html to css-basedpages? - 12-13-2008 , 12:18 AM






lbrtchx (AT) gmail (DOT) com wrote:
Quote:
~
and BTW preferably open source and in java ;-)
~
Thanks
lbrtchx
Yes.
Me.
But it requires payment.

Catherine


Reply With Quote
  #3  
Old   
lbrtchx@gmail.com
 
Posts: n/a

Default Re: any converter out there from in-tag styled html to css-basedpages? - 12-13-2008 , 04:07 AM



On Dec 13, 12:18 am, pecan <pe... (AT) NOSPAMrouxville (DOT) info> wrote:
Quote:
lbrt... (AT) gmail (DOT) com wrote:
~
and BTW preferably open source and in java ;-)
~
Thanks
lbrtchx

Yes.
Me.
But it requires payment.

Catherine
~
"Me" you say? Jeez, you sound desperate!
~
"You" may just need a little searching:
~
1) docfrac.net: to convert as a batch process html to a richer format
such as RTF to make sure you are not likely to lose anything
~
2) you may want to use some vba automation to do things such as
explicitly writing out links and do some custom clean ups
~
3) docbook "import rtf" and from there you can export it to any
textual format from pdf to plain text
~
and by the way I could do it myself I was just trying to save some
time
~
Thanks
lbrtchx


Reply With Quote
  #4  
Old   
pecan
 
Posts: n/a

Default Re: any converter out there from in-tag styled html to css-basedpages? - 12-14-2008 , 03:17 AM



lbrtchx (AT) gmail (DOT) com wrote:
Quote:
On Dec 13, 12:18 am, pecan <pe... (AT) NOSPAMrouxville (DOT) info> wrote:
lbrt... (AT) gmail (DOT) com wrote:
~
and BTW preferably open source and in java ;-)
~
Thanks
lbrtchx
Yes.
Me.
But it requires payment.

Catherine
~
"Me" you say? Jeez, you sound desperate!
lol
I am. I'm trying to earn a living doing webwork through the internet.
(see oDesk.com)

Quote:
~
"You" may just need a little searching:
~
1) docfrac.net: to convert as a batch process html to a richer format
such as RTF to make sure you are not likely to lose anything
~
2) you may want to use some vba automation to do things such as
explicitly writing out links and do some custom clean ups
~
3) docbook "import rtf" and from there you can export it to any
textual format from pdf to plain text
~
and by the way I could do it myself I was just trying to save some
time
~
I seem to have missed what it is you wanted to do. I thought you wanted
to extract the styles and place them in a separate stylesheet.

Catherine


Reply With Quote
  #5  
Old   
Andy Dingley
 
Posts: n/a

Default Re: any converter out there from in-tag styled html to css-basedpages? - 12-15-2008 , 07:41 AM



On 12 Dec, 14:46, lbrt... (AT) gmail (DOT) com wrote:
Quote:
*and BTW preferably open source and in java ;-)
No.

OK, I do. It's mine, it's written in unintelligble Python and is still
such a work-in-progress that I've no intention of releasing it.

The problem is that there are two ways to do this. One is too simple
to be useful, the other is too fundamentally difficult to be
implementable. It's related to the same underlying issue that makes
useful site-wide WYSIWYG currently impractical (the need to take a
Structuralist view of HTML).

Simply, you scan the HTML document and attach either classes or ids
(your choice, but do it the same way throughout the document) to any
element that has style information attached to it. Then list each of
these style attribute contents as a CSS block with an appropriate
selector. This is so easy you could do it in JavaScript or VBA, but
it's merely a syntactic re-arrangement, not a transformation. Once you
have this output, you're no better off for being able to re-work the
site's page presentation meta-structure - you might as well start
working from the HTML (most of the time anyway).

Doing it usefully is difficult, because you need to apply this
presentation meta-structure to the output document, so that you can
rationalise the inlined CSS as you go. Rather than just turning a set
of elements with style="foo:bar" into a set of matching CSS blocks
linked by id values, it's necessary to _identify_ that these should be
grouped together, then a single block with a class selector and to
apply this class to each of the relevant elements. That's the sort of
inferrence that humans can do, but is really hard to do automatically.
It certainly can't be done by simple assertional algorithms (yes or
no) it needs some degree of fuzzy reasoning to it.

My current tool for this (aimed at refactoring a squillion page web
app) is to mark up a lot of class structure _manually_ first (i.e. to
couple the meta-structure into the page), then to automatically
process this (with the aid of a whole bunch of Ear of Bat) so as to
extract the HTML into class-level blocks. This process then iterates
to manually improve the structure markers and automatically re-
generate the resultant simplified HTML and generated CSS. A crucial
part of this refactoring step is automated regression testing to check
that the rendered page still looks the same as the original - grabbing
bitmaps should be pixel-per-pixel identical (at this level, dodging a
few browser bugs).

This really isn't an easy problem to solve automatically. Anything
that claims to is probably doing a very simplified version of it.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.