link xsl to xml file

Andy (17)

Usenet Archive
Joined
Apr 8, 2007
Messages
10
Reaction score
0
I know u can link an xml file to an xsl file by putting a stylesheet declaration in the xml file.

Is there a way to do the opposite ?, is there a declaration I can put in the xsl file that means I can browse to it as if I was browsing the xml file with a stylesheet declaration ?.

any help appreciated.
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
andy said:
I know u can link an xml file to an xsl file by putting a stylesheet declaration in the xml file.

Is there a way to do the opposite ?, is there a declaration I can put in the xsl file that means I can browse to it as if I was browsing the xml file with a stylesheet declaration ?.

I don't think so.
 

Peter Flynn

Usenet Archive
Joined
Jan 2, 2000
Messages
1,813
Reaction score
0
andy said:
I know u can link an xml file to an xsl file by putting a stylesheet declaration in the xml file.

Is there a way to do the opposite ?, is there a declaration I can put in the xsl file that means I can browse to it as if I was browsing the xml file with a stylesheet declaration ?.

When you say "browse to it" do you mean with a web browser, retrieving via HTTP, or with a file browser (aka directory manager like My Computer) which just looks at files on a local or shared disk?

If you are using XSLT2, it might be possible to open the stylesheet and have a document XPath call at the top level which would open the required document.

It's also possible to simulate this kind of action using an XML server like Cocoon.

I'm interested to know why you want to do it this way, though.

///Peter
 

Stanimir Stamenkov

Usenet Archive
Joined
Dec 2, 2002
Messages
431
Reaction score
0
Sun, 27 Jul 2008 10:28:08 +0100, /andy/:
I know u can link an xml file to an xsl file by putting a stylesheet declaration in the xml file.

Is there a way to do the opposite ?, is there a declaration I can put in the xsl file that means I can browse to it as if I was browsing the xml file with a stylesheet declaration ?.

I thnink it should be possible using XInclude [1]:

-----proxy.xml
<?xml version="1.0"?>
<?xml-stylesheet href="sheet.xsl" type="application/xml"?> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="original.xml"/>
-----proxy.xml--

But I don't think browsers support it.

[1] http://www.w3.org/TR/xinclude/
 

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,049
Messages
3,104,243
Members
248,133
Latest member
DujonT

Latest Threads

Top