xsl-list
[Top] [All Lists]

Re: [xsl] Selectively convert subordinate elements to text

2007-05-24 18:37:12
Use an empty template rule for the element HIDDEN then apply-templates to the child of widget.

<xsl:template match="widget">
   <xsl:apply-templates/>
</xsl:template>
<xsl:template match="HIDDEN"/>

--
Jeff

Darren Wheatley wrote:
Hi,
I have a fragment something like this: <widget>This <B>is</B> some <SUP>text</SUP> that I want to convert
<HIDDEN>don't convert this</HIDDEN> to text</widget>
What I want to end up with is this: This is some text that I want to convert to text I have tried <xsl:value-of select="."/> but of course that gives me: This is some text that I want to convert don't convert this to text Can anyone suggest a way that I can convert the fragment to text while
simultaneously dropping the <HIDDEN> element?
Thanks

D.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>