[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Applying style sheet to xml obtained via URL

Subject: Re: Applying style sheet to xml obtained via URL
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Aug 2016 14:47:02 -0000
Re:  Applying style sheet to xml obtained via URL
On 09.08.2016 15:37, Michele R Combs mrrothen@xxxxxxx 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?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.