[docbook-apps] Re: [docbook] future of DocBook XML Schema (XSD)?

2016-10-18 Thread Steve Ball
Hi Bob,

I manage a large schema that uses DocBook 5. The normative schema is RelaxNG. 
This schema is automatically translated to XSD using Trang, but the resulting 
XSD files have to be post-processed in order to fix them before they are 
useable by consumers.

DocBook 6 in pure RelaxNG+Schematron would be fine with me.

Cheers,
Steve Ball

> On 19 Oct 2016, at 5:51 AM, Bob Stayton <b...@sagehill.net> wrote:
> 
> The DocBook Technical Committee is considering dropping the XML Schema 
> version of DocBook in a future version 6.  We would like to hear from any 
> members of the DocBook community who would be affected by this change.
> 
> Let me be clear that this change is not on the horizon, but part of our long 
> term planning.  The DocBook TC takes great care in maintaining backwards 
> compatibility on point releases because we know how much the DocBook 
> community relies on stable sources.  When DocBook rolls to a new major 
> version number, we treat that as an opportunity to introduce changes that are 
> not backwards compatible.  The change from 4 to 5 was such.  If we foresee 
> such changes coming, we give the DocBook community very advanced notice to 
> prepare for them.
> 
> We will continue to maintain the DocBook standard in RelaxNG with Schematron 
> rules, and will continue to generate a compatible DTD.
> 
> However, the process of maintaining the XSD version of DocBook is proving 
> burdensome because it cannot be completely generated by a conversion program, 
> and requires manual tweaking.  Because we are not sure if anyone is actually 
> using the XSD version, we are wondering if this is worth the effort.  If you 
> are using it, or have tools that depend on XSD, please let us know.
> 
> You can reply directly to me if you don't want to discuss it on the mailing 
> list.
> 
> -- 
> Bob Stayton
> Sagehill Enterprises
> b...@sagehill.net
> 
> -
> To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org
> For additional commands, e-mail: docbook-h...@lists.oasis-open.org
> 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Docbook to docx

2016-04-05 Thread Steve Ball
Hi Frederik,

The DocBook stylesheet package includes the roundtripping system that does a 
two-way conversion from DocBook to Word (and Pages and OpenOffice) and back 
again. You use a template document to specify the styles when going from 
DocBook to Word. The system has a template document, but you can supply your 
own.

If you’re just looking for a one-way conversion, then that would be a good 
place to start.

Cheers,
Steve Ball

> On 6 Apr 2016, at 5:55 AM, Fredrik Unger <f...@tree.se> wrote:
> 
> Dear all,
> 
> I have been trying for a while to generate a Word 2010 file from Docbook.
> I have a Word Template with styles for the most common things
> like Heading 1, Title etc.
> 
> I had some problems with Word 2007 with name changes in styles.
> The style Title became Titel in the German version of Word.
> 
> I would like to simply put the content of a Docbook article into
> a word document using the external template for style.
> Actually
> pandoc --from=docbook --to=docx --reference-docx=Template.docx 
> --output=Article.docx Article.xml
> would do but this does not work very well.
> 
> What ways or tools are available ?
> Do I have to use other formats as intermediate ?
> or is it not possible...
> 
> Basically the article has sections (nested), title, para, imageobjects, and 
> lists.. tables would be a plus.
> Would be ok with a subset but a plus if one can map a tag to a style.
> 
> Any ideas and pointers ?
> I have looked at pandoc and python-docx but the solutions become
> complex and not very automatic.
> There used to be some effort for stylesheets but I guess that would not work 
> with the predefined styles of the Template ?
> 
> Fredrik Unger
> 
> 
> -
> To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
> 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Google Summer of Code 2015 -- Last call for participants

2015-02-10 Thread Steve Ball
Hi All,

My current project is to implement the DocBook roundtripping subsystem in a Web 
browser, using Saxon-CE. However, I feel it needs to be more advanced before 
getting a student to work on it. Happy to be convinced otherwise…

Cheers,
Steve Ball

 On 10 Feb 2015, at 8:32 am, Richard Hamilton hamil...@xmlpress.net wrote:
 
 So far, I've only received one message expressing interest in having the 
 DocBook project apply to participate in the Google Summer of Code this year.
 
 The applications open today (Feb 9) and close in 10 days (Feb 20), so unless 
 I hear from a few more people, I don't think it will make sense to apply this 
 time around.
 
 I've enclosed my original message for your reference. If you're interested, 
 now's your last chance to raise your hand.
 
 Best regards,
 Dick Hamilton
 ---
 XML Press
 XML for Technical Communicators
 http://xmlpress.net
 hamil...@xmlpress.net
 
 ===
 As many of you know, the DocBook project (as distinct from the DocBook TC, 
 though many people participate in both activities) applied to the program 
 several times and was accepted twice. The program has brought us some useful 
 software and, even more important, new contributors to the DocBook community.
 
 To participate this year, we need two things:
 
 1) Mentors: we need at least 5 or 6 people who are willing to participate as 
 mentors.
 2) Ideas: we need ideas for projects that students can work on.
 
 I'm willing to be the organization administrator again this year, but I'm 
 glad to hand over responsibility if someone else wants the job this year.
 
 For the full schedule and more information about the program, go to:
 https://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2015/help_page
 
 February 20 is the deadline for applications. To participate, we need to have 
 mentors lined up by February 9, which is the opening date for filing 
 applications.
 
 If you're interested in participating, you can reply to this message on the 
 list or send me email directly at the address below.
 
 Best regards,
 Dick Hamilton
 
 
 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Status of wordml stylesheet in Google Summer Of Code

2012-07-10 Thread Steve Ball
Hi Benjamin,

I am mentoring the student who is working on this project. She is making good 
progress.

At this stage she is developing support for Open Office documents as well as 
converting the stylesheets to XSLT 2.0.

I will have her commit code to the repository when we reach an appropriate 
milestone.

Cheers,
Steve Ball

