Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > referencing external xml file

Reply
Thread Tools

referencing external xml file

 
 
google@thegoldensun.com
Guest
Posts: n/a
 
      12-29-2005
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.

 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      12-29-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> 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
--
XML FAQ: http://xml.silmaril.ie/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing external js scripts with Ajax msch.prv@gmail.com ASP .Net 1 03-04-2008 12:49 AM
Referencing external DLL? VS2005 copies to bin directory Chris Ashley ASP .Net 2 10-19-2006 10:29 AM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Referencing External Class Mike ASP .Net 1 09-30-2005 04:50 AM
Problems referencing frame containing external page Morten Thorsen Javascript 3 06-21-2004 03:29 PM



Advertisments