> You will end up with similar match pattern if you try to map Word
> styles (saved in WordprocessingML) into some XML structure. Style name
> is stored in a subelement which is two levels down from actual
> paragraph element. And a lot of publishing companies is processing
> Word input documents. You will have templates like:
>
> <xsl:template match="p[pPr/pStyle/@val = 'Heading 1']">
> <h1>
> <xsl:apply-templates/>
> <h1>
> </xsl:template>
>
We've got a precondition there that it will only match a <p> element, so
that's a good start. It then depends how many other rules there are that also
match <p> elements.
But yes, it would be good to look at some Word-ML stylesheets if anyone knows
of any. (I've come across a few over the years, but all specific to a
particular client.)
Michael Kay
Saxonica
|