473,412 Members | 5,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

running executable from xml code

Dear Group,

I do not know any XML, however, I probably need to use it...

Working on a plugin in Jira, I have an example opening a link using
the "href" command. Instead of opening a link, I would like to run a
script command (e.g. pdflatex or latex) in th xml code.

Any tips as to how I could do that?

parts of the code:

<issue-operation key="google-summary" name="Google this issue"

class="com.atlassian.jira.plugin.issueoperation.De faultPluggableIssueOperation">
<resource type="velocity" name="view">
&lt;img src="$req.contextPath/images/icons/bullet_creme.gif" height=8
width=8 border=0 align=absmiddle&gt;
&lt;b&gt;&lt;a href="$req.contextPath/secure/ConfigureReport.jspa?
selectedProjectId=${issue.getProject().getString(' id')}
\&amp;reportKey=com.atlassian.jira.plugin.report.e xample.dhr_report
%3Adhr_report"&gt;DHR&lt;/a&gt;&lt;/b&gt; DHR Report
</resource>
<!-- the relative order of operations -->
<order>10</order>
</issue-operation>

best regards

Feb 15 '07 #1
7 6880
doneirik schreef:
Dear Group,

I do not know any XML, however, I probably need to use it...

Working on a plugin in Jira, I have an example opening a link using
the "href" command. Instead of opening a link, I would like to run a
script command (e.g. pdflatex or latex) in th xml code.
XML is a dataformat not a executable language....
So no this is not possible.
Feb 15 '07 #2
Working on a plugin in Jira, I have an example opening a link using
the "href" command. Instead of opening a link, I would like to run a
script command (e.g. pdflatex or latex) in th xml code.
That's a matter of how you configure and/or script the tool that's
manipulating the XML.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Feb 15 '07 #3
doneirik wrote:
Dear Group,

I do not know any XML, however, I probably need to use it...

Working on a plugin in Jira, I have an example opening a link using
the "href" command. Instead of opening a link, I would like to run a
script command (e.g. pdflatex or latex) in th xml code.

Any tips as to how I could do that?
You can't get XML itself to cause something to execute because XML is a
markup language, not a programming language.

You may be able to get your XML processor to perform this task, though,
based on finding something in your XML markup to trigger it.
<resource type="velocity" name="view">
&lt;img src="$req.contextPath/images/icons/bullet_creme.gif" height=8
width=8 border=0 align=absmiddle&gt;
&lt;b&gt;&lt;a href="$req.contextPath/secure/ConfigureReport.jspa?
selectedProjectId=${issue.getProject().getString(' id')}
\&amp;reportKey=com.atlassian.jira.plugin.report.e xample.dhr_report
%3Adhr_report"&gt;DHR&lt;/a&gt;&lt;/b&gt; DHR Report
</resource>
Your problem is that that has no meaning. Something or someone has
deliberately crippled the data by representing the HTML markup as
character data, and deliberately broken what remains by omitting the
quotes around attribute values, so it is not reliably accessible to an
XML processor.

It ought to read:

<resource type="velocity" name="view">
<img src="$req.contextPath/images/icons/bullet_creme.gif" height="8"
width="8" border="0" align="absmiddle">
<b><a
href="$req.contextPath/secure/ConfigureReport.jspa?selectedProjectId=${issue.get Project().getString('id')}&amp;reportKey=com.atlas sian.jira.plugin.report.example.dhr_report%3Adhr_r eport">DHR</a></b>
DHR Report
</resource>

Now at least your XML processor can gain control over the markup and
decide what to replace with what in order to generate the output you need.

"Get the data model right to start with, and everything else pretty much
falls into place. Get it wrong to start with, and the project is hosed
before you begin." I forget who said that.

The easiest way to make it run an external binary is to write a stub
that performs that task, and add it to the repertoire of functions for
whatever your processing language is.

Depending on what you want it to do (embed the pdflatex output as an
image?) you could play dirty tricks if the output is going to be used in
a browser: transform the anchor element into an img element whose src
attribute is actually the URI of a little server script you write to run
pdflatex on whatever it is needs doing and return the result with the
correct MIME Content-Type.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Feb 15 '07 #4
Peter Flynn wrote:
You can't get XML itself to cause something to execute because XML is a
markup language, not a programming language.
Actually, XML isn't even that -- XML is a markup *syntax* which is used
as a basis for application-specific languages.

