RE: Getting text out of mixed content

Subject: RE: Getting text out of mixed content
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2000 19:00:24 +0000
What about

<xsl:template match="para">
  <xsl:value-of select="."/>
</xsl:template>

?
Wendell (spamming the list today)

At 03:55 PM 1/17/00 -0800, you wrote:
>try this:
>
><xsl:template match="para">
>		<xsl:copy-of select="*|text()"/>
></xsl:template>
>
>-----Original Message-----
>From:	owner-xsl-list@xxxxxxxxxxxxxxxx [SMTP:owner-xsl-list@xxxxxxxxxxxxxxxx]
>On Behalf Of sara.mitchell@xxxxxxxxx
>Sent:	Monday, January 17, 2000 1:20 PM
>To:	xsl-list@xxxxxxxxxxxxxxxx
>Subject:	Getting text out of mixed content
>Sensitivity:	Private
>
>My apologies up front -- I know this issue has been discussed
>but my searches in the XSL archives haven't succeeded and, as
>someone else recently posted, I swallowed a dumb pill today.
>
>I'm struggling to extract only the text out of a paragraph
>which allows mixed content. There may be several levels of
>descendant elements. With a first para such as:
>
><para>This is the beginning of <field>Field A</field> which you
>can use to start the process. </para>
>
>All I get in the output is:
>
>This is the beginning of Field A
>
>The template I'm using so far does find the first text children
>and the text inside the first element node, but it stops there.
>I'm obviously missing something fundamental and am hoping that
>someone can point out my errors.
>
>The template I'm using now is:
>
><xsl:template match="para[1]">
><xsl:for-each select="descendant-or-self::*>
> <xsl:value-of select="text()"/>
></xsl:for-each>
></xsl:template>
>
>I'm using LotusXSL (0.18.2) as my XSL processor.
>
>Sara
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

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


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread