Re: [xsl] Tagging of text() with using apply templates

Subject: Re: [xsl] Tagging of text() with using apply templates
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Tue, 26 Oct 2010 22:27:29 +0530
On Tue, Oct 26, 2010 at 5:12 PM, chirag matkar
<chiragmatkarbioinfo@xxxxxxxxx> wrote:
> I face 2 problems First is including Authorgrp tag and pagefield tag
> second B If i apply templates within template matching ref,i can insert
> authorgp and pagefield but cannot tag text()as x accordingly


I thought the template below:

<xsl:template match="text()[not(normalize-space(.)
='-')][preceding-sibling::node()[1]/self::*]">
    <x><xsl:value-of select="normalize-space(.)" /></x>
</xsl:template>

solves the problem of encapsulating particular characters (I think
excluding '-') into element "x". Did this not solve your problem, or
did you try this?

If this template and other parts of my solution didn't solve your
problem in any way, then I'm sorry I didn't understand your
requirements :(

I hope someone can write the solution better than I did :)



--
Regards,
Mukul Gandhi

Current Thread