Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   MS Word to XHTML (http://www.velocityreviews.com/forums/t169841-ms-word-to-xhtml.html)

Caversham 09-11-2005 05:02 AM

MS Word to XHTML
 
Is there any macro / other tool - free or commercial - that can split
long Word docs into multiple XHTML pages?

Any comments on the quality/effectiveness of suitable products also
welcomed.


Roy Schestowitz 09-11-2005 06:45 AM

Re: MS Word to XHTML
 
__/ [Caversham] on Sunday 11 September 2005 06:02 \__

> Is there any macro / other tool - free or commercial - that can split
> long Word docs into multiple XHTML pages?
>
> Any comments on the quality/effectiveness of suitable products also
> welcomed.


I would advice you to do the following:

* Download Open Office 2 beta (openoffice.org)

* Install it on your Windows machine

* Open the Word document in Open Office

* Save or export as HTML

* Fragment the output as requires, probably by hand (WYSIWYG programs like
Word have no notion of structure or semantics)

* Run HTMLTidy on the resulting HTML (find it in sourceforge.org)

* Modify output to fit XHTML standards

* Use search & replace for the task above

* Lastly, make sure your code validates (W3C validator)

Good luck,

Roy

--
Roy S. Schestowitz | "Slashdot is standard-compliant... in Japan"
http://Schestowitz.com | SuSE Linux | PGP-Key: 74572E8E
7:40am up 17 days 6:08, 3 users, load average: 2.10, 2.08, 1.85

Alan J. Flavell 09-11-2005 08:17 AM

Re: MS Word to XHTML
 

On Sun, 11 Sep 2005, Roy Schestowitz wrote (seen on alt.html):

[...]
> * Fragment the output as requires, probably by hand (WYSIWYG programs
> like Word have no notion of structure or semantics)


This isn't by any means aimed at you personally, but your posting
triggered a response from me, and it looks as if knowledge is proceeding
backwards.

Proper use of MS Word uses Styles, oriented towards the structure of the
document. (If I had my way, I'd rip the direct styling buttons out of the
main menu of Word, and hide them away in an Advanced Users menu). Such
properly-made Word documents are reasonably capable of being converted
well to structural HTML, and a stylesheet suitable for web use can then be
applied (it usually won't be the same "style sheet" (= style template) as
would be suitable for a printed Word document, of course!).

I had some experience, around 1997-8, with the (payware) rtftohtml program
- subsequently renamed and marketed under the company name Logictran - it
had this pretty-much sorted out. I must admit I haven't got experience of
it since the change of name, but I can say that the principles of the
original program seemed to what I was looking for, unlike most of the
other pseudo-WYSIWYG garbage from other places (that offended all sense of
what is suitable for the WWW).

With that rtftohtml program, decently structured Word could be turned into
decently structured HTML, and split on chapter or section headings quite
automatically, with HTML indexes and table of contents generated
automatically. OK, there were some rough edges, but at least the
principles showed up just fine. I find it sad that some 7 years later we
seem to have fallen back to the stone age of direct styling and
pseudo-WYSIWYG in most of the Word conversions that I have seen.

[Note - there are other programs called rtftohtml or rtf2html - it may be
that some of them do a similar job, I can't speak for or against them,
I'm just commenting as a reasonably satistfied user of version 4 of this
particular program from around 1998 onwards.]

Toby Inkster 09-11-2005 09:02 AM

Re: MS Word to XHTML
 
Roy Schestowitz wrote:

> * Run HTMLTidy on the resulting HTML (find it in sourceforge.org)
> * Modify output to fit XHTML standards
> * Use search & replace for the task above


Tidy can do all of this -- use the "-asxhtml" option.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


SpaceGirl 09-11-2005 09:35 AM

Re: MS Word to XHTML
 
Alan J. Flavell wrote:
> On Sun, 11 Sep 2005, Roy Schestowitz wrote (seen on alt.html):
>
> [...]
>
>> * Fragment the output as requires, probably by hand (WYSIWYG programs
>>like Word have no notion of structure or semantics)

>
>
> This isn't by any means aimed at you personally, but your posting
> triggered a response from me, and it looks as if knowledge is proceeding
> backwards.
>
> Proper use of MS Word uses Styles, oriented towards the structure of the
> document. (If I had my way, I'd rip the direct styling buttons out of the
> main menu of Word, and hide them away in an Advanced Users menu). Such
> properly-made Word documents are reasonably capable of being converted
> well to structural HTML, and a stylesheet suitable for web use can then be
> applied (it usually won't be the same "style sheet" (= style template) as
> would be suitable for a printed Word document, of course!).
>
> I had some experience, around 1997-8, with the (payware) rtftohtml program
> - subsequently renamed and marketed under the company name Logictran - it
> had this pretty-much sorted out. I must admit I haven't got experience of
> it since the change of name, but I can say that the principles of the
> original program seemed to what I was looking for, unlike most of the
> other pseudo-WYSIWYG garbage from other places (that offended all sense of
> what is suitable for the WWW).
>
> With that rtftohtml program, decently structured Word could be turned into
> decently structured HTML, and split on chapter or section headings quite
> automatically, with HTML indexes and table of contents generated
> automatically. OK, there were some rough edges, but at least the
> principles showed up just fine. I find it sad that some 7 years later we
> seem to have fallen back to the stone age of direct styling and
> pseudo-WYSIWYG in most of the Word conversions that I have seen.
>
> [Note - there are other programs called rtftohtml or rtf2html - it may be
> that some of them do a similar job, I can't speak for or against them,
> I'm just commenting as a reasonably satistfied user of version 4 of this
> particular program from around 1998 onwards.]


Word XP and upwards stores its documents in XML format doesn't it? You
could probably write your own XSLT to turn in into HTML fairly easily.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
# this post (c) Miranda Thomas 2005
# explicitly no permission given to Forum4Designers
# to duplicate this post.

Alan J. Flavell 09-11-2005 10:19 AM

Re: MS Word to XHTML
 
On Sun, 11 Sep 2005, SpaceGirl wrote:

> Alan J. Flavell wrote:


[comprehensive quote of my posting, without apparently having anything
relevant to say about it.]

> Word XP and upwards stores its documents in XML format doesn't it?


So what? XML is only a format for defining markup. If the markup
doesn't do anything meaningful (specifically - if it only creates a
visual result on a printed page, without having any significant
structure) then it's not going to turn into effective HTML: it'd just
be the usual garbage in / garbage out that we're accustomed to with
Word conversions to soi-disant "web" format.

