Re: [xml] xml find and replace
- From: stuart shepherd <jonny wark googlemail com>
- To: Noam Postavsky <npostavs users sourceforge net>
- Cc: xml gnome org
- Subject: Re: [xml] xml find and replace
- Date: Fri, 20 Jul 2012 12:20:13 +0100
Thank you, that work's brillantly.
On Thu, Jul 19, 2012 at 3:18 PM, Noam Postavsky
<npostavs users sourceforge net> wrote:
On Thu, Jul 19, 2012 at 9:42 AM, stuart shepherd
<
jonny wark googlemail com> wrote:
> I'm guesing it's something to do with having elements within the text, but
> it doesn't look to be replacing anything but rather adding in the replace
> value multiple times, is there a way round this.
It's replacing every text node in enum with the replace value, to
replace all enum's children instead:
<xsl:template match='//control[name="MatGrp1Ch1Pend"]/enum'>
<xsl:copy> <!-- copy the enum node-->
<!-- use the following as contents -->
<enumitem><value>16</value><label>Grp1 Ch1</label></enumitem>
<enumitem><value>17</value><label>Grp1 Ch2</label></enumitem>
<!-- etc ... -->
</xsl:copy>
</xsl:template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]