Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Difference between server-side and client-side XSL processing

Reply
Thread Tools

Difference between server-side and client-side XSL processing

 
 
Simon Brooke
Guest
Posts: n/a
 
      04-02-2007
One of the things I'm messing with at present is offloading some of my XSL
processing to those browsers which claim to be able to handle it. That is
to say, if the client tells me it accepts either 'text/xml'
or 'application/xml' I'll send it the XML with an appropriate
xml-stylesheet PI; otherwise I'll run the transform server side and ship
HTML.

However, I'm getting differences in the resulting HTML depending on whether
the XML is transformed client side or server side. Most of those
differences seem to be concerned with things that do the equivalent of

<xsl:apply-templates select="document( someurl)"/>

where the URLs are all world-addressable URLs, some of them on the same
server the XML was despatched from, some not. An example is this page

http://www.scaffie.co.uk/scenehere/showscene?scene=1

[this is a system in development, bits of it break and it has rough edges -
I know this]

When fetched with Firefox, which advertises its ability to transform XML,
the book details which should be fetched from Amazon into the floating DIV
on the right of the page do not get fetched; when fetched by a browser
(such as IE7 or Konqi) which does not advertise the ability to transform
XML, I do the transform server side using Xalan2, and the book details do
get fetched.

What I want to know is

(i) Is there something in the specifications which says that clients should
not fetch XML from third-party sites?

(ii) Is there some obvious - and foolish - bug in my code?

(iii) Is there a bug in Firefox?

I'd really like to offload the transform where I can, because it would save
a lot of load on my servers.

--
http://www.velocityreviews.com/forums/(E-Mail Removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; better than your average performing pineapple

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      04-03-2007
Simon Brooke wrote:

> (i) Is there something in the specifications which says that clients should
> not fetch XML from third-party sites?


Browsers apply the same origin policy so with XSLT a document loaded
from http://example.com/ can load further resources from
http://example.com/ but not from other origins.
With IE/Win you can change that configuration for the different security
zones but I don't think Mozilla allows you to configure that.
There have however been some attempts to specify ways to enable a server
to allow access to resources, the latest is
<http://www.w3.org/TR/access-control/> but I don't think there is any
implementation of that.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
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
FAQ 7.17 What's the difference between dynamic and lexical (static) scoping? Between local() and my()? PerlFAQ Server Perl Misc 0 01-06-2011 05:00 PM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Difference between xsl:param and xsl:variable? Karsten Weinert XML 3 07-05-2004 04:58 PM
Exact difference between 'const char *' and 'char *', also diff between 'const' and 'static' Santa C Programming 1 07-17-2003 02:10 PM



Advertisments