On 11/07/2012, at 6:31 AM, Benjamin de Dardel wrote:

 Hi all,
 
 I currently test docbook to wordml processing using ant4docbook 
 (http://ant4docbook.sourceforge.net).
 I remember that some people are working on this subject in the Google Summer 
 Of Code.
 Am I right ?
 
 Is it possible to know what is the status of the project, and if it's 
 possible to test some new dbk2wordml.xsl stylesheets ?
 
 Regards,
 
 Benjamin
 
 
 
 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
 
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Regarding the project DocBook to Word XML roundtripping XSLs

2012-04-04 Thread Steve Ball
Hi Buddhiprabha,

That all sounds great.

At this stage I would say that you need to also take a look at the XML schemas 
for WordML and Open Office. Files saved by Word or OO are actually zip files, 
so you can unzip them and take a look at the contents. You need to understand 
that structure so that you can replicate it in order to create new documents.

Cheers,
Steve Ball

On 05/04/2012, at 3:35 AM, Buddhiprabha Erabadda wrote:

 Hi Steve,
 
 Nice to see  you in the mailing list.  
 
 On Wed, Apr 4, 2012 at 3:20 AM, Steve Ball steve.b...@explain.com.au wrote:
 Hi,
 
 I'm assuming that you have downloaded the DocBook XSL stylesheets? There is a 
 specification document contained in it that details what is and isn't 
 supported by the roundtripping system.
  
 Yes I downloaded the latest snapshot version, docbook-xsl-ns-snapshot.zip 
 from [1] link and went through lots of folders and Docbook style sheets 
 inside it. As you said, I converted the specification.xml to HTML format and 
 went trough all the content of it. That gave me a good understanding about 
 what are the goals and non-goals of the roundtripping system. 
 
 In what way would you like to participate in the project? Supporting Open 
 Office? Extending the system to later versions of Word? Use of XSLT 2.0? Let 
 me know.
 
 I have great interest in Open Office. Therefore I would like to participate 
 in supporting Open Office way and I am also interested in Extending the 
 system to later versions of Word. But I can work in any way you suggest and 
 I can get familiar with it in few days. 
 
 Since I am very new to Word XML  roundtripping XSLs, I will really appreciate 
 any advice and suggestion regarding this project. And these days I am working 
 on creating a very strong proposal for this project. Therefore, your guidance 
 and advice regarding the proposal will be very helpful to me. I will share 
 with you a draft proposal I have made so far as soon as possible.
 
 Thanks in advance.
 
 Cheers,
 Steve Ball
 Explain
 
 On 02/04/2012, at 2:03 PM, Buddhiprabha Erabadda wrote:
 
 Hi Steve,
 
 
 
 I am Buddhiprabha Erabadda, a third year undergraduate from Computer Science 
 and Engineering, University of Moratuwa.  I went through the ideas for 
 DocBook and got interested in the project DocBook to Word XML roundtripping 
 XSLs. I have been studying about DocBook from a few days and now I know the 
 process at the client side and I have gathered basic knowledge about XPath 
 and XSLT . I have also started studying about DocBook Roundtripping. [1], [2]
 
 
 
 Are there any other links to resources which might be useful to further 
 study about the project DocBook to Word XML roundtripping XSLs? I am new to 
 DocBook and I would appreciate advice regarding the project. Thank you in 
 advance.
 
 
 
 [1] http://ausweb.scu.edu.au/aw05/papers/edited/ball/poster.html
 
 [2] http://www.explain.com.au/oss/docbook/index.html 
 
 -- 
 Buddhiprabha Erabadda
 Department of Computer Science and Engineering
 University of Moratuwa
 
 
 
 [1]  http://snapshots.docbook.org/ 
 
 
 -- 
 Buddhiprabha Erabadda
 Department of Computer Science and Engineering
 University of Moratuwa
 



Re: [docbook-apps] Regarding the project DocBook to Word XML roundtripping XSLs

2012-04-03 Thread Steve Ball
Hi,

I'm assuming that you have downloaded the DocBook XSL stylesheets? There is a 
specification document contained in it that details what is and isn't supported 
by the roundtripping system.

In what way would you like to participate in the project? Supporting Open 
Office? Extending the system to later versions of Word? Use of XSLT 2.0? Let me 
know.

Cheers,
Steve Ball
Explain

On 02/04/2012, at 2:03 PM, Buddhiprabha Erabadda wrote:

 Hi Steve,
 
 
 
 I am Buddhiprabha Erabadda, a third year undergraduate from Computer Science 
 and Engineering, University of Moratuwa.  I went through the ideas for 
 DocBook and got interested in the project DocBook to Word XML roundtripping 
 XSLs. I have been studying about DocBook from a few days and now I know the 
 process at the client side and I have gathered basic knowledge about XPath 
 and XSLT . I have also started studying about DocBook Roundtripping. [1], [2]
 
 
 
 Are there any other links to resources which might be useful to further study 
 about the project DocBook to Word XML roundtripping XSLs? I am new to DocBook 
 and I would appreciate advice regarding the project. Thank you in advance.
 
 
 
 [1] http://ausweb.scu.edu.au/aw05/papers/edited/ball/poster.html
 
 [2] http://www.explain.com.au/oss/docbook/index.html 
 
 -- 
 Buddhiprabha Erabadda
 Department of Computer Science and Engineering
 University of Moratuwa
 



Re: [docbook-apps] Problem with tables and roundtrip to WordML

2011-03-21 Thread Steve Ball
Hi David,

Patches certainly are welcome. I'm doing some work on the roundtrip system 
right now, so I can get those modifications into the official release fairly 
soon.

Cheers,
Steve Ball


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Problem with tables and roundtrip to WordML

2011-03-21 Thread Steve Ball
Hi Mathieu,

Yes, I have those bug reports and will be developing fixes ASAP.

Cheers,
Steve Ball

On 21/03/2011, at 8:42 PM, Mathieu Malaterre wrote:

 Hi Steve,
 
 On Mon, Mar 21, 2011 at 10:19 AM, Steve Ball steve.b...@explain.com.au 
 wrote:
 Patches certainly are welcome. I'm doing some work on the roundtrip system 
 right now, so I can get those modifications into the official release fairly 
 soon.
 
 Are you working on these ones ?
 
 http://sourceforge.net/tracker/?func=detailaid=3197293group_id=21935atid=373747
 
 and
 
 http://sourceforge.net/tracker/?func=detailaid=3231485group_id=21935atid=373747
 
 They have no patch, but let me know if you need more info.
 
 Thanks
 -- 
 Mathieu
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Problem with tables and roundtrip to WordML

2011-02-28 Thread Steve Ball
Hi David,

Although I have not yet checked, I believe the problem is that the content of 
the cells is not in a para. That is, your DocBook should look like:

theadrowentryparaa1/para/entryentryparaa2/para/entry/row/thead

tbodyrowentryparab1/para/entryentryparab2/para/entry/row/tbody

As for being able to produce professional looking tables, there is some work to 
do in setting up table column widths and borders properly. However, YMMV.

Cheers,
Steve Ball

On 01/03/2011, at 7:16 AM, David Hinds wrote:

 I'm trying to convert a very simple docbook file to WordML using the 
 roundtrip XSL stylesheets.  I'm having trouble with tables: all cell contents 
 are missing after the conversion.
 
 Here is my input document:
 
 ?xml version=1.0 encoding=UTF-8?!DOCTYPE article PUBLIC -//OASIS//DTD 
 DocBook XML V4.5//EN http://www.oasis-open.org/doc\
 book/xml/4.5/docbookx.dtd
 article lang=en
 table frame='all'titleSample Table/title
   tgroup cols=2
 colspec colname='c1'/colspec colname='c2'/
 theadrowentrya1/entryentrya2/entry/row/thead
 tbodyrowentryb1/entryentryb2/entry/row/tbody
   /tgroup
 /table
 /article
 
 This renders ok in HTML with:
 
 xsltproc --path .../docbook-xsl/html -o test.html \
   docbook.xsl test.xml
 
 but with this: 
 
 xsltproc --path .../docbook-xsl/roundtrip -o test.wml \
   --stringparam wordml.template template.xml \
   dbk2wordml.xsl test2.xml
 
 the cells in the resulting table are all empty, i.e. the resulting WordML 
 looks like:
 
 w:tc
   w:tcPr
 w:tcW w:w= w:type=dxa/
   /w:tcPr
   w:p/
 /w:tc
 
 I get the same result with either xsltproc or saxon.  I am using 
 docbook-xsl-1.76.1.
 
 My long term goal is to be able to programmatically generate reports as 
 templated, styled Word documents from asciidoc source files, with docbook as 
 an intermediate format, in a linux environment.  I need relatively few 
 features: headers, body text, simple bullet lists, PNG images, and reasonably 
 professional-looking tables (where that means I need control over column 
 alignment and borders).  
 
 -- Dave
 
 



Re: [docbook-apps] Round trip style sheets

2011-01-26 Thread Steve Ball
Hi Scott,

Firstly, it is feasible to transform MS Word 2007 documents directly using 
XSLT. I haven't yet looked at MS Word 2010 but I imagine that would be OK too. 
The trick is being able to unpack the .docx file, which is just a Zip file, and 
locate the document content, which is an XML document.

Although the roundtrip stylesheets may not do MS Word Headings 
out-of-the-box, they do have an extension mechanism that would allow you to 
easily map those styles to something that is supported, like sect1-title or 
chapter-title.

The current stylesheets do not support creating unnumbered sections, mainly 
because that is difficult to model in the Word document. There may be a 
parameter to use sections instead of sect1/sect2/etc. In any case, it would be 
a simple matter to post-process the DocBook document to convert numbered 
sections to unnumbered.

Regarding OOXML, I imagine that's not too far from WordML so it wouldn't be 
difficult. However, right now my big project is implementing XPath 2.0/XSLT 2.0 
for libxml2/libxslt so I don't have any spare time to work on the roundtrip 
stylesheets :-(

Cheers,
Steve Ball

On 25/01/2011, at 7:07 PM, Speights, Scott wrote:

 
 Hello, 
 
 I am currentl working with the round-trip style sheets by converting
 Word 2010 documents into WordML 2003 documents and transforming with the
 round trip style sheets. My testing shows that there is pretty good
 support for paragraphs, tables, figures and lists but I noticed that MS
 Word Headings don't get converted to sections and chapters. (important
 to note: I have a German MS Word)
 
 Do the  current style sheets support creating sections or is this
 something that I have to do myself by writing my own templates? 
 
 Also, Is there any work planned for supporting transformations with
 OOXML? Sorry in advance if I missed any posts about this.
 
 
 Thanks, 
  Scott
 
 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
 
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Word 2007+ to DocBook

2010-05-06 Thread Steve Ball
Hi,

The stylesheet structure was rationalised for the 1.75.2 release so that Word, 
Pages and OpenOffice formats could all be supported. There is a stylesheet for 
each of those formats that normalises the document to a common format, and then 
the other stylesheets take the document through to structured DocBook.

Office 2007 basically uses WordML under-the-hood, and a .docx file is really 
just a Zip file containing the XML documents. The one with the document content 
is word/document.xml. It wouldn't be too much work to upgrade the roundtrip 
stylesheets to handle this document; basically it is just the XML Namespace 
URIs that have changed.

I'm working on libxslt at the moment (implementing XSLT 2.0), so haven't really 
got time to look at the roundtripping stuff. However, email me directly if you 
have any further questions.

Cheers,
Steve Ball

On 07/05/2010, at 6:29 AM, gpev...@aol.com wrote:

 Howdy DocBook Community: 
 
 I am new to DocBook, and also new to this forum. I have been going through 
 the archives, and found some very interesting discussions. Primarily I am 
 interested in moving/converting some documents from Word which they were 
 authored in to DocBook.
 I have been looking at several tools to help in this process, and found some 
 very good information here in the archives.
 
 One method which seems very promising is the docbook-xsl/roundtrip 
 The discussion for this was from a few years ago. So I am thinking that the 
 some of the style sheets may have changed with the docbook-xsl-1.75.2 distro 
 that I have. The suggested conversions were:
  
  wordml-normalise.xsl, wordml-sections.xsl, wordml-blocks.xsl, 
 wordml-final.xsl
  
 none of which I found in the 1.75.2
 Instead I have xsl such as:
 normalise-common.xsl, normalise2sections.xsl, sections2blocks.xsl, and 
 blocks2dbk.xsl
  
 It seems to me that this is just the logical evolution of the same xsl style 
 sheets referenced in the archives from years ago. Does anyone know if this is 
 indeed the case. 
  
 Further there has been little to no discussion or even apparently any new 
 tools regarding converting Microsoft Word to DocBook at least for quite a 
 while.
 Corresponding roughly to the time when Microsoft Word started implementing 
 XML or w:xml as I like to call it. It is still very ugly xml, and even though 
 the new docx format is apparently valid XML it is still cumbersome to work 
 with, at least in my opinion. 
 Are there any newer tools designed primarily to work with the latest 
 incarnation of w:xml or any techniques that could help the effort to get 
 these docs into DocBook?
 I greatly appreciate any response!
  
 Thanks,
 /GregP



Re: [docbook-apps] roundtrip - normalise-common.xsl - customization and section numbering

2010-04-11 Thread Steve Ball
Hi Mathieu,

Some time ago I decided that trying to support limitless section elements was 
very difficult with the roundtripping system. There is too much of a mismatch 
between Word's fixed set of styles and DocBook's unlimited sections. Starting 
and stopping sections at the same level is just about impossible (though I'm 
willing to be proven wrong ;-).

This should answer your question as to why Heading6, Heading7, etc, are not 
supported: there is no DocBook element to map them to.

As far as the bad-title errors are concerned, the document is trying to skip 
section levels; going from sect2 to sect4 without an intervening sect3. Doing 
so would violate the DocBook schema.

Cheers,
Steve Ball

On 11/04/2010, at 1:07 AM, Mathieu Malaterre wrote:

 Hi there,
 
  I am trying to customize normalise-common.xsl to remap the custom
 style to proper 'known names' for wordml rountrip. I am hitting a
 small issue here. Here is my custom normalise-common.xsl:
 
  xsl:template name='rnd:map-paragraph-style'
xsl:param name='style'/
xsl:choose
  xsl:when test='$style = Heading1'sect1-title/xsl:when
  xsl:when test='$style = Heading2'sect2-title/xsl:when
  xsl:when test='$style = Heading3'sect3-title/xsl:when
  xsl:when test='$style = Heading4'sect4-title/xsl:when
  xsl:when test='$style = Heading5'sect5-title/xsl:when
 ...
 
 However I do not understand:
 1. how I can handle Heading6, Heading7 and Heading8 (they are present
 in my original Word document).
 2. This might be related to (1). How do I handle mismatch in original
 document such as:
 
 ERROR bad-title: title style sect4-title mismatches parent sect2
 ERROR bad-title: title style sect5-title mismatches parent sect3
 
 Basically would it be possible to handle the generic 'section' docbook 
 element ?
 
 Thanks !
 -- 
 Mathieu
 
 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
 
 


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Word 2007 Office Open XML; IndentXML

2009-03-19 Thread Steve Ball

Hi Betty,

The roundtripping module in the DocBook XSL distribution should be  
able to handle MS Office 2007 WordML, the major difference between MS  
Office 2003 and 2007 being how you actually get at the XML. However, I  
haven't done any testing on 2007 WordML yet, so at this stage it may  
not work out-of-the-box.


Regarding pretty-printing XML, it is almost trivial to write an XSL  
stylesheet that strips all whitespace from a document and then indents  
the output. Attached is my version. Be careful though - you may lose  
document data (significant spaces) using this stylesheet.


Cheers,
Steve Ball



indent.xsl
Description: Binary data




On 20/03/2009, at 12:45 AM, Betty Ing wrote:


Hello,

How much effort is required to leverage MS Word 2007 Office Open XML
for generating DocBook XML?

Has anyone used the IndentXML application for prettifying
human-unreadable XML code?

Thanks for your input.

Betty

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis- 
open.org






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

Re: [docbook-apps] Landscape tables across multiple pages

2008-11-06 Thread Steve Ball

Hi Paul,

I recently had the very same requirement for a client. Rotating the  
page 90 degrees is certainly not a desirable solution.


The problem was solved by pre-processing the DocBook document to  
flatten the section structure, and then group together the portrait  
and landscape parts (XSLT2 is excellent for this purpose!). Those  
different parts are then rendered as sequential fo:page-sequences.


Let me know if you would like further information on this approach.

Cheers,
Steve Ball

On 06/11/2008, at 11:10 PM, Paul Suckling wrote:


Hi Bob.

I am not an XSL expert, let alone a DocBook XSL expert, and the
customisation required to get PSMI to work for DocBook articles with
nested sections looks quite involved, so I am going to investigate the
Antenna House processor. Otherwise I'll just have to fall back to
splitting such tables manually.

Thank you for your reply.

Paul

2008/11/5 Bob Stayton [EMAIL PROTECTED]:

Hi,
The easiest way is to use the Antenna House processor and put the  
table
inside an fo:block-container with its reference-orientation=90.   
Antenna

House has implemented an extension to the standard to flow such
block-containers onto multiple pages.  In fact, the current DocBook
stylesheets do that already, in the template named  
'table.container' in

fo/table.xsl.  So just setting orient=land on a table should do it.

If AH is not feasible, then PSMI is the only way I know to do it.   
It is not
implemented in the DocBook stylesheets, so you'll have to implement  
it
yourself.  Because PSMI breaks a flow into multiple page sequences,  
it does
require closing all open fo elements in the flow before the table.   
That

would require additional customization because of the use of fo:block
nesting around sections.  You would need to customize the template  
with
match=section in fo/sections.xsl, removing the section block  
wrapper. When

you do that, however, you lose the ability to place attributes on the
container block, those attributes coming from  
section.level1.properties et

al.

Bob Stayton
Sagehill Enterprises
[EMAIL PROTECTED]


- Original Message - From: Paul Suckling [EMAIL PROTECTED] 


To: docbook-apps@lists.oasis-open.org
Sent: Wednesday, November 05, 2008 6:42 AM
Subject: [docbook-apps] Landscape tables across multiple pages



I have got some long wide tables in my DocBook article. I would like
to either place them on a series of landscape pages, or keep them  
on a
portrait page but have them rotated. I found a solution which does  
the

latter but not adequately: The tables don't split across multiple
pages.

I have done a search of the archives and came across this thread,
http://lists.oasis-open.org/archives/docbook-apps/200301/msg00144.html 
,

which suggests that the best way to do it is to use PSMI
(http://www.cranesoftwrights.com/resources/psmi/index.htm). However,
this only appears to work for tables that are direct children of
chapters and appendices. My DocBook is an article, and so the tables
are children of sections.

That thread appeared in 2004. Have things moved on from there now?  
Can

anyone advise me what the best way of achieving landscape tables is
with DocBook today?

Thanks,

Paul

--
Nashi Power.
http://nashi.podzone.org/
Registered address: 7 Trescoe Gardens, Harrow, Middx., U.K.

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
open.org

For additional commands, e-mail: [EMAIL PROTECTED]










--
Nashi Power.
http://nashi.podzone.org/
Registered address: 7 Trescoe Gardens, Harrow, Middx., U.K.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] roundtrip - wordml2normalise.xsl/normalise-common.xsl - customizing possible?

2008-07-30 Thread Steve Ball

Hi Vittorio,

Firstly, the roundtrip stylesheets are designed to work with a Word  
document authored using the given template - not just any arbitrary  
Word document.


However, the stylesheets now sport a customisation layer that allows  
you to map custom style names to one of the known style names (as  
defined in the roundtrip specification). What I do is rename normalise- 
common.xsl to rnd-normalise-common.xsl and then write my own normalise- 
common.xsl that imports rnd-normalise-common.xsl. In your custom  
stylesheet override the rnd:map-paragraph-style and/or rnd:map- 
character-style templates. You template might look something like this:


xsl:stylesheet version'1.0' ...
  xsl:import href='rnd-normalise-common.xsl'/

  xsl:template name='rnd:map-paragraph-style'
xsl:param name='style'/

xsl:choose
  xsl:when test='$style = original-style-name'
xsl:textpara/xsl:text
  /xsl:when
  xsl:otherwise
xsl:value-of select='$style'/
  /xsl:otherwise
/xsl:choose
  /xsl:template
/xsl:stylesheet

Basically, this is the XSLT equivalent of sed.

I do have some documentation on this... I'll get around to posting on  
a website RSN ;-)