> You could probably write your own XSLT to turn in into HTML fairly
> easily.


There seems to be some kind of conceptual disconnect here. Most Word
documents (in my experience) simply don't contain the necessary
structure for useful conversion to HTML: they've been created as a
purely visual construction for printing onto paper. It's irrelevant
what underlying technology you use (RTF, XML, SGML, whatever) - the
problem is that the source material simply does not represent the
needed structures, *because the document authors do not put it there*.

You might as well try to convert cheese into fresh cream: both are
fine milk products, it's true, but instead of trying to convert the
one into the other, you'd do better to produce them both starting from
fresh milk. And the kind of "fresh milk" that's needed here is
logically structured text markup. Not visual formatting. Until the
authors of Word documents can grasp that, the prospects for conversion
of Word to web formats are poor, IMHO.

Toby Inkster 09-11-2005 12:21 PM

Re: MS Word to XHTML
 
Alan J. Flavell wrote:

> You might as well try to convert cheese into fresh cream: both are
> fine milk products, it's true, but instead of trying to convert the
> one into the other, you'd do better to produce them both starting from
> fresh milk.


That is a very nice analogy -- I must try to remember it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


Roy Schestowitz 09-11-2005 12:46 PM

Re: MS Word to XHTML
 
__/ [Toby Inkster] on Sunday 11 September 2005 10:02 \__

> Roy Schestowitz wrote:
>
>> * Run HTMLTidy on the resulting HTML (find it in sourceforge.org)
>> * Modify output to fit XHTML standards
>> * Use search & replace for the task above

>
> Tidy can do all of this -- use the "-asxhtml" option.


I didn't know about the existence of this option. Perhaps I am using an
(very) old version of tidy. I wasn't impressed the last time I used it,
which was over a year ago. I must also have thought about complex cases
when I suggested the steps above. Placements of images, for example, might
pose some difficulties, especially if they float.

