Applying My XSL to a Public XML URL

Brad (23)

Usenet Archive
Joined
May 18, 2004
Messages
3
Reaction score
0
How do I apply my own template to an XML file that is hosted on another server? The only way I see to apply a template is to have the XML response include the instruction for loading the specific XSL, but I can't control the XML file. I basically want to apply my own template to a dynamic XML file that somebody else controls.
 

Rolf Magnus

Usenet Archive
Joined
Jun 25, 2003
Messages
3,487
Reaction score
0
Brad said:
How do I apply my own template to an XML file that is hosted on another server? The only way I see to apply a template is to have the XML response include the instruction for loading the specific XSL, but I can't control the XML file. I basically want to apply my own template to a dynamic XML file that somebody else controls.

Can't you just supply the name of the xsl file directly to your xslt processor?
 

Brad (23)

Usenet Archive
Joined
May 18, 2004
Messages
3
Reaction score
0
Can't you just supply the name of the xsl file directly to your xslt processor?

Is there a way to use an XSLT processor by default? I'd like to be able to double click on a local file and have it transform the remote XML and display it.
 

Kelly White

Usenet Archive
Joined
May 19, 2004
Messages
2
Reaction score
0
You could create an other xml

xml

<file>
<remotexml>path to public xml</remotexml>
</file>

and apply the xsl to this xml file and load the public xml using the document function.
 

Brad (23)

Usenet Archive
Joined
May 18, 2004
Messages
3
Reaction score
0
Can you give me more detail on how this is done?

You could create an other xml

xml

<file>
<remotexml>path to public xml</remotexml>
</file>

and apply the xsl to this xml file and load the public xml using the document function.
 

Rolf Magnus

Usenet Archive
Joined
Jun 25, 2003
Messages
3,487
Reaction score
0
Kelly said:
You could create an other xml

xml

<file>
<remotexml>path to public xml</remotexml>
</file>

and apply the xsl to this xml file and load the public xml using the document function.

I didn't find any document XPath function.
Another option might be to use XInclude, assuming your xslt processor supports it:

<file xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="path to public xml" /> </file>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,798
Members
249,594
Latest member
henrywalsh

Latest Threads

Top