473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

call-template name?

Is it possible to, for example:

<xsl:variable name="thetempla te"
test="props/prop[@key='templates tyle']/@value"/>
<xsl:call-template name="$thetempl ate"/>

I tried {$template} as well. Comes back as invalid qname. Just curious if
it is possible. If not I will use a choose construct.

Cheers
Keith Chadwick
Nov 12 '05 #1
4 1557

"Keith Chadwick" <kchadwick[nospam]@leewardsystems .com> wrote in message
news:Oh******** ******@TK2MSFTN GP09.phx.gbl...
Is it possible to, for example:

<xsl:variable name="thetempla te"
test="props/prop[@key='templates tyle']/@value"/>
<xsl:call-template name="$thetempl ate"/>

I tried {$template} as well. Comes back as invalid qname. Just curious if
it is possible. If not I will use a choose construct.


This is definitely not possible in XSLT, because the value of the "name"
attribute of xsl:call-template must be a QName (a string constant,
statically known).

What you want can be done using another mechanism (generic templates and
template references based on xsl:apply-templates and namespaces)

Read more about this on the home page of FXSL (functional programming
library for XSLT):

http://fxsl.sf.net
The first two articles are essential for understanding the rest.

Another useful material is the text (and the ppt) of the presentation I made
in August at the Extreme Markup Languages conference in Montreal:
http://www.idealliance.org/papers/ex...ovatchev01.pdf

and

http://www.idealliance.org/papers/ex...ovatchev01.zip

=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Nov 12 '05 #2
Thanks Dimitre,

I gave the whole thing a good read through and it resulted in some
interesting ideas for my current project. I understand what you are trying
to say in the documents and like anything in this field there are always
several ways of getting a result. I would personally fall back on
JScript/msxsl to provide some mathematical functionality versus writing it
in pure xsl but that is only because of my comfort level in JScript.

Thing I will start adding my 2 cents into the w3.org xslt working
drafts/discussion groups.

As always thanks
Keith Chadwick

"Dimitre Novatchev" <dn********@yah oo.com> wrote in message
news:br******** ****@ID-152440.news.uni-berlin.de...

"Keith Chadwick" <kchadwick[nospam]@leewardsystems .com> wrote in message
news:Oh******** ******@TK2MSFTN GP09.phx.gbl...
Is it possible to, for example:

<xsl:variable name="thetempla te"
test="props/prop[@key='templates tyle']/@value"/>
<xsl:call-template name="$thetempl ate"/>

I tried {$template} as well. Comes back as invalid qname. Just curious if it is possible. If not I will use a choose construct.
This is definitely not possible in XSLT, because the value of the "name"
attribute of xsl:call-template must be a QName (a string constant,
statically known).

What you want can be done using another mechanism (generic templates and
template references based on xsl:apply-templates and namespaces)

Read more about this on the home page of FXSL (functional programming
library for XSLT):

http://fxsl.sf.net
The first two articles are essential for understanding the rest.

Another useful material is the text (and the ppt) of the presentation I

made in August at the Extreme Markup Languages conference in Montreal:
http://www.idealliance.org/papers/ex...ovatchev01.pdf
and

http://www.idealliance.org/papers/ex...ovatchev01.zip
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

Nov 12 '05 #3

"Keith Chadwick" <kchadwick[nospam]@leewardsystems .com> wrote in message
news:eB******** ******@TK2MSFTN GP09.phx.gbl...
Thanks Dimitre,

I gave the whole thing a good read through and it resulted in some
interesting ideas for my current project. I understand what you are trying to say in the documents and like anything in this field there are always
several ways of getting a result. I would personally fall back on
JScript/msxsl to provide some mathematical functionality versus writing it
in pure xsl but that is only because of my comfort level in JScript.

Thing I will start adding my 2 cents into the w3.org xslt working
drafts/discussion groups.

As always thanks
Keith Chadwick


Keith,

If you need the ability to use functions as first class objects only for
implementing mathematical functions, then there are at least two ways that
are better (meaning that are still portable) than writing extension
functions in JScript:

1. Use EXSLT

2. Use the math templates of FXSL

In both cases you don't have to implement anything -- just call the
functios/templates.

FXSL is available for XSLT 2.0 too and most templates are actually
xsl:functions in XSLT 2.0, which adds more convenience in using FXSL
functions in XPath expressions.
On the other side, in case you need to implement math functionality that is
not provided by FXSL or EXSLT, I'd love to hear what are your needs.
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Nov 12 '05 #4
The current section of code I am working on, registration, is fairly simple
but very long due to down level browser compliance and other similar issues.
When I move onto the registration wizard and administration component .net
migration I will most definitely be looking into EXSLT and FXSL.

