xsl-list
[Top] [All Lists]

Re: [xsl] Applying style sheet to xml obtained via URL

2016-08-09 11:00:44
Michele,

I was going to ask ... what's behind that 7014 port on your server and
can you run your XSLT in there?

It appears the answer may be, yes, which is probably indeed "the easy
way", and especially since you probably do not need or want to support
the catalog lookup itself, only the display of its results.

(Make sure they support the version of XSLT you want.)

If your answer were a live one I might suggest Apache Cocoon as a way
forward, if only today, and if not RestXQ over the XML db of your
choice ... the "same origin policy" more or less implies we have to
have servers whereon we can mask the origins of our resources, and
this may prove to be the case even when we are able to do serious work
in the client (as with client-side Saxon).

I think. I would love to be further enlightened.

Cheers, Wendell


On Tue, Aug 9, 2016 at 11:43 AM, Michele R Combs mrrothen(_at_)syr(_dot_)edu
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Thanks, Martin.  I just found out that our IT guys are writing this part so I 
don't need to worry about it (yay!).  All I have to do is the XSL.  I'll 
remind them about the same-origin policy, though, I'd forgotten about that.

Michele


-----Original Message-----
From: Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de 
[mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com]
Sent: Tuesday, August 09, 2016 10:48 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Applying style sheet to xml obtained via URL

On 09.08.2016 15:37, Michele R Combs mrrothen(_at_)syr(_dot_)edu wrote:
I have a URL that returns an xml file from our library catalog (for example, 
http://summit.syr.edu:7014/vxws/GetHoldingsService?bibId=2257667) .  I want 
to set up a simple form where someone can enter the URL (actually I just 
want them to enter the BIBID -- those last 7 numbers -- then I'll construct 
the full URL), then click "submit" to display the XML with a specified XSL 
style sheet applied to it.  Is there an easy way to do this?

I know how to do html forms, but I'm not sure of the best way to script the 
"meat" of it.  I googled around a bit and found this javascript 
http://www.w3schools.com/xsl/xsl_client.asp -- if I understand correctly, my 
form would have to pass the URL to this page as a variable, to be used in 
this line:

xml = loadXMLDoc("[variable would go here]")

Is that the best way to go, or is there a simpler method?


So you want to perform the XSLT transformation in the user's browser with 
Javascript? Which browsers do you want that to work with?

Are you aware of the same origin policy
(https://en.wikipedia.org/wiki/Same-origin_policy) that client-side script is 
subjected to when loading XML? Basically the HTML with the script will need 
to come from the same origin as your XML. Are you going to serve your HTML 
with the script from the same server as the XML given above?






-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>