473,503 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple XML documents in one XSL file as variables

Does any XSLT expert know if there is a way to import xml data as a
parameter into an XSL stylesheet. I know you can import an XML file
using the document('file.xml') function but the data I get comes from a
web service and I would rather not write it to a file and then delete
after the transformation if I don't have to.

I found this example but it did not work for me:
http://www.zend.com/tips/tips.php?id=253&single=1

And I searched around and couldn't find any more examples of this.

-Derrick

Nov 24 '06 #1
4 1984
pl*************@gmail.com wrote:
Does any XSLT expert know if there is a way to import xml data as a
parameter into an XSL stylesheet. I know you can import an XML file
using the document('file.xml') function but the data I get comes from a
web service and I would rather not write it to a file and then delete
after the transformation if I don't have to.
Well the document function load from a URI and not necessarily a static
file so I don't see any problem, if that web service exposes its service
with a HTTP URI then simply use e.g.
document('http://example.com/service?arg1=1&arg2=2')
and the XSLT processor will access the web service as needed.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 24 '06 #2
In article <45**********************@newsspool3.arcor-online.net>,
Martin Honnen <Ma***********@gmx.dewrote:
>Well the document function load from a URI and not necessarily a static
file so I don't see any problem, if that web service exposes its service
with a HTTP URI
So long as it works with GET rather than POST.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Nov 24 '06 #3
Thanks using a HTTP URI works. I probably won't link directly to the
web service, instead I'll point to local a php page that'll serve up
the XML after doing some preprocessing.

I guess my assumption was right that there isn't a way to pass in XML
data as a parameter.

Thanks

Martin Honnen wrote:
pl*************@gmail.com wrote:
Does any XSLT expert know if there is a way to import xml data as a
parameter into an XSL stylesheet. I know you can import an XML file
using the document('file.xml') function but the data I get comes from a
web service and I would rather not write it to a file and then delete
after the transformation if I don't have to.

Well the document function load from a URI and not necessarily a static
file so I don't see any problem, if that web service exposes its service
with a HTTP URI then simply use e.g.
document('http://example.com/service?arg1=1&arg2=2')
and the XSLT processor will access the web service as needed.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 24 '06 #4
I guess my assumption was right that there isn't a way to pass in XML
data as a parameter.
Of course, such assumption is wrong. Every XSLT processor has
(implementation-dependent) ways of passing external parameters to the
transformation.

Just read the respective documentation.

Cheers,
Dimitre Novatchev

<pl*************@gmail.comwrote in message
news:11*********************@f16g2000cwb.googlegro ups.com...
Thanks using a HTTP URI works. I probably won't link directly to the
web service, instead I'll point to local a php page that'll serve up
the XML after doing some preprocessing.

I guess my assumption was right that there isn't a way to pass in XML
data as a parameter.

Thanks

Martin Honnen wrote:
>pl*************@gmail.com wrote:
Does any XSLT expert know if there is a way to import xml data as a
parameter into an XSL stylesheet. I know you can import an XML file
using the document('file.xml') function but the data I get comes from a
web service and I would rather not write it to a file and then delete
after the transformation if I don't have to.

Well the document function load from a URI and not necessarily a static
file so I don't see any problem, if that web service exposes its service
with a HTTP URI then simply use e.g.
document('http://example.com/service?arg1=1&arg2=2')
and the XSLT processor will access the web service as needed.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 24 '06 #5

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

Similar topics

2
11173
by: AMT2K5 | last post by:
Hello. When I compile my program I recieve lots and lots of the following message which I am trying to decipher. "xxx was declared deprecated". What exactly does that mean?
2
9140
by: Patient Guy | last post by:
I have a library of functions representing a filesystem interface (essentially a file selection interface, to be used in opening/reading/writing/closing files). Heavily scripted HTML document...
3
5168
by: svdh2 | last post by:
I have been looking at a problem the entire week in access, I have still not been able to find a solution. Hope that you could maybe tell where to look Concerns the link between Access and Word....
3
7161
by: John Sutor | last post by:
Does anyone know how to print multiple page documents? I can print from a test box or a one page document, but not one with multiple pages.
6
4960
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
1
2908
by: rider0375 | last post by:
Having some major issues... Racking my brain. Also it is worthy to note as of 3 weeks ago i have 0 experience with MySQL. So anyway.. HOW DO YOU DO IT?? hehe - I can get multiple services...
6
3960
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public...
6
2401
by: Gaijinco | last post by:
I'm having a weird error compiling a multiple file project: I have three files: tortuga.h where I have declared 5 global variables and prototypes for some functions. tortuga.cpp where I...
3
1202
by: Jordan S. | last post by:
I would appreciate your thoughts and opinions on the following: I am looking to render documents into multiple document formats. At a minimum the documents will need to be rendered as HTML, and...
0
1378
Pittaman
by: Pittaman | last post by:
Hello, We're developing an application (.NET 2.0) that let's users drop documents in the application and allows users to show some document types "embedded". For example, a textfile would appear...
0
7282
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
7342
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...
1
6998
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...
0
7464
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
5586
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,...
1
5018
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
3171
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...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
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.