Re: Saxon-JS 2 user input events not handled

Martynas Jusevičius <martynas-tyFqBaoSXPC1Z/[email protected]>
Newsgroups gmane.text.xml.saxon.help
Message-ID <CAE35Vmw9uDg=Qh0npy6b8C+=2fAuoCK7aAuN2cdB31aqW2MRog@mail.gmail.com>
My bad. The DTD got me thinking about namespaces and that they're the
usual suspect in situations like this. This made me re-read the
documentation and find this:

    Changes especially for browsers include the following:

    The default namespace for the HTML page is now the HTML namespace
"http://www.w3.org/1999/xhtml". This is a change from Saxon-JS 1.x, in
which elements in the HTML page are treated as being in no namespace.
In order to minimize changes required in XSLT stylesheets to
accommodate this (i.e. requiring the default-namespace to be set, and
retaining the use of unprefixed element names in path expressions and
match patterns to match elements in the HTML page), the new command
line option -ns:##html5 should be used.

After I've changed the pattern to match the
"http://www.w3.org/1999/xhtml" namespace, the events are now handled:

    <xsl:template match="*[@id =
'container-pane']/xhtml:div/xhtml:ul[@class = 'nav
nav-tabs']/xhtml:li/xhtml:a" mode="ixsl:onclick">

Sorry for the noise.

On Thu, Aug 27, 2020 at 1:00 PM Martynas Jusevičius
<[email protected]> wrote:
>
> So here's attempt to reproduce: https://namedgraph.github.io/saxon-js2-test/
>
> The CSS will look broken, but you should see a TEST button which has
> an onclick handler in client.xsl. It should print "TEST" into the
> console, but nothing happens.
>
> Source code: https://github.com/namedgraph/saxon-js2-test/tree/gh-pages
>
> Now I've noticed that the HTML specifies 4.01 strict DTD -- could this
> be an issue?
>
> On Wed, Aug 26, 2020 at 11:15 PM Martynas Jusevičius
> <[email protected]> wrote:
> >
> > Okay, I'll try to make a repro tomorrow.
> >
> > On Wed, Aug 26, 2020 at 11:14 PM Michael Kay <[email protected]> wrote:
> > >
> > > Any chance of producing a cut-down repro that we can actually run to see if we can reproduce the problem?
> > >
> > > We may also need to see how you are invoking the transformation from the HTML page.
> > >
> > > Michael Kay
> > > Saxonica
> > >
> > > On 26 Aug 2020, at 20:59, Martynas Jusevičius <[email protected]> wrote:
> > >
> > > Hi,
> > >
> > > I've upgraded a Saxon-CE stylesheet to work under Saxon-JS 2.
> > >
> > > The templates initiated by the initialTemplate work fine.
> > >
> > > However the templates handling user events don't seem to work anymore. Examples:
> > >
> > >    <xsl:template match="input[@id = 'uri']" mode="ixsl:onkeyup" priority="1">
> > >
> > >    <xsl:template match="*[@id = 'container-pane']/div/ul[@class =
> > > 'nav nav-tabs']/li/a" mode="ixsl:onclick">
> > >
> > > I've put <xsl:message> in them but I cannot get any output in the
> > > console even though I've turned up the logLevel to 10.
> > >
> > > Stylesheet source:
> > > https://github.com/AtomGraph/LinkedDataHub/blob/rf-saxon-js2/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl#L1294
> > >
> > >
> > > Martynas
> > >
> > >
> > > _______________________________________________
> > > 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.