Applying My XSL to a Public XML URL

B

Brad

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.
 
R

Rolf Magnus

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?
 
B

Brad

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.
 
K

Kelly White

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.
 
B

Brad

Can you give me more detail on how this is done?

kellywhite@grayson- 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.
 
R

Rolf Magnus

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
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top