Cheers,
Steve Ball

On 29/07/2008, at 8:53 PM, Vittorio Muth wrote:


Hi all,

I'm not familiar with WordML nor DocBook but trying to convert 1  
WordML file with ~200 pages to DocBook. (a good start...)


When running the XML pipeline WordML2DocBook I got errors at the end  
(blocks2dbk.xsl) with 35 different paragraph styles.
e.g. 'ERROR unknown-style: unknown paragraph style berschrift1  
encountered'


Yes - the WordML file had a customized German 'MySpecialWord.dot' at  
the beginning...
I found out, that the template 'rnd:map-paragraph-style' is imported  
to wordml2normalise.xsl from 'normalise-common.xsl'.


Now the question:
Does it make sense to customize the file normalise-common.xsl to  
match the German styles which had been used in myWordFile.doc (based  
on mySpecialWord.dot and saved as myWordFile.xml)?


Or should I just replace those 35 styles with sed? ;-)

thanks in advance,
Vittorio



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: [docbook-apps] roundtrip-stylesheets

2008-05-19 Thread Steve Ball

Hi Robert,

I just checked the stylesheets to determine to what extent  
variablelist is currently supported.


There are paragraph styles in the template for variablelist-title and  
variablelist-term. The plan is to include all content immediately  
after the variablelist-term in the corresponding varlistentry/listitem.


