Subject: Re: template matching priority...
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 28 Mar 2011 12:00:15 -0400
|
Fabien,
This isn't what you asked about (the @priority attribute is what you
want for that), but you might also consider this modification for the
fallback template:
<xsl:template match="row/*">
<entry><xsl:apply-templates/></entry>
</xsl:template>
This is probably more robust than using a regular expression to match
elements by name, plus it better captures the actual logic (elements
inside rows should become entries), so it is less likely to have
unwanted spill-over effects elsewhere.
Cheers,
Wendell
On 3/28/2011 10:40 AM, Fabien Tillier wrote:
<xsl:template match="*[matches(local-name(),'[N,P]{1}[0-9]+')]">
<entry><xsl:value-of select="text()"/></entry>
</xsl:template>
--
======================================================================
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
|