This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: using a mode with named template?


Phillip wrote:
> I am trying to call a named template with a mode, and my XSL 
> processor is scolding me.

>From what I understand, the only attribute for the <xsl:call-template> element is name. You can use a mode when using the <xsl:apply-templates> element, and the corresponding <xsl:template> needs to have a corresponding mode attribute.
 
> Also, I don't see much material on a "mode",  any pointers?  
> Can this be 
> done, defining a named template with a mode, and calling it 
> with a mode?

Check out the relevant part of the spec:
	http://www.w3.org/TR/xslt#modes

"...Both xsl:template and xsl:apply-templates have an optional mode attribute ... If xsl:template does not have a match attribute, it must not have a mode attribute. If an xsl:apply-templates element has a mode attribute, then it applies only to those template rules from xsl:template elements that have a mode attribute with the same value; if an xsl:apply-templates element does not have a mode attribute, then it applies only to those template rules from xsl:template elements that do not have a mode attribute..."

------------------------------------------------------------------------------
This message and any attachment is confidential and may be privileged or otherwise protected from disclosure.  If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone.





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]