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:59:12 -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? > Ok attached is a test2.html that takes the same input but uses two file upload buttons rather than drag and drop. To access that from javascript I used the FileReader interface documented at mdn here https://developer.mozilla.org/en-US/docs/Web/API/FileReader notably given earlier discussion it says: > FileReader can only access the contents of files that the user has explicitly selected, either using an HTML <input type="file"> element or by drag and drop. It cannot be used to read a file by pathname from the user's file system. Actually I think that explains the core difference: with the <?xml-stylesheet interface, it is the author of the page choosing what gets run, and authors are not to be trusted. With these versions the page just offers an interface, but the reader chooses what to run, and naturally we can trust the reader never to shoot himself or herself in the foot. test1.html used drag and drop and this test2.html uses input type=file so apparently that's all the choices used up:-) David Run XSLT XML Source file XSLT file
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Unable to get Firefox to , David Carlisle d.p.c | Thread | |
Re: [xsl] Unable to get Firefox to , David Carlisle d.p.c | Date | |
Month |