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:text>para</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]