blocks2dbk.xsl has no mention of variablelist.

dbk2wp.xsl translates variablelists into a table, which is incorrect  
(the old method).


So the current status is that the template is ready but the feature  
needs to be implemented properly.


Sorry about that... it will be done in the fullness of time ;-) At the  
moment my priority is to get features working and tested that my  
(paying) clients require. After that I'll move on to everything else.


Steve Ball

On 19/05/2008, at 3:54 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote:



Hi Steve,

thank you for your answer.

I've got the latest snapshot of the roundtrip-stylesheets from the  
SVN repository and I use the following pipeline to convert a word- 
XML file to docbook:


xsltproc wordml2normalise.xsl $1 | \
xsltproc normalise2sections.xsl - | \
xsltproc sections2blocks.xsl - | \
xsltproc blocks2dbk.xsl -

Then I've modified the template.xml like this:

Titel   (article-title)
This document is not blank. (Standard;para)
My List entry   (variablelist-title)
term term term term (variablelist-term)
bla bla bla.(Standard;para)

In the brackets are the word-formats/styles written.

But I receive a error-message:

ERROR unknown-style: unknown paragraph style variablelist-term  
encountered

?xml version=1.0?
dbk:article xmlns:dbk=http://docbook.org/ns/docbook; xmlns:rnd=http://docbook
.org/ns/docbook/roundtrip xmlns:xlink=http://www.w3.org/1999/xlink;
 dbk:info
   dbk:titleTitel/dbk:title
 /dbk:info
 dbk:paraThis document is not blank./dbk:para
 !--unknown paragraph style variablelist-term encountered--
 rnd:error
   rnd:codeunknown-style/rnd:code
   rnd:messageunknown paragraph style variablelist-term  
encountered/rnd:me

ssage
 /rnd:error
 dbk:parabla bla bla./dbk:para
/dbk:article

It looks like anything is wrong with the variablelist-term style.

Any idea how to format a variablelist in word in order to convert it  
to docbook with the roundtrip-stylesheets?


Thank you in advance

Robert




