Re: [xsl] Unable to get Firefox to apply XSL

Subject: Re: [xsl] Unable to get Firefox to apply XSL
From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Mar 2022 20:13:20 -0000
On Wed, 30 Mar 2022 at 20:54, Michele R Combs mrrothen@xxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Oh wow, thank you b I just tested it and works perfectly.  This might be
> the answer.  Do you know if it could be modified to work with file *
> *names** rather than dragging/dropping the entire file?
>

er yes I just happened to have the drag and drop lying around, you could
have a standard file upload button that triggers the file chooser interface
(if I remember what the javascript api is for that:-) I may look later.

>
>
> Also, why does this avoid the security issue?
>

well at the xslt level it avoids it as there is no external file access at
all, it is taking the input from strings within the page.

as for getting the files into the page (by drag and drop or a file chooser
or whatever) that's allowed as it's done on explicit request it would be
harder (or probably impossible due to the same CORS security block) to make
the page automatically load and input the files. But I'm just bluffing,
what exactly is and isn't allowed by the browser security model is
complicated and not really my area.

David




>
>
> Michele
>
>
>
> *From:* David Carlisle d.p.carlisle@xxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> *Sent:* Wednesday, March 30, 2022 3:33 PM
> *To:* xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> *Subject:* Re: [xsl] Unable to get Firefox to apply XSL
>
>
>
> If running a server is too much you can still run xslt 1 stylesheets in
> the browser off the filesystem if you use an html file so there is some
> human interaction rather than the xml-stylesheet  processing instruction
> link.
>
>
>
> I wrote this a while ago (more than a decade I guess:-)  I just removed a
> few local features and it seems to work in firefox chrome and edge
>
> You can drag and drop a source file and an xslt file in to the boxes then
> click run and the resulting html appears in a div on the page.
>
> You can then edit the source within the page and re-run.
>
>
>
> It could be made prettier and have at least an attempt at error checking
> but If you save the three files locally and open test1.html in your browser
> you should be able to drag and drop the xml source and xslt in to the boxes
> then click run to see the result.
>
>
>
> David
>
>
>
> On Tue, 29 Mar 2022 at 22:06, Michele R Combs mrrothen@xxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> This is XSL-coding-adjacent so Ibm hoping someone knows.
>
>
>
> Firefox is declining to apply an xsl stylesheet to an XML document.  This
> is a pair of documents Ibve used many times over the years for demoing
how
> the browser can be used to apply XSL to render an XML file into HTML.  Last
> year we had to tweak Firefoxbs  privacy.file.unique.origin setting in
> about:config but that particular setting doesnbt seem to be present in
this
> latest version of Firefox, at least I donbt see it in about:config, nor
> anything resembling it.  Both the XML and XSL are in the same local folder
> on my desktop.  If anyone knows a fix Ibd be grateful.
>
>
> Thanks
>
>
>
> Michele
>
> *+++++++++*
>
> *Michele Combs* | Lead Archivist
>
> Special Collections Research Center
> *Visit our blog!* library-blog.syr.edu/scrc/
> Syracuse University Libraries
> 222 Waverly Ave
> Syracuse, New York 13244
>
> *t* 315.443-2081 | *e* mrrothen@xxxxxxx | *w* scrc.syr.edu
>
> *SYRACUSE UNIVERSITY*
> syr.edu
>
>
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2739265> (by
> email)
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/1127818> (by
> email)
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2739265> (by
> email <>)

Current Thread