Experiences on converting XML to Word?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Experiences on converting XML to Word?

Alberto Simões
Hi

Any of you had done any experiment on converting XML to Word, using some kind of XSLT?

If so, how did that go?

Thanks
Alberto

--
Alberto Simões

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Hank Ratzesberger-3
I have not tried this but ...

The Open XML format is public and there is an sdk.

And OpenOffice / LibreOffice is open source and it will read/write Office formats. 

but sorry I can't offer personal experience trying it, but it seems there must be some example between the two projects.

--Hank

On Sunday, May 29, 2016, Alberto Simões <[hidden email]> wrote:
Hi

Any of you had done any experiment on converting XML to Word, using some kind of XSLT?

If so, how did that go?

Thanks
Alberto

--
Alberto Simões


--
Hank Ratzesberger
XMLWerks.com


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Alister Pillow-3
In reply to this post by Alberto Simões
Hi Alberto,
I have a process for using Word and OpenOffice documents as templates - allowing you to replace "fields" with generated values (including rows in tables). In the current version, a "field" is indicated by a Hyperlink. The process uses a combination of XQuery and XSLT.

Would that be of any use to you?

> On 30 May 2016, at 3:05 am, Alberto Simões <[hidden email]> wrote:
>
> Hi
>
> Any of you had done any experiment on converting XML to Word, using some kind of XSLT?
>
> If so, how did that go?
>
> Thanks
> Alberto
>
> --
> Alberto Simões
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Michael Westbay-2
Simões-san,

I've output in ODF (spreadsheets and document formats) and Apple's Pages and Numbers formats.