-Ursprüngliche Nachricht-
Von: Steve Ball [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 6. Mai 2008 23:38
An: Buergel Robert, EI-30
Cc: docbook-apps@lists.oasis-open.org
Betreff: Re: [docbook-apps] roundtrip-stylesheets

Hi Robert,

Firstly, make sure you are using the new set of stylesheets. The
pipeline should be:

xsltproc .../wordml2normalise.xsl $1 | \
xsltproc .../normalise2sections.xsl - | \
xsltproc .../sections2blocks.xsl - | \
xsltproc .../blocks2dbk.xsl -

I have been doing work on the system lately (mainly on tables), but I
have not been testing variablelist support (yet - I am planning on
more thoroughly testing all supported elements).

In any case, it may be a good idea to pull the latest versions from
the SVN repository.

Cheers,
Steve Ball

On 06/05/2008, at 3:55 PM, [EMAIL PROTECTED] [EMAIL PROTECTED]

wrote:



Hi all,

I'm working with the roundtrip-stylesheets in order to create a
docbook-XML-file out of a WordML-XML-file. But I have problems to  
use

the variablelist-format.

In the word-file I got 2 paragraphs. The first is formatted as
variablelist-term

and the second as
variablelist

the wordML-file looks like this - and I think this is ok:

w:p wsp:rsidR=00307CBA wsp:rsidRPr=00420A71
wsp:rsidRDefault=004E1A46 wsp:rsidP=00307CBA
  w:pPr
w:pStyle w:val=variablelist-term/
w:rPr
  w:lang w:val=EN-GB/
/w:rPr
  /w:pPr
  w:r wsp:rsidRPr=00420A71
w:rPr
  w:lang w:val=EN-GB/
/w:rPr
w:tTerm 1/w:t
  /w:r
/w:p
w:p wsp:rsidR=014A wsp:rsidRPr=00420A71
 wsp:rsidRDefault=004E1A46 wsp:rsidP=00D062B8
  w:pPr
w:pStyle w:val=variablelist/
w:rPr
  w:lang w:val=EN-GB/
/w:rPr
  /w:pPr
  w:r wsp:rsidRPr=00420A71
w:rPr
  w:lang w:val=EN-GB/
/w:rPr
w:tdescription of term 1/w:t
  /w:r
/w:p


But if I do this:

xsltproc /usr/share/docbook-xsl/roundtrip/wordml-normalise.xsl $1  
| \

xsltproc /usr/share/docbook-xsl/roundtrip/wordml-sections.xsl - | \
xsltproc /usr/share/docbook-xsl/roundtrip/wordml-blocks.xsl - | \
xsltproc /usr/share/docbook-xsl/roundtrip/wordml-final.xsl -

I receive:

No match found for variablelist-term
No match found for variablelist

All other stuff works fine but the variablelist not.

Any hints to get the variablelist working? I use the following
stylesheets:

pages2normalise.xsl 7266 2007-08-22
normalise2sections.xsl 7266 2007-08-22

Re: [docbook-apps] roundtrip-stylesheets

2008-05-06 Thread Steve Ball

Hi Robert,

Firstly, make sure you are using the new set of stylesheets. The  
pipeline should be:


xsltproc .../wordml2normalise.xsl $1 | \
xsltproc .../normalise2sections.xsl - | \
xsltproc .../sections2blocks.xsl - | \
xsltproc .../blocks2dbk.xsl -

I have been doing work on the system lately (mainly on tables), but I  
have not been testing variablelist support (yet - I am planning on  
more thoroughly testing all supported elements).


In any case, it may be a good idea to pull the latest versions from  
the SVN repository.


Cheers,
Steve Ball

On 06/05/2008, at 3:55 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote:



Hi all,

I'm working with the roundtrip-stylesheets in order to create a
docbook-XML-file out of a WordML-XML-file. But I have problems to use
the variablelist-format.

In the word-file I got 2 paragraphs. The first is formatted as
variablelist-term

and the second as
variablelist

the wordML-file looks like this - and I think this is ok:

 w:p wsp:rsidR=00307CBA wsp:rsidRPr=00420A71
 wsp:rsidRDefault=004E1A46 wsp:rsidP=00307CBA
   w:pPr
 w:pStyle w:val=variablelist-term/
 w:rPr
   w:lang w:val=EN-GB/
 /w:rPr
   /w:pPr
   w:r wsp:rsidRPr=00420A71
 w:rPr
   w:lang w:val=EN-GB/
 /w:rPr
 w:tTerm 1/w:t
   /w:r
 /w:p
 w:p wsp:rsidR=014A wsp:rsidRPr=00420A71
  wsp:rsidRDefault=004E1A46 wsp:rsidP=00D062B8
   w:pPr
 w:pStyle w:val=variablelist/
 w:rPr
   w:lang w:val=EN-GB/
 /w:rPr
   /w:pPr
   w:r wsp:rsidRPr=00420A71
 w:rPr
   w:lang w:val=EN-GB/
 /w:rPr
 w:tdescription of term 1/w:t
   /w:r
 /w:p


But if I do this:

xsltproc /usr/share/docbook-xsl/roundtrip/wordml-normalise.xsl $1 | \
xsltproc /usr/share/docbook-xsl/roundtrip/wordml-sections.xsl - | \
xsltproc /usr/share/docbook-xsl/roundtrip/wordml-blocks.xsl - | \
xsltproc /usr/share/docbook-xsl/roundtrip/wordml-final.xsl -

I receive:

No match found for variablelist-term
No match found for variablelist

All other stuff works fine but the variablelist not.

Any hints to get the variablelist working? I use the following
stylesheets:

pages2normalise.xsl 7266 2007-08-22
normalise2sections.xsl 7266 2007-08-22
sections2blocks.xsl 7266 2007-08-22
wordml2normalise.xsl 7266 2007-08-22

Thanks in advance.

Regards

Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] DocBook editor

2008-01-29 Thread Steve Ball

Hi Lars,

The DocBook roundtripping system aims to use a word processor (MS  
Word, Apple Pages, Open Office) as the front-end editor for DocBook  
documents. Naturally, there are some limitations but it can handle a  
useful subset of DocBook.


It works by using XSLT to convert he word processor's XML to DocBook,  
and vice-versa. Accordingly, you some sort of framework to run the  
transformations. I'm working on that too.


Cheers,
Steve Ball

On 30/01/2008, at 1:13 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote:



Hi.
I have been using XMLmind XXE as a DocBook editor and it works fine.
However I have been asked to investigate the possibility to use MS  
Word as an alternative and this is the reason for ma inquiry:


Does anybody have any experience in using MS Word as a DocBook editor?
Does it work?
Is it easy or hard to set up?
Is it easy or hard to use?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[docbook-apps] Roundtrip Stylesheets

2008-01-11 Thread Steve Ball

Hello Roundtripping system users,

Just to let you all know, in the lead up to the release of the 1.74.0  
XSL stylesheets I am planning on cleaning up the stylesheets in the  
roundtrip subdirectory.  In order to reduce confusion, I will remove  
the deprecated stylesheets and add a little documentation, a README or  
similar, to explain how to use the new stylesheets.  The Word, Pages  
and Open Office template files will be upgraded to support the new  
stylesheets.


If folks are still wanting to use the old stylesheets, then they will  
have to get them from the 1.73.X distributions.


Feel free to send me any comments on this approach.

Cheers,
Steve Ball



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] images in docbook to wordml transformation

2008-01-07 Thread Steve Ball

Hi Antti,

Undoubtedly you are aware that WordML and DocBook have different  
storage models for image data.  DocBook is similar to HTML in that  
images are linked to (ie. the image data is stored in a separate  
file).  WordML stores image data embedded in the XML as base-64  
encoded data.


With XSLT the only thing that can be done with this data is to write  
it to a separate file (and then only if you have the xsl:document, or  
its equivalent, extension element available).  The problem then is how  
to decode the base-64 into the binary image data.  Of course, there is  
the opposite problem when converting a DocBook document to WordML; the  
image data must be read from the file and base-64 encoded.


MS Office 2007, Apple Pages and Open Office each do things a bit  
differently, and I am currently investigating how to handle images in  
those formats.


In the roundtripping system, at present images are supported as  
hypertext references, where the target of the reference (ie. the value  
of the @fileref attribute) is the content of the paragraph.


For the WordML-to-DocBook conversion, when an embedded image is  
encountered in the document the stylesheet will attempt to write the  
base-64 encoded data into a new file and then use that file's filename  
as the URI for the @fileref attribute. How you then decode the image  
data is up to you.


Regarding image metadata, titles for figure elements are supported  
and must appear immediately before the image reference.  Captions are  
also supported and must appear after the image reference.  Anything in  
between the image reference and the caption becomes the content of the  
textobject element.  If you want to have a textobject element without  
a caption, then you must insert an empty caption-styled paragraph.


BTW, I am planning on producing documentation for these editorial  
rules.  Honest ;-)


HTHs,
Steve Ball

On 08/01/2008, at 12:35 AM, Antti Karanta wrote:




Hi!

 I was wondering what image formats are supported in docbook to  
wordml transformation. I did a little experiment and only the image  
names turned out in the transformed wordml document.


 So, I had a look at the roundtrip/docbook.xsl stylesheet, and with  
