xsl-list
[Top] [All Lists]

Re: [xsl] Performance of predicate-based patterns

2015-02-03 17:30:29
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(_at_)kosek(_dot_)cz
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 23.1.2015 12:28, Michael Kay mike(_at_)saxonica(_dot_)com 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(_at_)kosek(_dot_)cz 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-----

--~----------------------------------------------------------------
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>