Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 15th, 2005, 06:59 AM
Authorized User
 
Join Date: May 2005
Location: Waterlooville, HANTS, United Kingdom.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default user defined templates

In XSLT can we define our own template names ie creating templates where the template name isn't a name of a node!
This would be so useful to me!

...

<p>will it use my template</p>
<xsl:apply-templates select="MyTemplate" />

...

<xsl:template match="MyTemplate">
    Look its worked!
</xsl:template>


  #2 (permalink)  
Old June 15th, 2005, 07:07 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes you can:

Code:
<xsl:call-template name="MyTemplate"/>

<xsl:template name="MyTemplate">
    Look its worked!
</xsl:template>
  #3 (permalink)  
Old June 15th, 2005, 08:27 AM
Authorized User
 
Join Date: May 2005
Location: Waterlooville, HANTS, United Kingdom.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Genius!

I've been searching in google for user-defined tempates etc and call just didn't come up!

Thanks



Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
User-defined functions fredh Excel VBA 1 May 7th, 2007 10:28 AM
User Control Not Defined? Ron Howerton Visual Studio 2005 1 March 29th, 2006 11:15 AM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
User Defined Function niravp SQL Server 2000 7 November 29th, 2004 02:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.