my limited xsl knowledge, it seems that this is the only support  
there is for any kind of images, at least using the mediaobject  
element containing one or more imageobjects w/ imagedata pointing to  
an external file w/ fileref, e.g.


 mediaobject id=mypic
   imageobject role=fo
 imagedata format=SVG fileref=image.svg/
   /imageobject
   imageobject role=html
 imagedata format=PNG fileref=slides.png/
   /imageobject
   textobject
 paraalternative text/para
   /textobject
 /mediaobject

 is rendered as just


image.svg
slides.png
Text Object 1
alternative text


 Are images not supported at all in the transformation from docbook  
to wordml?

 Or is it just not yet supported?
 Or did I miss something?


-Antti-


 Ps. I'm using docbook-xsl-snapshot from monday.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] Re: docbook to wordml problems

2008-01-04 Thread Steve Ball

Hi Antti,



On 04/01/2008, at 6:41 PM, Antti Karanta wrote:

On Fri, 04 Jan 2008 01:41:20 +0200, Steve Ball [EMAIL PROTECTED] wrote:

Firstly, the stylesheet you are using is the old version; I'm  
currently working on a new system of XSL stylesheets, currently  
only in the Subversion repository.


 Ok, I took the latest snapshot, dated last monday. If I understood  
correctly, the snapshots should be up to date w/ svn head, right?


Yes.

Secondly, the output of the stylesheet is an XML file, not a binary  
Word document.  Therefore the file extension should be .xml, not  
.doc.


 Word handles wordml files w/ extension .doc just fine. The benefit  
is that I can send that file to someone and not have to explain that  
it's really a word document.


Well, there you go!  You learn something every day!

MS Word is very helpful with its error reporting, isn't it?  What I  
do is pretty-print the WordML document and then try and open it  
is Word again.  That gives you a more helpful line location to  
track down the problem.


 I tried that (sorry, forgot to mention), but the exact location  
word points to contains a tab. = /
 The offending line (and the following lines upto the corresponding  
closing tag) looks like this:


w:r
w:rPr
w:rStyle w:val=inlineerror/
/w:rPr
	w:trevhistory encountered in articleinfo, but no template  
matches./w:t

/w:r

 Manually adding w:p tags to surround this seems to remedy the  
problem. Perhaps this should be corrected to the stylesheets?


Yes, this is a typical bug in the stylesheets.  It is tricky to know  
when to insert w:p, w:r and w:t tags.




 The only problem validating was because this tag in the headers had  
no content:

o:TotalTime/

 I don't understand how this tag is w/out a value since in the  
template it is

o:TotalTime19/o:TotalTime

 I manually added a value and the generated wordml document now  
validates againts the schema. However, it still does not open in  
word (as explained above). = /


I'll look into that.

 Ok, it seems that the wordml xsl stylesheets are work in progress.  
Do you have any guesstimates when they might be in usable condition?


I am actively working on them now, but I can't commit to a completion  
date.  However, I have (paying) clients who will soon be relying on  
this so it won't take long.


 Ps. Someone on this forum pointed out in reply to one of my earlier  
posts that roundtrip/supported.xml does not render correctly to pdf  
(w/ the fo stylesheets + fop) because on line 42 it has

   tgroup cols='3'
 evan though there are five columns. You might want to correct that.


Fair enough... I'll fix that too.

Cheers,
Steve Ball




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] docbook to wordml conversion questions

2008-01-04 Thread Steve Ball

Hi Mayo,

I am the current maintainer of the roundtripping stylesheets.  One  
thing to note is that there are two different sets of stylesheets to  
converting to/from DocBook; the original stylesheets that are now  
deprecated, and a new set that have better support for the different  
word processors (Open Office, Pages) and are more easily  
maintainable.  It would help me tremendously if you could be clear  
about which set you are using.


As Fabian has pointed out, thee stylesheets assume valid DocBook.  The  
new set of stylesheets are designed to work with DocBook v5.0.


See below for further comments.

Cheers,
Steve Ball

On 05/01/2008, at 8:33 AM, Mayo Jordanov wrote:


Hello,

I'm having some issues with docbook to wordml conversion, and was  
wondering if anyone on this list would be able to help me out.


The document gets converted with no errors, but there are some big  
problems with ordered and itemized lists.


1)the text in the lists does not show up. It is in the generated  
wordml document, however there are some elements missing around it  
(w:rw:t specifically, as if the para inside of listitem  
wasn't getting parsed by the xsl sheet).
2) the current docbook-xsl release (1.73.2) itemized lists don't  
have bullets, but ordered lists have numbers, and with the docbook- 
xsl snapshot bulleted lists have bullets, but ordered lists don't  
have numbers.


The document I'm trying to convert is as simple as:

?xml version=1.0 encoding=utf-8?
article
paratesting/para

itemizedlist
listitemparabullet one/para/listitem
listitemparabullet two/para/listitem
/itemizedlist

orderedlist
listitemparanumber one/para/listitem
listitemparanumber two/para/listitem
/orderedlist
/article

To solve 1) I've tried  with both para and without para inside  
of listitem elements, but that doesn't help, and according to the  
comments in the xsl stylesheet it expects para (as it should). The  
only solution I found was to modify the roundtrip/docbook.xsl sheet  
and insert w:rw:t around the contents of the listitem element  
definitely helps to solve this problem. (I'm fairly fluent in xsl,  
but don't have much experience with debugging xsl files, so putting  
it there manually rather than trying to track why the para inside  
of listitem is getting ignored was easier for me.) According to  
the wordml 2003 spec (http://rep.oio.dk/Microsoft.com/officeschemas/welcome.htm 
) the w:rw:t is required.


My second issue seems to be related to the worldml template  
document, and I haven't been able to figure out what exactly changed  
in it and why it suddenly shows bullets but numbers are gone.


The template has been changed to better support the new stylesheets.   
Sorry if that has broken anything, but if you need the old version  
then grab that from the 1.73.2 distribution.


I was also wondering if anyone is actively maintaining the docbook  
to wordml xsl sheet (roundtrip/docbook.xsl) or if they are just  
occasionally updated. Or are they intended just as an example and  
should be developed further by users?


Yes, that's me.  They are intended as a complete application, but also  
include a customisation layer (documentation on that is coming soon).




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] docbook to wordml problems

2008-01-03 Thread Steve Ball

Hi Antti,

Firstly, the stylesheet you are using is the old version; I'm  
currently working on a new system of XSL stylesheets, currently only  
in the Subversion repository.  This new version aims to make the  
roundtripping system more maintainable and more easily able to support  
multiple word processors (Open Office, Pages).  At this stage I'm  
reluctant to make fixes to the old stylesheets.


Secondly, the output of the stylesheet is an XML file, not a binary  
Word document.  Therefore the file extension should be .xml, not  
.doc.


As far as the XML declaration is concerned, that depends on how the  
XSLT engine serialises the result document.  I normally use xsltproc  
(libxslt) and it does the right thing.  The new stylesheet explicitly  
set the character encoding, so it should be OK.  You'll also find that  
Word/Windows requires a processing instruction giving the application  
for the XML document.


MS Word is very helpful with its error reporting, isn't it?  What I do  
is pretty-print the WordML document and then try and open it is Word  
again.  That gives you a more helpful line location to track down the  
problem.


Finally, regarding the WordML XML schema, if the document doesn't open  
in Word then that likely is because it doesn't validate.  Validation  
is the first step in getting a document to open in Word, but it is not  
the last step ;-)


HTHs,
Steve Ball

On 04/01/2008, at 1:08 AM, Antti Karanta wrote:




  Hi!

 I tested the docbook - wordml xsl stylesheets in the docbook  
stylesheets distribution and they produced wordml that does not  
validate against the wordml schema.


 I transformed the docbook document telling what docbook elements  
are supported in the wordml transformation to wordml.

 Here's details of what I did:

