[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Performance of predicate-based patterns


Subject: Re: [xsl] Performance of predicate-based patterns
From: "Jirka Kosek jirka@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 3 Feb 2015 23:26:52 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 23.1.2015 12:28, Michael Kay mike@xxxxxxxxxxxx wrote:
> Does anyone know of any other commonly-used stylesheets (or even, 
> uncommonly used ones) which show similar characteristics, that is,
>  large numbers of match patterns using predicate matching only, 
> with no explicit element names? We'd like any optimizations we 
> implement to be as general-purpose as possible.

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>

Jirka

- -- 
- ------------------------------------------------------------------
Jirka Kosek e-mail: jirka@xxxxxxxx http://xmlguru.cz
- ------------------------------------------------------------------
Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
- ------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
- ------------------------------------------------------------------
Bringing you XML Prague conference http://xmlprague.cz
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iEYEARECAAYFAlTRWS4ACgkQzwmSw7n0dR7nMQCfcoXtoCHGZaGHDo/+7ICzfmWw
7icAn3leufFUMECkWLOMoh5oXUZqnhJw
=Kr/j
-----END PGP SIGNATURE-----


Current Thread
Keywords