Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT 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
 
Old May 23rd, 2007, 12:55 AM
Authorized User
 
Join Date: Apr 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT Function very urgent

Hi ,

i have a xml say
<a>
<b>mapping</b>
</a>

i have a expression say

<xsltransform><mapname>/a/b</mapname></xsltransform>

i need a xsl function where in it will give me the result as
<xsltransform><mapname>mapping</mapname></xsltransform>.
Bottom Line is :-

i have a string in that string i have a xpath i need to evaluate the xpath using xsl . Is there is any function like that ?

i can use concat like
concat('<xsltransform><mapname>',/a/b,'</mapname></xsltransform>');
Is there is any function with out any modifications to the expression i can get the result ?
Its very urgent to me .
Can some help me out from this .

Thanks & Regards,
Sasi.A





A. Sasi
__________________
A. Sasi
 
Old May 23rd, 2007, 01:35 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

It's not a standard XSLT feature, there are a number of options. Firstly your processor might support an extension, for example with Saxon it's saxon:evaluate. Alternatively use a two phase transformation whereby the first pass creates a second transformation withe the mapname element's text as part of a select attribute.

--

Joe (Microsoft MVP - XML)
 
Old May 23rd, 2007, 03:15 AM
Authorized User
 
Join Date: Apr 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi ,

i am using xalan processor .
i didnt get your point of two phase transformation. Can you please explain me clearly.

Thanks & Regards,
Sasi.A

A. Sasi
 
Old May 23rd, 2007, 03:45 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I believe Xalan also has a xalan:evaluate() extension function.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
doubt in XSLT -- very urgent subbukns XSLT 1 May 21st, 2007 05:10 PM
Query About XSLT-Urgent harshalchoksi XSLT 6 February 23rd, 2007 06:43 AM
Repalce Function :Urgent help emeka SQL Server 2000 3 February 20th, 2007 03:44 AM
urgent help with xslt sonya9879 XSLT 1 August 18th, 2005 09:17 AM
XSLT HELP URGENT! pkg XSLT 3 June 22nd, 2005 01:46 AM





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