Forums » Saxon-CE help »
Thank you for Saxon-CE -- Having trouble enabling event listener.
Added by Gary Gordon over 10 years ago
Thank you for Saxon-CE and for the free 1-year option. For now, I plan to use Saxon-CE for personal stuff. (I've been using Saxon-HE for several years.)
I seem to be having trouble enabling the Saxon-CE event listener and was hoping someone here could help me get this working. I have your "Books" example on my glasq.com domain. The xsl transformation instructions work fine, but the ixsl event instructions are being ignored.
I'm pretty much a novice when it comes to web server configuration. My glasq.com domain runs on Apache. I do not have access to the main server config file.
I'm also having the same problem with the event instructions on my local machine (Windows 7, IIS 7.5) using the localhost domain.
RE: Thank you for Saxon-CE -- Having trouble enabling event listener. - Added by Philip Fearon over 10 years ago
Thanks for trying Saxon-CE. The issue was not with the event listener directly but was caused by the XHTML namespace declaration on the html element in the books.html file:
If you remove this xmlns declaration (so you've just got ) then the events are handled properly in the XSLT because the templates match the elements clicked. Generally, I'd advise against using the XHTML namespace for your HTML, but if you need to use it then you will either need to use the xpath-default-namespace attribute in your XSLT or define a prefix for this namespace and use this prefix for any element names in your XPaths.
One further note, you're currently using the Saxonce directory for your Saxon-CE deployment - if you switch to using the SaxonceDebug directory (by renaming it to Saxonce and renaming the original something like SaxonceProd) you will get better error reporting. Though in this special case, there was no error to report as it was just that the event template patterns matched elements in the null namespace and the source HTML elements were in the XHTML namespace.
Your Apache setup is fine - your sample books.html file runs correctly to the point where it populates the div elements (this works in your sample because the id attributes of the div target elements are in the null namespace anyway) with data from books.xml.
RE: Thank you for Saxon-CE -- Having trouble enabling event listener. - Added by Gary Gordon over 10 years ago
Oh good. I'm glad it was as simple as straightening out namespaces. This was something I should have noticed on my own when comparing books.html on my domain with books.html on the Saxonica domain. Thanks for the help and quick response.
Please register to reply