xsl-list
[Top] [All Lists]

Re: [xsl] Performance of predicate-based patterns

2015-02-03 17:34:15

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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>