xsl-list
[Top] [All Lists]

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

2022-03-30 15:13:25
On Wed, 30 Mar 2022 at 20:54, Michele R Combs mrrothen(_at_)syr(_dot_)edu <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Oh wow, thank you – 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(_dot_)p(_dot_)carlisle(_at_)gmail(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
*Sent:* Wednesday, March 30, 2022 3:33 PM
*To:* xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
*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(_at_)syr(_dot_)edu <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

This is XSL-coding-adjacent so I’m hoping someone knows.



Firefox is declining to apply an xsl stylesheet to an XML document.  This
is a pair of documents I’ve 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 Firefox’s  privacy.file.unique.origin setting in
about:config but that particular setting doesn’t seem to be present in this
latest version of Firefox, at least I don’t 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 I’d 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(_at_)syr(_dot_)edu | *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 <>)

--~----------------------------------------------------------------
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>