OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: docbook to wordml problems



   Hi Steve,

   Thanks for your reply.

On Fri, 04 Jan 2008 01:41:20 +0200, Steve Ball <Steve.Ball@xxx> 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?


> At this stage I'm reluctant to make fixes to the old stylesheets.

   Nobody's asking you to. = )


> 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.


> As far as the XML declaration is concerned, that depends on how the XSLT  
> engine serialises the result document.

   This works correctly in the snapshot version of the stylesheets.


> 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:t>revhistory 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?


   The next error word gives points to this line:

     <w:tcW w:w="1.00*" w:type="dxa"/>

   More precisely, the first attribute therein (judging by the col number  
word gives). I know only the very basics of wordml, so I'm at a loss  
here...


> 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 ;-)

   I redid my experiment w/ the snapshot stylesheets:

C:\downloaded\docbook>C:\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-snapshot\extensions\saxon65.jar  
-Djavax.xml.par
sers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl  
-Djavax.xml.parsers.SAXParserFactory=org.a
pache.xerces.jaxp.SAXParserFactoryImpl com.icl.saxon.StyleSheet -o  
\temp\supported.xml docbook-xsl-snapshot\roundtrip\su
pported.xml   
\downloaded\docbook\docbook-xsl-snapshot\roundtrip\docbook.xsl  
wordml.template=file:///c:/downloaded/docboo
k/docbook-xsl-snapshot/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-snapshot/roundtrip/docbo
ok.xsl
and "*[contains(name(),  
"info")]/*[not(self::title|self::subtitle|self::titleabbrev)]" on line 265  
of file:/C:/downloade
d/docbook/docbook-xsl-snapshot/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-snapshot/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-snapshot/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.
...

   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:TotalTime>19</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). = /


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



         -Antti-



   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.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]