|
Subject: Re: [xsl] Matching the first text element in a subtree From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 19 Apr 2006 11:59:40 -0400 |
<xsl:template match="div0//text()[normalize-space()]">
<xsl:choose>
<xsl:when test="not(ancestor-or-self::node()[ancestor::div0]/
preceding-sibling::node()[normalize-space()]">
<!-- basically Ken's test, only broken up -->
<wrapper>
<xsl:value-of select="substring(.,1,1)"/>
</wrapper>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(.,1,1)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="substring(.,2)"/>
</xsl:template>Cheers, Wendell
====================================================================== 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 ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Matching the first text e, G. Ken Holman | Thread | [xsl] Re: Matching the first text e, Martin Holmes |
| Re: [xsl] creating tags around a st, TGolshan | Date | [xsl] preserving count function whe, Tom Wern |
| Month |