|
Subject: Re: [xsl] Selecting and printing certain nodes From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 19 Feb 2004 18:26:58 -0500 |
Here is the foreachOutput template:
<xsl:template name="foreachOutput">
<xsl:param name="cdata" />
<xsl:param name="do-sect" />
<xsl:for-each select="$do-sect">
<xsl:choose>
<xsl:when test="name() = 'replace'">
<xsl:call-template name="replaceImage">
<xsl:with-param name="var" select="$cdata" />
</xsl:call-template>
</xsl:when>
<xsl:when test="name() = 'variable'">
<xsl:call-template name="insertVariable">
<xsl:with-param name="var" select="$cdata" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{name()}">
<xsl:copy-of select="@*" />
<xsl:call-template name="foreachOutput">
<xsl:with-param name="do-sect" select="./*" />
<xsl:with-param name="cdata" select="$cdata" />
</xsl:call-template>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
We have no "replace" or "variable" tags (which I do need to handle differently than all the other tags), we are in the xsl:otherwise but I get no text output only the tags and attributes of those tags. I need to output all the text inside the tags (expect for the "variable" and "replace" tags. Any clues?
<foreach param="devices"> <tr><td><b>BOLDFACE</b> Some Text</td><td>Here</td></tr> <tr><td> Test11</td><td>Test</td></tr> </foreach>
<doc> <item>dev1</item> <item>dev2</item> <item>dev3</item> <item>dev4</item> </doc>
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] Selecting and printing ce, Glenn MacGregor | Thread | Re: [xsl] Selecting and printing ce, David Carlisle |
| Re: [xsl] The Solution (Was: Re: ex, Saverio Perugini | Date | Re: [xsl] Selecting and printing ce, David Carlisle |
| Month |