RE: [xsl] plugging the result of exec() of system() while traversing

Subject: RE: [xsl] plugging the result of exec() of system() while traversing
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Sat, 24 Feb 2001 23:09:09 -0000
>As I traverse through an XML, when I hit certain elements, I want
>to call c program, with the attribute as an argument. Then I need
>to plug in the result in the resulting XML.
>
>I was looking something like exec() or system(), but I could not
>find it. Closest is system-property() but I dont think that is
>what I want.
>
>
>Any idea? Any pointer for examples?

Have a look at the document function.
It would be nice to do
<xsl:apply-templates select="document('myprog.exe?'{@someAttrib})/somenodes"
/>
passing everything after ? to stdin but you can't. Unless you put myprog.exe
on the other side of a server and do
<xsl:apply-templates
select="document('http://server/cgi-bin/myprog.exe?'{@someAttrib})/somenodes
" />
Even if you just do
<xsl:apply-templates select="document('myprog.exe)/somenodes" />
or
<xsl:apply-templates select="document({@someAttrib}'.exe')/somenodes" />
Most parsers open the myprog.exe directly which is usualy binary so just
causes an error. Haven't tried this with MSXML but then you can just use
addObject to add a Wscript.Shell object to the stylesheet and use that.

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


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


Current Thread