[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: From XML to Windows clipboard as styled data to be

Subject: Re: From XML to Windows clipboard as styled data to be pasted into a MS-Word document
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jan 2019 14:27:08 -0000
Re:  From XML to Windows clipboard as styled data to be
Forgot to paste the link:

https://stackoverflow.com/questions/855165/office-clipboard-format

Cheers,

E.

--
Eliot Kimber
http://contrext.com


o;?On 1/24/19, 8:19 AM, "Eliot Kimber ekimber@xxxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

    What is the authoring environment?

    Oxygen XML has an available add-on that is a clipboard inspector--if you
cut from Word and then inspect the result that might provide a clue.

    You can certainly paste HTML into Word and get a decent result but it
might not produce the complete result you want (e.g., setting appropriate
styles).

    I did some very quick research and this StackOverflow message suggests
that Office's clipboard format is actually zipped up Office XML, in which case
it wouldn't be too hard to generate with XSLT and Java.

    My Wordinator project (wordinator.org) provides a Java-and-XSLT-based
framework for generating DOCX from XML using the Apache POI library
underneath. POI generates the actual DOCX file, which is a zip of Office
OpenXML, so it might not be too hard to adapt to generating what you'd want on
the clipboard (or it might be easier to just generate the Office Open XML
directly if your use case is pretty focused).

    Cheers,

    E.
    --
    Eliot Kimber
    http://contrext.com


    o;?On 1/24/19, 12:58 AM, "Larry Hayashi lhtrees@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

        I am wondering if anyone has any experience in transforming an XML
document into a format that could be pasted from the Windows clipboard into a
Word document. The Word document will have a particular doc template with
named styles and the transformed data will need to utilize those styles (set
in a preferences interface in a custom application). I want to use XSL on the
XML source and I suspect that I need to generate Rich Text Format, but maybe
there is a less verbose format than RTF, perhaps some XML doc format for
pasting styled/formatted text into Word??
        The scenario would be something like this:

        Linguistic application has interlinear text with sentences. User
selects and copies one interlinear text sentence. On copy, the application
uses an internal XML version of the selected text which would be transformed
into RTF or equivalent. User pastes beautifully formatted example into their
Word document with correct auto numbering styles, etc.

        Thanks for any advice.

        Larry


        XSL-List info and archive
<http://www.mulberrytech.com/xsl/xsl-list>EasyUnsubscribe
<http://lists.mulberrytech.com/unsub/xsl-list/1278982>
        (by email <>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.