There are programming languages based on XML -- XSLT is one example --
but that's a particular use of XML and you need to run them through a
tool that actually understands them as programs before they do anything.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Feb 15 '07 #5
Peter Flynn wrote:
Your problem is that that has no meaning. Something or someone has
deliberately crippled the data by representing the HTML markup as
character data,
It ought to read:

<resource type="velocity" name="view">
<img src="$req.contextPath/images/icons/bullet_creme.gif" height="8"
width="8" border="0" align="absmiddle">
<b><a
href="$req.contextPath/secure/ConfigureReport.jspa?selectedProjectId=${issue.get Project().getString('id')}&amp;reportKey=com.atlas sian.jira.plugin.report.example.dhr_report%3Adhr_r eport">DHR</a></b>
DHR Report
</resource>
Except that that:

(a) Isn't well formed (there is no end tag for the img element, b element or
a element.

and

(b) If you want to include HTML markup in some XML language then why not use
XHTML and properly namespace it?

--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 16 '07 #6
Tjerk Wolterink wrote:
>
XML is a dataformat not a executable language....
So no this is not possible.
the datas that you write in XML can be a program, that you can execute

Look at XSLT or Jelly

I designed and implemented a framework that allow you to run XML tags in
batch or in web applications, and to design your own tag library either
by mapping your tags to a java class or to describe them with other tags
(like a macro)

Moreover, it is also possible to design runnable declarative libraries,
and if you are smart enough, you will be able to mix imperative
constructs with declarative sentences

http://reflex.gforge.inria.fr/tutorial.html
http://disc.inria.fr/perso/philippe....l/active-tags/

--
Cordialement,

///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
-----------------------------
http://reflex.gforge.inria.fr/
Have the RefleX !
Feb 16 '07 #7
David Dorward wrote:
Peter Flynn wrote:
>Your problem is that that has no meaning. Something or someone has
deliberately crippled the data by representing the HTML markup as
character data,
>It ought to read:

<resource type="velocity" name="view">
<img src="$req.contextPath/images/icons/bullet_creme.gif" height="8"
width="8" border="0" align="absmiddle">
<b><a
href="$req.contextPath/secure/ConfigureReport.jspa?selectedProjectId=${issue.get Project().getString('id')}&amp;reportKey=com.atlas sian.jira.plugin.report.example.dhr_report%3Adhr_r eport">DHR</a></b>
>DHR Report
</resource>

Except that that:

(a) Isn't well formed (there is no end tag for the img element,
Quite right, my fault for doing it late at night.
b element or a element.
Actually there is, if you scroll right far enough :-)
and

(b) If you want to include HTML markup in some XML language then why not use
XHTML and properly namespace it?
True, but I thought the user had enough to be going on with :-)

///Peter

Feb 16 '07 #8

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

Similar topics

7
by: Johnny | last post by:
How do I create a link on a Web page on my hard drive that will run an executable file on my hard drive? For example, let's say I create runpoodle.htm and save it to my hard drive, and let's...
6
by: foldface | last post by:
Hi Sorry, don't know how to phrase the question any better. Within Visual Studio I have a style sheet that being dynamically added to the code, i.e. not via the html page. I want to place this...
0
by: WATYF | last post by:
This is my problem... I have some code that starts a Process and returns it to a variable... (prcBat) At any time while that process is running... I want to be able to Kill it by pressing a...
3
by: BobAchgill | last post by:
I am using FTP built in to my application to update the application and data from a server... What is the normal method folks use to over write the application while the program is active? What...
17
by: Csaba Gabor | last post by:
Is there a way to determine the path to the php executable (as opposed to the script. In other words, I am looking for the path to php.exe or php-win.exe) that is currently running (ie. how was...
9
by: Andrzej | last post by:
Greetings. Is there any project of universal environment for running programs written in C++ ? For example a programmer compiles program using compilator and linker that produces universal...
10
by: jon | last post by:
I am a beginner C programmer, this is actually my first programming lanugage, besides html, cgi, and javascript. I am looking for a way to make an .exe file, or a copy of my own file. I have tried...
4
by: njuneardave | last post by:
Hi, I have an application that will run a method depending on whether or not there is an instance of MS Word currently open. How do I determine whether or not an executable from another program...
2
by: NasirMunir | last post by:
I am trying to run an executable using shell. The executable look for certain files in the same directory and then run on those files. My problem: I have created a form which asks from the user to...
4
by: Brad Pears | last post by:
I have a vb.net 2005 project and have made a lot of modifications to it. The project runs fine in debug mode. Now I want to implement it and first I am running the executable on my machine to make...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...
0
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...

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.