C:\downloaded\docbookC:\programs\Java\jdk1.6.0_03\bin\java -Xss1m - 
cp C:\programs\Java\saxon655\saxon.jar;C:\work\napa\jnapa\commons\lib 
\batik\xercesImpl.jar;C:\downloaded\docbook\docbook- 
xsl-1.73.2\extensions\saxon65.jar - 
Djavax 
.xml 
.parsers 
.DocumentBuilderFactory 
=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl - 
Djavax 
.xml 
.parsers 
.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl  
com.icl.saxon.StyleSheet -o \temp\supported.doc docbook- 
xsl-1.73.2\roundtrip\supported_test.xml  \downloaded\docbook\docbook- 
xsl-1.73.2\roundtrip\docbook.xsl wordml.template=file:///c:/downloaded/docbook/docbook-xsl-1.73.2/roundtrip/template.xml

Recoverable error
Ambiguous rule match for /article[1]/articleinfo[1]/author[1]
Matches both author|editor|othercredit on line 267 of file:/C:/ 
downloaded/docbook/docbook-xsl-1.73.2/roundtrip/docbook

.xsl
and *[contains(name(), info)]/*[not(self::title|self::subtitle| 
self::titleabbrev)] on line 265 of file:/C:/downloade

d/docbook/docbook-xsl-1.73.2/roundtrip/docbook.xsl
Recoverable error
Ambiguous rule match for /article[1]/articleinfo[1]/releaseinfo[1]
Matches both releaseinfo on line 391 of file:/C:/downloaded/ 
docbook/docbook-xsl-1.73.2/roundtrip/docbook.xsl
and *[contains(name(), info)]/*[not(self::title|self::subtitle| 
self::titleabbrev)] on line 265 of file:/C:/downloade

d/docbook/docbook-xsl-1.73.2/roundtrip/docbook.xsl
revhistory encountered in articleinfo, but no template matches.
sgmltag encountered in para, but no template matches.
literal encountered in para, but no template matches.
 ... pageloads of these same warnings (?) cut off ...

 Word opens the generated wordml file as text. This was easily  
remedied by inserting the missing

?xml version=1.0 encoding=UTF-8?
 in the beginning of the file.
 BTW, why is this missing? Can I set some option to get this snippet  
generated?


 It does not help a lot, though, now word complains:

The XML file supported.doc cannot be opened because there are  
problems with the contents.

Details:
Unspecified error
Error location: Line 3, Column 69343


 Word version 2003 (11.5604.5606)


 Also, the generated word document does not validate against the  
wordml schema (which I downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=ca83cb4f-8dee-41a3-9c25-dd889aea781cdisplaylang=en 
 ).



 Am I doing something wrong or is this a bug? Any known workarounds?



   -Antti-





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[docbook-apps] Re: Update on roundtrip: wordml to docbook

2007-10-09 Thread Steve Ball

Hi Mathieu,

All of my changes are checked in to the Subversion repository.  The  
latest release of the DocBook XSL stylesheets includes the Next Gen  
system.


Lately I've been doing a some work on the roundtripping system, so  
I'll revisit your bug report and check to see if it is still occurring.


Cheers,
Steve Ball

On 08/10/2007, at 9:58 PM, Mathieu Malaterre wrote:


Anyone ?

Thanks,

On 10/1/07, Mathieu Malaterre [EMAIL PROTECTED] wrote:

Hi there,

  I posted a while back a couples of issues with roundtrip doing a
wordml to docbook conversion. Ref:

  http://www.oasis-open.org/archives/docbook-apps/200701/ 
msg00244.html


  Steve Ball mentioned he is working on the 'next gen' of roundtrip.
Is there any update on that work ? BTW is it going to move to XSLT  
2.0

(simple curiosity) ?

  As a side note is there anyone else trying to convert a 'human
written' document into a 'machine' readable document ? I have done
very little progress for extracting some info (mostly
informaltable/):

from

  http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/07_03pu.xml

into

http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Source/ 
InformationObjectDefinition/ModuleAttributes.xml


  Should I give up on docbook and switch to ODF (micro$oft has now a
full converter from doc to odf) ? Are there more tools digesting ODF
than docbook ?

Thanks for comments,


--
Mathieu
Ref: original word document can be found here:

  http://medical.nema.org/dicom/2007/07_03pu.doc




--
Mathieu




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] DocBook and OpenOffice

2007-04-18 Thread Steve Ball

Hi Colin,

I'm currently working on the DocBook round-tripping system.  The aim  
is to allow exactly what you are looking for: use a word processor as  
a front-end editor for DocBook.  It has stylesheets to convert from  
DocBook to a word processing format, and another set of stylesheets  
that convert from word processing format back into DocBook without  
loss of information.


At the moment MS Word 2003 and Apple Pages are supported.  I'm  
working on adding OpenOffice support, and basic paragraph-based  
styles work but there is still more work to do on tables and images.   
The stylesheets haven't been checked-in to SVN yet because they're  
not quite finished, but if you would like a sneak-peek then let me know.


Cheers,
Steve Ball

On 19/04/2007, at 6:55 AM, Colin Shapiro wrote:


Hi all,

I'm looking to use OpenOffice Writer as a temporary editor for  
DocBook documents.  Basically, I need to allow certain people to  
edit DocBook documents who have never worked with markup languages  
before, but are familiar with OpenOffice.


I've played around with OpenOffice's built-in DocBook support in  
the past with only partial success.  I am guessing that the best  
way is to write a couple of stylesheets to transform DocBook to/ 
from the OpenDocument format.  I don't need full interoperability,  
because I plan on cleaning up the end results myself before  
publishing.


I've looked at the OpenDocument format and I'm pretty confident  
that I can write stylesheets to get the basic transformations that  
I need.  However, this will take time I'd rather not spend if I  
don't have to.  Has anyone else done something like this?  I've  
Googled a bit but haven't found anything usable.


Colin



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] DocBook and OpenOffice

2007-04-18 Thread Steve Ball

Hi Ray,

Yes they should support the book root element.  If not, that's a bug  
and please report it.


At the very least, article, book and chapter are supported.  The new  
stylesheets that I am currently working will support appendix,  
preface and all other toplevel elements.


Cheers,
Steve Ball

On 19/04/2007, at 8:27 AM, Miller, Ray (Centech) wrote:


... At the moment MS Word 2003 and Apple Pages are supported.


Is the book root element currently supported; most interested for a US
Federal agency.

Ray

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] RE: Roundtrip stylesheets how-to?

2007-03-04 Thread Steve Ball

Hi Denis,

OK - those are straight-forward bugs.  Fixed in my working copy and  
will be committed to the repository rsn.  In the meantime, change  
text to content, sum to doc:sum.


Now, the dbk2* stylesheets are new and I haven't had time to write up  
some documentation.  The dbk2wp.xsl stylesheet is a module imported  
by the other dbk2* stylesheets.  You should use dbk2wordml.xsl,  
dbk2pages.xsl or dbk2ooo.xsl depending on which word processor you  
are targetting the output for.


BTW, I'm working on a new system for the reverse conversion that will  
handle OpenOffice.


HTHs,
Steve Ball

On 04/03/2007, at 11:38 AM, Denis Bradford wrote:

Sorry, sent the previous before finished. I meant to say, I tried  
this:


java com.icl.saxon.StyleSheet -r  
org.apache.xml.resolver.tools.CatalogResolver -x  
org.apache.xml.resolver.tools.ResolvingXMLReader

-o hr-resume.sxw
hr-resume-docbook.xml
roundtrip/dbk2wordml.xsl

Got this result:

Error at xsl:value-of on line 688 of file:/opt/xml/xsl/docbook- 
xsl-1.72.0/roundtrip/dbk2wp.xsl:

  Variable text has not been declared
Error at xsl:value-of on line 702 of file:/opt/xml/xsl/docbook- 
xsl-1.72.0/roundtrip/dbk2wp.xsl:

  Variable text has not been declared
Error at xsl:call-template on line 549 of file:/opt/xml/xsl/docbook- 
xsl-1.72.0/roundtrip/dbk2wp.xsl:

  No template exists named sum
Error at xsl:with-param on line 796 of file:/opt/xml/xsl/docbook- 
xsl-1.72.0/roundtrip/dbk2wp.xsl:

  Duplicate parameter name
Transformation failed: Failed to compile stylesheet. 4 errors  
detected.


I have an idea that I need to do something with one of the templates -
is that what I'm missing?



 Original Message 
Subject: Roundtrip stylesheets how-to?
Date: Sat, 03 Mar 2007 19:14:08 -0500
From: Denis Bradford [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: docbook-apps@lists.oasis-open.org
References: [EMAIL PROTECTED]

Is there a description of the basic usage of the roundtrip  
stylesheets?

Forgive me if it's there - I have looked.

Failing that, maybe someone who's done it can steer me straight: for
starters, how about transforming a DocBook article to OpenOffice?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
open.org






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DOCBOOK-APPS: Mac OS X Toolchain?

2003-01-02 Thread Steve Ball
Michael D. Crawford wrote:

Does anyone have support for publishing DocBook XML documents on Mac OS 
X with the DSSSL stylesheets?

No, but I have setup the XSL stylesheet system using
libxslt  Fop.  Works very nicely ;-)


I have this nice almost-brand-new iBook and it would really be the most 
convenient to me if I could pick up again on the book I'm writing by 
using my iBook.

OS X is just BSD Unix under-the-covers, and it is fairly
straight-forward to get source code compiled and working
(as long as you install the developers tools, of course).

No nice, fancy GUI as yet... but I'm working on that!

HTHs,
Steve Ball

--
Steve Ball|   XSLT Standard Library   | Training  Seminars
Zveno Pty Ltd | Web Tcl Complete  |   XML XSL Schemas
http://www.zveno.com/ |  TclXML TclDOM| Tcl, Web Development
[EMAIL PROTECTED]  +---+-
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099




Re: DOCBOOK-APPS: looking for docbook/xml/xslt/etc courseware

2002-10-17 Thread Steve Ball
Dear Robert,

You wrote:

  i have a couple clients who are interested in a course in
xml/docbook and associated processing.  i could write it myself
at this point, but it would take some time.

  does anyone have recent, up-to-date and battle-tested courseware?
feel free to drop me a note and we can talk.  or point me at a
web site where i can take a look at some offerings and we can
negotiate later.  thanks.


We have a comprehensive range of XML courseware, including
DocBook topics.  You do want to teach DocBook using XML,
and not SGML, right?

The website to look at is http://www.zveno.com/courses/

In fact, our courseware is itself written in DocBook and
the diagrams in SVG.  These are processed using XSLT to
produce the course materials.  We use XSL-FO + FOP for
printed materials and SVG for data projection (instead of
PowerPoint).  IOW, we eat our own dogfood ;-)

Cheers,
Steve Ball

--
Steve Ball|   XSLT Standard Library   | Training  Seminars
Zveno Pty Ltd | Web Tcl Complete  |   XML XSL Schemas
http://www.zveno.com/ |  TclXML TclDOM| Tcl, Web Development
[EMAIL PROTECTED]  +---+-
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099




Re: DOCBOOK-APPS: SVG in HTML output, XSLT stylesheets

2002-05-21 Thread Steve Ball

Dave Pawson wrote:
 I had occasion today to include an SVG diagram in HTML output.
 Is this a rare beast?

Not at all!  Almost all of the images and diagrams we
use in our course materials are SVG.  We'll soon be
exposing more SVG content (not necessarily images)
on the website.

Of course, the user's browser must support SVG.
Adobe's SVG viewer plugin is popular, and Mozilla
is developing native support.

 Perhaps suggest for inclusion in mediaobject?

I treat them exactly the same way as images, ie. use
imageobject inside a mediaobject.  I note that DocBook
4.1.2+ has provision for SVG.

Cheers,
Steve Ball

-- 
Steve Ball|   XSLT Standard Library   | Training  Seminars
Zveno Pty Ltd | Web Tcl Complete  |   XML XSL Schemas
http://www.zveno.com/ |  TclXML TclDOM| Tcl, Web Development
[EMAIL PROTECTED]  +---+-
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099




Re: DOCBOOK-APPS: SVG in HTML output, XSLT stylesheets

2002-05-21 Thread Steve Ball

Dave Pawson wrote:
 At 22:57 21/05/2002 +1000, Steve Ball wrote:
 
 Perhaps suggest for inclusion in mediaobject?

 I treat them exactly the same way as images, ie. use
 imageobject inside a mediaobject.  I note that DocBook
 4.1.2+ has provision for SVG.
 
 Do the html stylesheets do the right thing?
 (just wait till we get inline SVG!)

No.  I've had to customise the stylesheets.
When handling an SVG document (identified by the
file extension '.svg') they use an EMBED element
instead of IMG.

Not sure at this stage how Mozilla will change this:-
it will be very difficult to produce portable Web pages
if Mozilla requires IMG and Adobe requires EMBED :-(

Cheers,
Steve Ball

-- 
Steve Ball|   XSLT Standard Library   | Training  Seminars
Zveno Pty Ltd | Web Tcl Complete  |   XML XSL Schemas
http://www.zveno.com/ |  TclXML TclDOM| Tcl, Web Development
[EMAIL PROTECTED]  +---+-
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099




Re: DOCBOOK-APPS: Looking for swc

2002-02-25 Thread Steve Ball

Bernd Kreimeier wrote:
 I need an SGML/XML-aware version of wc to count words, lines, etc.
 directly onm SGML source. I used some db2txt right now, is there a
 a direct way to do this (in the way of sgrep)?

I wrote 'xmlwc' (attached) as an example program for TclXML.
Takes the same command line parameters as the Unix wc
command.

To run it you'll need ActiveState Tcl -
http://aspn.activestate.com/ASPN/Downloads/ActiveTcl/

HTHs,
Steve Ball

-- 
Steve Ball|   XSLT Standard Library   | Training  Seminars
Zveno Pty Ltd | Web Tcl Complete  |   XML XSL Schemas
http://www.zveno.com/ |  TclXML TclDOM| Tcl, Web Development
[EMAIL PROTECTED]  +---+-
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099


#!/bin/sh
# \
exec tclsh8.3 $0 $@

package require xml

set bytes 0
set chars 0
set words 0
set lines 0

proc cdata {data args} {
global bytes chars words lines

incr bytes [string bytelength $data]
incr chars [string length $data]
incr lines [regsub -all \n $data {} discard]
regsub -all \[ \t\r\n\]+ [string trim $data] { } data
incr words [regsub -all { } $data {} discard]

return {}
}

set format {%1$7d%2$8d%3$8d %5$10s}

set input {}
foreach opt $argv {
switch -- $opt {
--bytes {
set format {%4$7d}
}

-c -
--chars {
set format {%3$7d}
}

-w -
--words {
set format {%2$7d}
}

-l -
--lines {
set format {%1$7d}
}

-h -
--help {
puts stderr $argv0 \[-clw\] \[--bytes\] \[--chars\] \[--words\] 
\[--lines\] \[--help\] \[--version\] \[file...\]
puts stderr Counts number of bytes, characters, words and lines in an XML 
document
}
--version {
puts stderr xmlwc version 1.0
}

default {
lappend input $opt
}
}
}

if {![llength $input]} {
set p [xml::parser -characterdatacommand cdata]
if {[catch {$p parse [read stdin]} err]} {
puts stderr $err
exit 1
}
} else {
foreach in $input {
if {[catch {open $in} ch]} {
puts stderr unable to open file \$in\
exit 1
}
set p [xml::parser -characterdatacommand cdata]
if {[catch {$p parse [read $ch]} err]} {
puts stderr $err
exit 1
}
catch {close $ch}
}
}

puts [format $format $lines $words $chars $bytes $input]
exit 0