Re: Announcing Saxon-JS
Martynas Jusevičius <martynas-tyFqBaoSXPC1Z/[email protected]>
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAE35VmzU26EZy3bLjDa6qq4QMeMEut4K6q2-EVxVCJ8vuO-mpw@mail.gmail.com> |
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