referencing external xml file

G

google

I have one xml file, content.xml, and three views, 1.xsl, 2.xsl, 3.xsl.
I would like to be able to link from any of the views to any of the
other views.

I can do this if I use, say saxon to create 1.html, 2.html, 3.html -
then 1.html has a hyperlink in it somewhere that points to
2.html#anchorName.

What I want is to be able to do the same thing using *in-browser xslt*,
for example by having 1.xml, 2.xml, 3.xml each reference its
corresponding stylesheet, but *all read their content from content.xml*
(then we would link accross files using eg 2.xml#anchorName).

This may be incredibly simple, but I have noooo idea how to get the
content of one xml file into another xml file.

Any advice on this, or an alternative solution, greatly appreciated.
 
P

Peter Flynn

I have one xml file, content.xml, and three views, 1.xsl, 2.xsl,
3.xsl.
I would like to be able to link from any of the views to any of the
other views.

I can do this if I use, say saxon to create 1.html, 2.html, 3.html -
then 1.html has a hyperlink in it somewhere that points to
2.html#anchorName.

What I want is to be able to do the same thing using *in-browser
xslt*, for example by having 1.xml, 2.xml, 3.xml each reference its
corresponding stylesheet, but *all read their content from
content.xml* (then we would link accross files using eg
2.xml#anchorName).

This may be incredibly simple, but I have noooo idea how to get the
content of one xml file into another xml file.

But in this case you explicitly _don't_ want to "get the content of one
xml file into another xml file", you want to reprocess the same file
using a different stylesheet. In server-side processing (eg Cocoon) this
is easy, because all you need to do is output a link to a URI which the
server will interpret as being the same file processed by a different
stylesheet. In theory you should be able to do this by specifying
multiple xml-stylesheet PIs, see http://www.w3.org/TR/xml-stylesheet/
but browser-side XML is like browser-side XSLT: incomplete and patchy,
and inconsistent between browsers.

///Peter
 

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
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top