I must admit that I find it difficult figuring out how everything fits
together with ASP.NET. In other words when is it appropriate to use
technology A in implementation B and so on. I realize that there is always
trade offs but the trick is of course is to make sure the trade offs are not
the ones you really needed for the implementation and that takes a lot of
research. That is the real problem, having lived in MSDN for longer than I
can remember, I find the documentation on integration very very lacking.
For instance the MS Xpath extensions listed under msxml4 are not supported
via .Net but it is not evidently documented.

I guess in another year of doing this it will all become evident but at this
point the learning curve is rather bumpy!

Cheers
Keith

PS: Thanks for your help and input as always

"Dimitre Novatchev" <dn********@yah oo.com> wrote in message
news:br******** ****@ID-152440.news.uni-berlin.de...

"Keith Chadwick" <kchadwick[nospam]@leewardsystems .com> wrote in message
news:eB******** ******@TK2MSFTN GP09.phx.gbl...
Thanks Dimitre,

I gave the whole thing a good read through and it resulted in some
interesting ideas for my current project. I understand what you are trying
to say in the documents and like anything in this field there are always
several ways of getting a result. I would personally fall back on
JScript/msxsl to provide some mathematical functionality versus writing it in pure xsl but that is only because of my comfort level in JScript.

Thing I will start adding my 2 cents into the w3.org xslt working
drafts/discussion groups.

As always thanks
Keith Chadwick


Keith,

If you need the ability to use functions as first class objects only for
implementing mathematical functions, then there are at least two ways that
are better (meaning that are still portable) than writing extension
functions in JScript:

1. Use EXSLT

2. Use the math templates of FXSL

In both cases you don't have to implement anything -- just call the
functios/templates.

FXSL is available for XSLT 2.0 too and most templates are actually
xsl:functions in XSLT 2.0, which adds more convenience in using FXSL
functions in XPath expressions.
On the other side, in case you need to implement math functionality that

is not provided by FXSL or EXSLT, I'd love to hear what are your needs.
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3391
by: Marwan | last post by:
Hello I am using asynchronous delegates to make a call to a COM ActiveX object, but even though the call occurs on a separate thread, my UI is still blocking. If i put the thread to sleep in my delegate call, the application is well behaved (no UI freeze), but the call to the com object causes the UI to lock up Do I have to manage calls to an ActiveX object differently than using the BeginInvoke and a callback A sample of the code I...
13
4124
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make sense to punch out from managed code to native code (I was using IJW) in order to do some amount of floating point work and, if so, what that certain amount of floating point work was approximately. To attempt to do this I made a program that...
4
4279
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage I know I need to call a function that will save data but I'm not sure exactly when to call this function. I've tried two ways and both seem to have 'gotcha's':
5
3773
by: Amaryllis | last post by:
I'm trying to call a CL which is located on our AS400 from a Windows application. I've tried to code it in different ways, but I seem to get the same error every time. Does anyone have any clue as to what this means? I am not trying to alter a table. This particular CL merely generates the next voucher number in a sequence. "SQL0204: HRCU030P in HRZNCUSOBJ type *N not found. Cause . . . . . : HRCU030P in HRZNCUSOBJ type *N was...
13
26591
by: mitchellpal | last post by:
i am really having a hard time trying to differentiate the two..........i mean.....anyone got a better idea how each occurs?
7
6800
by: archana | last post by:
Hi all, I am having application in which i am doing asynchronous call.I am using manualresetevent to wait for asynchronous call to complete. I want to stop asynchronous call after certain period of time. I want something like thread.abort for aborting aynchronous call. Can someone tell me way of aborting asynchronous call.
46
3831
by: Steven T. Hatton | last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it says. http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html <shrug> -- NOUN:1. Money or property bequeathed to another by will. 2. Something handed down from an ancestor or a predecessor or from the past: a legacy of religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF, from ML legatia, from L legare, to depute, bequeath....
9
3267
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this function are of type int. (My question has nothing to do with the definition of the function foo, so don't bother about it.) If I call the function as: foo(2,3,4,5,6,7,8);/*More arguments than expected*/
12
7192
by: Rahul | last post by:
Hi Everyone, I have the following code and i'm able to invoke the destructor explicitly but not the constructor. and i get a compile time error when i invoke the constructor, why is this so? class Trial { public: Trial() {
275
12247
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.