Re: Announcing Saxon-JS
Martynas Jusevičius <martynas-tyFqBaoSXPC1Z/[email protected]>
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAE35VmzRggPxjkqzwTuRCHLGcYzHbeDejwirkiLP9eJvLBOTKg@mail.gmail.com> |
An alternative would be an option to somehow override the document URI
making it different from its real location, e.g.
<ixsl:schedule-action
document="http://localhost/?load=http%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore"
document-uri="http://www.w3.org/2004/02/skos/core">
<xsl:call-template name="action"/>
</ixsl:schedule-action>
But this is probably not possible as the Document.documentURI is read-only:
https://developer.mozilla.org/en-US/docs/Web/API/Document/documentURI
On Sun, Aug 23, 2020 at 12:22 AM Martynas Jusevičius
<[email protected]> wrote:
>
> 4 years later I'm wondering if there's a way to hook up document() in
> Saxon-JS 2 with Web Storage? :)
>
> On Wed, Aug 24, 2016 at 12:55 AM Michael Kay <[email protected]> wrote:
> >
> >
> > > On 23 Aug 2016, at 23:04, Martynas Jusevičius <[email protected]> wrote:
> > >
> > > Any thoughts about Web Storage?
> >
> > We've talked and thought about it. No decisions yet, but thanks for the feedback.
> >
> > Michael Kay
> >
> > >
> > > On Wed, Aug 17, 2016 at 5:55 PM, Martynas Jusevičius
> > > <[email protected]> wrote:
> > >> Michael,
> > >>
> > >> but the documentPool would have to be initiated per-request, right?
> > >>
> > >> In that case, it is not really a viable option, because we need to
> > >> cache like 10 document nodes. They should persist between requests,
> > >> otherwise the performance would be to poor.
> > >>
> > >> Have you considered Web Storage API for document caching? It provides
> > >> sessionStorage and localStorage, and looks like a possible solution in
> > >> our case.
> > >> https://www.w3.org/TR/webstorage/
> > >>
> > >> On Fri, Aug 5, 2016 at 11:55 AM, Michael Kay <[email protected]> wrote:
> > >>>
> > >>>>
> > >>>> It might involve caching documents using JS. Is there a way to put
> > >>>> them directly into Saxon's document cache?
> > >>>>
> > >>>
> > >>> Yes, as an interim solution that would work quite well. I think (without testing) you should be able to do
> > >>>
> > >>> SaxonJS.U.context.fixed.documentPool[key] = content;
> > >>>
> > >>> where key is the absolute URI and content is the XML document node; the next call on doc() should simply pick the document up from this documentPool.
> > >>>
> > >>> The ".U." signals interfaces that may change over time...
> > >>>
> > >>> Michael Kay
> > >>> Saxonica
> > >>>
> > >>>
> > >>>
> > >>> ------------------------------------------------------------------------------
> > >>> _______________________________________________
> > >>> saxon-help mailing list archived at http://saxon.markmail.org/
> > >>> [email protected]
> > >>> https://lists.sourceforge.net/lists/listinfo/saxon-help
> > >
> > > ------------------------------------------------------------------------------
> > > _______________________________________________
> > > saxon-help mailing list archived at http://saxon.markmail.org/
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/saxon-help
> >
> >
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > saxon-help mailing list archived at http://saxon.markmail.org/
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/saxon-help
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help