Subject: RE: [xsl] XML document to WORD?? From: "Richard Lander" <rlander@xxxxxxxxxxxxx> Date: Tue, 15 Oct 2002 10:08:37 -0700 |
I've done this in the past. It is actually surprisingly easy, as suggested below. The basic approach is: 1. create the Word representation you want of some markup, in Word, against your template if you are using a template other than normal.dot 2. Save the document out as WordHTML 3. Figure out what is going on, then write the WordHTML coding to your XSLT 4. Run a transform against a sample document that would map to the content in step 1 5. Open up resultant document in Word. If it doesn't work, then figure out how to make it work 6. Repeat until you've mapped your doctype to Word. Tips: 1. Don't give up, thinking that you cannot make something to work. If Word can rountrip certain content, then so can you 2. There is a significant amount of WordHTML that you won't have to represent your template, as the template provides Word with the same information 3. You may need to do some dirty work creating some non-wellformed structures, such that you'll need to do things with xsl:text disable-output-escaping="yes" 4. Relying on styles within a template makes this task much easier 5. We did this work w/o any internal Word specs, but by simple reverse-engineering Word. You can likely do the same. HTH, Rich -----Original Message----- From: Wendell Piez [mailto:wapiez@xxxxxxxxxxxxxxxx] Sent: Monday, October 14, 2002 8:37 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx It is surprisingly possible to reverse engineer Word's HTML/CSS export/import and derive a target for an XSLT transform. If done carefully enough, one can even get some styles in Word (which are wonderfully useful). It's a finicky job though, and pushes the edges when you get to things like headers and footers (though much is possible in theory). Yet dreadfully satisfying to "tame" Word. Don't expect to get the XML back though without help. I also like Joerg's other ideas. Cheers, Wendell At 08:00 PM 10/14/2002, Joerg wrote: >Two more possibilities: > >- using MS Word XML format - I don't know anything about it, but it >exists. In the future there will be XDocs >(http://www.microsoft.com/office/xdocs/default.asp). > >- using an XML framework like Cocoon (http://xml.apache.org/cocoon/), >serialize the output to RTF and open this with Word. So you don't need any >additional Java coding, only XSLT. ___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_& &_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XML document to WORD??, Didier PH Martin | Thread | RE: [xsl] XML document to WORD??, Chandra - |
RE: [xsl] Problem with XSL and Name, Giovani Librelotto | Date | Re: [xsl] Problem with XSL and Name, David Carlisle |
Month |