All you need to do is create a document with the original program, unzip the file to see its components, break down segments and create functions to output similar structures with variables (for Apple's formats, it requires multiple updates for book keeping), and zip everything up again at the end.

The biggest pitfall I've found is that you need to disable pretty print when serializing the output as the extra spaces (even normalized to one) may cause problems in the final document, having spaces where they don't belong. Opening up the document with the extra spaces also will often cause LibraOffice or Numbers to "repair" the document when opening.

Hope this helps.



2016-05-30 6:22 GMT+09:00 Alister Pillow <[hidden email]>:
Hi Alberto,
I have a process for using Word and OpenOffice documents as templates - allowing you to replace "fields" with generated values (including rows in tables). In the current version, a "field" is indicated by a Hyperlink. The process uses a combination of XQuery and XSLT.

Would that be of any use to you?

> On 30 May 2016, at 3:05 am, Alberto Simões <[hidden email]> wrote:
>
> Hi
>
> Any of you had done any experiment on converting XML to Word, using some kind of XSLT?
>
> If so, how did that go?
>
> Thanks
> Alberto
>
> --
> Alberto Simões
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



--
Michael Westbay
Writer/System Administrator
http://www.japanesebaseball.com/

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Patrick Bernaud-3
Hello,

> [...]
> The biggest pitfall I've found is that you need to disable pretty print
> when serializing the output as the extra spaces (even normalized to one)
> [...]

How do you disable this pretty printing ?

Regards,

--
Patrick Bernaud

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Peter Stadler
In reply to this post by Alberto Simões
Hi Alberto,

if your XML is TEI-based then there are already Stylesheets for conversion to docx at https://github.com/TEIC/Stylesheets/tree/dev/docx

Best
Peter


> Am 29.05.2016 um 19:35 schrieb Alberto Simões <[hidden email]>:
>
> Hi
>
> Any of you had done any experiment on converting XML to Word, using some kind of XSLT?
>
> If so, how did that go?
>
> Thanks
> Alberto
>
> --
> Alberto Simões
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. +49 5231 975-676
Fax: +49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Alberto Simões
Hello.

Thank you all.
Yes, my documents are TEI based, so I'll try the stylesheets.
To have fields to be replaced is not an option. I need to have control on formatting (bold/italic) and newlines, at least.

I will try my luck and let you know what I have obtained.

Best,
Alberto



On Mon, May 30, 2016 at 8:49 AM, Peter Stadler <[hidden email]> wrote:
Hi Alberto,

if your XML is TEI-based then there are already Stylesheets for conversion to docx at https://github.com/TEIC/Stylesheets/tree/dev/docx

Best
Peter


> Am 29.05.2016 um 19:35 schrieb Alberto Simões <[hidden email]>:
>
> Hi
>
> Any of you had done any experiment on converting XML to Word, using some kind of XSLT?
>
> If so, how did that go?
>
> Thanks
> Alberto
>
> --
> Alberto Simões
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open

--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. <a href="tel:%2B49%205231%20975-676" value="+495231975676">+49 5231 975-676
Fax: <a href="tel:%2B49%205231%20975-668" value="+495231975668">+49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de




--
Alberto Simões

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

ron.vandenbranden
In reply to this post by Alberto Simões
It will probably depend on the XML vocabulary you're starting from, but
if you're working with TEI, the OxGarage service
(http://www.tei-c.org/oxgarage/) provides TEI --> docx/odt conversion
profiles, based on the TEI XSLT Stylesheets (see
https://github.com/TEIC/Stylesheets/tree/dev/docx/to,
https://github.com/TEIC/Stylesheets/tree/dev/odt).

Best,

Ron

On 30/05/2016 3:20, [hidden email] wrote:

> Hi
>
> Any of you had done any experiment on converting XML to Word, using some
> kind of XSLT?
>
> If so, how did that go?
>
> Thanks
> Alberto
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Joe Wicentowski
Not directly applicable, but check out the TEI PM Toolbox.  It doesn't support docx yet but the other outputs - PDF, ePub, HTML - demonstrate the power of TEI PM, and I bet docx could be added (I recall seeing a branch with ODT support).


More basic than the other options is this tutorial in generating Word from arbitrary XML.




On Mon, May 30, 2016 at 2:22 AM -0700, "ron.vandenbranden" <[hidden email]> wrote:

It will probably depend on the XML vocabulary you're starting from, but 
if you're working with TEI, the OxGarage service 
(http://www.tei-c.org/oxgarage/) provides TEI --> docx/odt conversion 
profiles, based on the TEI XSLT Stylesheets (see 
https://github.com/TEIC/Stylesheets/tree/dev/docx/to, 
https://github.com/TEIC/Stylesheets/tree/dev/odt).

Best,

Ron

On 30/05/2016 3:20, [hidden email] wrote:
> Hi
>
> Any of you had done any experiment on converting XML to Word, using some
> kind of XSLT?
>
> If so, how did that go?
>
> Thanks
> Alberto
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

wshager
In reply to this post by Patrick Bernaud-3
Never tried it, but what about existing solutions in other languages? Just google for [language X]+create+word+xml

I found this, and it seems madness to use JS DOM, but hey, it's Microsoft:


2016-05-30 9:00 GMT+02:00 Patrick Bernaud <[hidden email]>:
Hello,

> [...]
> The biggest pitfall I've found is that you need to disable pretty print
> when serializing the output as the extra spaces (even normalized to one)
> [...]

How do you disable this pretty printing ?

Regards,

--
Patrick Bernaud

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



--

W.S. Hager
Lagua Web Solutions
http://lagua.nl


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

wshager
Well this library seems a bit stale...

2016-06-02 13:23 GMT+02:00 W.S. Hager <[hidden email]>:
Never tried it, but what about existing solutions in other languages? Just google for [language X]+create+word+xml

I found this, and it seems madness to use JS DOM, but hey, it's Microsoft:


2016-05-30 9:00 GMT+02:00 Patrick Bernaud <[hidden email]>:
Hello,

> [...]
> The biggest pitfall I've found is that you need to disable pretty print
> when serializing the output as the extra spaces (even normalized to one)
> [...]

How do you disable this pretty printing ?

Regards,

--
Patrick Bernaud

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



--

W.S. Hager
Lagua Web Solutions
http://lagua.nl




--

W.S. Hager
Lagua Web Solutions
http://lagua.nl


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Experiences on converting XML to Word?

Alister Pillow-3
In reply to this post by Patrick Bernaud-3
In XQuery 3.0 you can use the serialization parameters and set indent=no


declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "xml";
declare option output:indent "no";
declare option output:omit-xml-declaration "yes";

See also P Walmsley's XQuery 2ed P224

In XSLT, a similar approach is used:
<xsl:output method='xml' omit-xml-declaration='yes' indent='no' />



On 30 May 2016, at 4:30 pm, Patrick Bernaud <[hidden email]> wrote:

Hello,

[...]
The biggest pitfall I've found is that you need to disable pretty print
when serializing the output as the extra spaces (even normalized to one)
[...]

How do you disable this pretty printing ?

Regards,

--
Patrick Bernaud

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open