Re: [xsl] Performance of predicate-based patterns

Subject: Re: [xsl] Performance of predicate-based patterns
From: "Martynas Jusevičius martynas@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 3 Feb 2015 23:30:22 -0000
The same here what Jira said. I'm transforming Office Open XML
spreadsheet (.xslx) into RDF/XML, and the cell match patterns are all
like this:

    <xsl:template
match="sml:c[sml:shared-strings-value(sml:cell-column-head(.,
/)/sml:v) = 'EAN code']/sml:v">

On Wed, Feb 4, 2015 at 12:27 AM, Jirka Kosek jirka@xxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> -----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