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 September 13th, 2011, 05:02 AM
Registered User
 
Join Date: Sep 2011
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default Run an exe from XSLT to obtain a transformed value

Hello,

this is my first time using XSLT.
I have to perform a specific task :
in order to get the value of the transformed entry I must run an exe file.
Is there a way to do this directly from XSLT:

<xsl:attribute name="attr_name">
<xsl:value-of select= perform_exe_on_value("@attr_name"/>)
</xsl:attribute>

I know this is not valid syntax, it's semi-pseudo-code

I read about integrated extensions but I can't use .net or java for this.

Anyone tried to do this before?

Thanks,
Eran
 
Old September 13th, 2011, 05:09 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

There is no built in functionality in XSLT to run external executables.

Most XSLT processors allow you to write extension functions (as you have already seen) and from within one of these functions you could then call an executable.

What XSLT processor are you using?
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old September 13th, 2011, 05:19 AM
Registered User
 
Join Date: Sep 2011
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for the quick reply!

I am using xsltproc, part of libxslt (C lib for GNOME),
xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813

May I write an extension function in bash / perl / any other scripting language or is it strictly .net / java (which I cannot use)?
 
Old September 13th, 2011, 05:32 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Never used xsltproc, but it seems from this page [1] that extensions need to be built in C and compiled into the application using libxslt, so doesn't appear so no.

[1] http://xmlsoft.org/XSLT/extensions.html
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
eranben (September 13th, 2011)
 
Old September 13th, 2011, 06:02 AM
Registered User
 
Join Date: Sep 2011
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks, looks like I'll have to find some other way





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to obtain this output using XSLT jastao XSLT 1 September 5th, 2011 05:26 AM
Adding XSLT transformed XML content dynamically jacob ASP.NET 1.x and 2.0 Application Design 2 December 1st, 2005 04:40 PM
Add XSLT transformed XML (html) on an aspx page humour XSLT 2 September 30th, 2004 05:13 AM
Regarding To run EXE from ASP vppatil_20 Classic ASP Components 1 September 9th, 2004 03:08 PM
Run an exe julesmel C# 1 August 6th, 2003 10:53 AM





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