xsl-list
[Top] [All Lists]

Re: xslt adds elements twice in xml.

2005-02-17 14:54:01
Tempore 21:38:13, die 02/17/2005 AD, hinc in xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Nishi Bhonsle <nishi(_dot_)bhonsle(_at_)oracle(_dot_)com>:

I wrote the following, but it adds the enablePortlet element and the sessionPool element twice in the resultant file --

<xsl:template match="portlet">
<xsl:copy>
<xsl:attribute name="pickerCompatibleVersions"><xsl:text>10.1.2</xsl:text></xsl:attribute> <xsl:attribute name="maxDataRows"><xsl:text>1000</xsl:text></xsl:attribute>
<xsl:copy-of select="@*"/>

<xsl:element name="sessionPool">
<xsl:attribute name="maxRefreshWaitMinute"><xsl:text>1</xsl:text></xsl:attribute> <xsl:attribute name="maxRefreshRetries"><xsl:text>1</xsl:text></xsl:attribute> <xsl:attribute name="maxGenericParameters"><xsl:text>10</xsl:text></xsl:attribute>
</xsl:element>
<xsl:apply-templates/>
</xsl:copy>
<xsl:copy-of select="enablePortlet"/>
</xsl:template>


Possibly, there is some other template in your xslt, whose pattern matches the 'enablePortlet' node, that copies this node to the result tree. So that you'll get the effect of 2 times <xsl:copy-of select="enablePortlet"/>


regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
"Φιλήκοον ειναι μαλλον η φιλόλαλον" - Κλεόβουλος

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