|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xslt adds elements twice in xml.
> I looked, but I could not find any other template with the enablePortlet > node, i found the following which I do not think should matter -- > <xsl:template match="*"> > <xsl:copy> > <xsl:copy-of select="@*"/> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > This actually makes quite a difference. In your initial template you had an <xsl:apply template/> with the <xsl:copy>. This will apply any matching templates to the children nodes. Since the template you just gave will match any element, and elementPool is a child element of portlet, it has this template applied to it. And this template copies the current element and then apply-templates to the children. (I don't know if the description I gave follows the XLST terminology exactly, but it's close enough for our purpose here). You might wish to add templates that say <xsl:template match="enablePortlet"/> and <xsl:template match="sessionPortlet"/> but I would recommend rewriting it so you pull the templates out of the initial one similar to my previous email. Jon Gorman
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