OO.org will be a decent tools for steering away from non-standard attributes
and hard-coded fonts. The last thing the World Wide Web needs is more code
that is 'made up', which non-MS browsers like Firefox must accept and adapt
to. Sad, yet inevitable.

It sometimes upsets me that kids at school are taught to compose using
WYSIWYG paradigms. It only encourages information to be uniterpretable.
Like Zeldman once said, people used to toss bottles out the car's window
until they realised the impact of carelessness and laziness (misquotation,
but something to that effect anyway).

Roy

--
Roy S. Schestowitz | "Computers are useless. They only solve problems"
http://Schestowitz.com | SuSE Linux | PGP-Key: 74572E8E
1:35pm up 17 days 12:03, 3 users, load average: 0.67, 0.94, 0.88

Roy Schestowitz 09-11-2005 12:59 PM

Re: MS Word to XHTML
 
__/ [Alan J. Flavell] on Sunday 11 September 2005 11:19 \__

> On Sun, 11 Sep 2005, SpaceGirl wrote:
>
>> Alan J. Flavell wrote:

>
> [comprehensive quote of my posting, without apparently having anything
> relevant to say about it.]
>
>> Word XP and upwards stores its documents in XML format doesn't it?

>
> So what? XML is only a format for defining markup. If the markup
> doesn't do anything meaningful (specifically - if it only creates a
> visual result on a printed page, without having any significant
> structure) then it's not going to turn into effective HTML: it'd just
> be the usual garbage in / garbage out that we're accustomed to with
> Word conversions to soi-disant "web" format.
>
>> You could probably write your own XSLT to turn in into HTML fairly
>> easily.

>
> There seems to be some kind of conceptual disconnect here. Most Word
> documents (in my experience) simply don't contain the necessary
> structure for useful conversion to HTML: they've been created as a
> purely visual construction for printing onto paper. It's irrelevant
> what underlying technology you use (RTF, XML, SGML, whatever) - the
> problem is that the source material simply does not represent the
> needed structures, *because the document authors do not put it there*.
>
> You might as well try to convert cheese into fresh cream: both are
> fine milk products, it's true, but instead of trying to convert the
> one into the other, you'd do better to produce them both starting from
> fresh milk. And the kind of "fresh milk" that's needed here is
> logically structured text markup. Not visual formatting. Until the
> authors of Word documents can grasp that, the prospects for conversion
> of Word to web formats are poor, IMHO.


I fully agree with you on that point. Any attempt at rephrasing the same
ideas would result in depletion. To suggest ways forward, I suggest that
the OP, who clearly wants to publish material on the Web, learns LaTeX.
Shall the idea of editing raw text become daunting, I suggest LyX < lyx.org
> [LyX: Front-end to LaTeX]. 5 minutes with LyX would help anyone realise

the difference and convey the idea, e.g. varying outputs, styles,
imposition of structure, etc.

Only a few days ago, somebody in the LyX mailing lists mentioned his
upcoming presentation on "Word: What you See Is What a Mess". The
presentation I deliver on Wednesday is well-formed XHTML <
http://schestowitz.com/Weblog/archiv...blic-speaking/ > and is
motored by Eric Meyer's S5.

Roy

--
Roy S. Schestowitz | "Software sucks. Open Source sucks less."
http://Schestowitz.com | SuSE Linux | PGP-Key: 74572E8E
1:45pm up 17 days 12:13, 3 users, load average: 0.51, 0.58, 0.70

Stefan Ram 09-11-2005 01:08 PM

Re: MS Word to XHTML
 
"Caversham" <acaversh@yahoo.com> writes:
>Is there any macro / other tool - free or commercial - that can split
>long Word docs into multiple XHTML pages?


I have a macro "Wrocco" that extracts XML from a documented
including paragraph and character styles and document
properties, but not everything (no formatting or tables).

The VBA source code and some links to other resources can
be found in the project page:

http://www.purl.org/stefan_ram/pub/wrocco_en

If you would use any tool to create XML from Word (including
XHTML), you could then use XSLT to split this into multiple
pages, I assume.



All times are GMT. The time now is 10:18 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.