xsl-list
[Top] [All Lists]

Re: [xsl] selecting a element without it's child element

2010-11-10 21:04:22
Pankaj has seen one example of 
your input data, and leapt to the conclusion that all other examples 
will be the same.

Michael is quite right. I just tried to give a clue to get the job done. 
Though it will fail in case if you xml seems like 

<book><title><indexterm>Violent Extremism</indexterm> Sacred Values, and 
what it Means <indexterm>to be Human</indexterm></title></book>

I believe that you are trying to ignore text, whatever appears in child 
element <indexterm>. For that I would suggest to use template rules, which 
already suggested to you:

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

Suppress the indexterm:

<xsl:template match="indexterm"/>

Thanks for pointing that Michael.

--Pankaj
 

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