[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT Merge question
<xsl:when test="action != ''"> <xsl:apply-templates select="action"/> </xsl:when> That says that if any element has an action child that has a string value that is non empty then you do not copy the element but just process the action. I don't think you want that, I think you want all existing elements to be copied so you want the xsl:copy on the outside of teh xsl:choose. Or rather you don't want the xsl:choose at all, you just want teh standard identity template there, and then have one extra template for actions that pulls in your elements (not tags, tags are something else) from the external file. <xsl:when test="action != ''"> only works because of the white space used for indenting <action> <a/> <b/> </action> is true for that test as its string value is a few newlines and spaces, but if your stylesheet had xsl:strip-space (or used microsoft's parser) or looked like <action><a/><b/></action> then the string value of action would be empty and so that test would fail. <xsl:variable name="pathvalue"><xsl:value-of select="@path" /></xsl:variable> Almost never do that it can be slow and expensive, it generates a reult tree fragment that has a text node with the string value of teh attribute. You just want <xsl:variable name="pathvalue" select="@path"/> which has the attribute directly (what you have should work though) ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|