[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: call-template and execute xsl command
At 11:26 AM 4/15/2002, you wrote:
<xsl:template name= "attributes"> According to one site, <http://www.topxml.com/xsl/elmxsl_attribute.asp>, the xsl:attribute element may be contained within a xsl:when element, so your stylesheet is technically valid. But, I believe you're using a loophole in that it really must be used within a xsl:element element. Here's a quote from the site: Element:xsl:attribute Generates an attribute in the destination document. It should be used in the context of an element (either a literal, xsl:element or some other element that generates an element in the output). It must occur before any text or element content is generated. As a minimum-effort suggestion, I recommend modifying your variable to be like this: <xsl:variable name='y'> <xsl:element name="'something'"> <xsl:call-template name='attributes'/> </xsl:element> </xsl:variable> although I suspect a more hefty re-work may be necessary. Your variable will probably not be a true node, so will have to be converted to a node-set using an extension function. After this conversion, you'll likely want the first child of the new set. <xsl:variable "y2" select="msxsl:node-set($y)"/> <xsl:variable "y3" select="$y2/*[1]"/>
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
|