The challenge with converting XML to Word lies in the serializer's ability
to interpret the tags into Word "objects". How does a serializer interpret
the tag, <income>? Is it a paragraph? Is it a field? Is it a bookmark? Is
it bold? Is it italic? etc... These are the questions that the serializer
must answer and in all likelihood the XML will not provide any answers to.
The answer lies in a transformation of the XML into output XML that the
serializer can understand and interpret. This does put the burden on the
intermediate transformation, but it allows the serializer to convert any and
all XML to Word.
BTW, we do have a product that converts XML to Word, Author wX. It uses the
same concept I described above to do this.
Regards,
Chris
www.b-bop.com
-----Original Message-----
From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 20, 2001 5:52 AM
To: [EMAIL PROTECTED]
Subject: Re: MS Word serializer
David Brunkow wrote:
>
> Can anyone tell me if there are any plans to write an MS Word serializer?
I
> want to conver XML to Word, not Word to XML.
You have two alternatives (something I had to do in a previous job):
1) Learn MS Word XP's XML markup (probably the best solution)
2) Use word to open simple HTML files.
I chose the second because we had a formatted text output that needed to be
reformatted to a Word document. The first solution was all Visual Basic for
Applications (VBA), and loaded the text in and made all the transformations
in no less than 72 passes. That was an 8 hour process.
The second solution used C++ to convert the text to HTML in one pass, load
the
HTML document in Word, and apply a much simpler VBA routine. The whole
process
was down to a couple of minutes (the text 2 html was 5 seconds).
Check this out with a regular HTML file, but try changing the extention to
".doc" and open the page. (Nothing fancy, just a couple <h1> and <p> tags).
If it opens correctly, you have your solution: output HTML, with a Word
mime-type.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>