xsl-list
[Top] [All Lists]

Re: [xsl] Using Saxon-CE to implement AJAX autocomplete?

2013-07-10 01:50:14
I think the simple high-level answer is that if it's do-able in Javascript, 
then it's probably do-able in Saxon-CE (calling out to Javascript in extremis), 
but if it's a problem doing it in Javascript, then it's still going to be a 
problem doing it in Saxon-CE. Both have to cope with the same HTML DOM with all 
its quirks and incompatibilities across browsers.

Michael Kay
Saxonica


On 10 Jul 2013, at 00:03, Martynas Jusevičius wrote:

Hey,

I have a system producing XHTML using XSLT 2 on the server side. It
can also produce both XML (RDF/XML) and JSON (JSON-LD) for Linked Data
access.

On the client side however, I'm strugling to integrate such a simple
feature as a JS autocomplete plugin. The new Twitter Typeahead would
be great http://twitter.github.io/typeahead.js/, but even the default
Bootstrap Typeahead would be sufficient.

The problem is that those plugins use innerHTML to modify the HTML,
and this does not work well in XHTML mode, like here:
http://stackoverflow.com/questions/4162270/dom-exception-when-assigning-html-entities-to-innerhtml

I checked that Firefox uses strict mode:
Type: application/xhtml+xml
Render Mode: Standards compliance mode

Then I decided to check Saxon-CE demos, and they look pretty interactive:
http://www.saxonica.com/ce/demos/books/books.html

I'm wondering if Saxon-CE could be a solution here. Do you think
Typeahead-like AJAX functionality can be implemented with XSLT in the
browser? I already have stylesheets for RDF/XML, that shouldn't be a
problem.

The HTTP call is doable I guess, but what about interactivity and
stuff like authentication headers? Maybe some additional JavaScript
would solve that?

Suggestions appreciated.

Martynas
graphityhq.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>