[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Word to DocBook conversion and applying XSLT
I would try invoking the stylesheets from the command line. This will give you a better understanding of what's going on. If you have the Saxon XSLT processor and the DocBook XSLT stylesheets, you could create a little .bat file with the following commands. You'll have to alter the paths to suit your own computer. Here's a good explanation: http://www.sagehill.net/docbookxsl/InstallingAProcessor.html. *** put this in convert.bat *** java -jar C:\publishing-tools\saxon6-5-5\saxon.jar -o my-docbook.norm hello-world.xml C:\publishing-tools\docbook-xsl-ns-1.76.1\roundtrip\wordml2normalise.xsl java -jar C:\publishing-tools\saxon6-5-5\saxon.jar -o my-docbook.sects my-docbook.norm C:\publishing-tools\docbook-xsl-ns-1.76.1\roundtrip\normalise2sections.xsl java -jar C:\publishing-tools\saxon6-5-5\saxon.jar -o my-docbook.blks my-docbook.sects C:\publishing-tools\docbook-xsl-ns-1.76.1\roundtrip\sections2blocks.xsl java -jar C:\publishing-tools\saxon6-5-5\saxon.jar -o my-docbook.xml my-docbook.blks C:\publishing-tools\docbook-xsl-ns-1.76.1\roundtrip\blocks2dbk.xsl pause ********************************* If you have a hello-world.xml file (Word file saved as XML) in the directory with this .bat file, you should end up with the DocBook XML that the roundtrip stylesheets produces. I think the best way to learn about XSLT is to experiment with it. It's complex though. I spent a long time making adjustments to the DocBook XSLT and then I decided to write some of my own. I use this reference quite a bit: http://www.zvon.org/comp/r/ref-XSLT_2.html#. I see that the roundtrip output does not specify a version. It might turn out to be valid 5.0 though. I suspect that the roundtrip output stylesheet could be customized without too much trouble and explain.com.au seems to be offering support for it. I decided that I needed very fine control over the DocBook XML that I produce from MS Word files. So I wrote a set of XSLT 2.0 stylesheets that take the Microsoft XML file and carefully convert it to DocBook 5.0. The stylesheets are complicated but they work very reliably. We convert our source Word files into DocBook nightly so that writers can use Word while the publishing system uses DocBook. Let me know if you'd like more information about stylesheets that convert from Word to DocBook. It's not a trivial task to make one though, a lot of development goes into it. Good luck. Peter On Mon, Jan 30, 2012 at 2:23 PM, Donna Saporito <dsnyder7427@gmail.com> wrote: > I read about DocBook > roundtripping and XSL stylesheets to use for conversion from WordML to > DocBook at the following Explain website: > > http://www.explain.com.au/oss/docbook/ > > That website lists stylesheets that transform WordML to DocBook. I am a > newbie, so I am unsure of where I would apply these stylesheets. Do I use > OpenOffice’s XML Filter Settings dialog box to edit the DocBook file? I see > a > Transformation tab in OpenOffice’s XML Filter’s dialog that has options for > DocType, DTD, XSLT for export, XSLT for import and Template for import. (I > should also mention that I need to create DocBook 5 output, not DocBook 4, > which is the default DocType in OpenOffice.) > > What is the best resource for a newbie to learn about writing or editing > XSLT stylesheets? Would the book, “DocBook XSL: The Complete Guide” by Bob > Stayton explain this, or is that book more useful for advanced DocBook > users? (I have a little bit of DocBook experience by editing files in Oxygen > XML Editor. I have never written an XSLT.)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]