I'm trying to switch to JavaFX
Webkit from ancient JEditorPane
to render html. As the old browser does not support xml+xslt
transformation we do the html with own internal custom URL scheme 'xslt
'. As addition we use a 'internal' url scheme that loads all required stuff with classloader
.
Custom URL handlers are registered ok, for example browsing to link
'xslt:internal:/foo/bar/init/help/index.xml
'
is caught by tranforming routines and HTML is created ok. All required xslt files are found etcetc.
Unfortunately the webkit fails to follow relative links in the HTML. There is for example css (href="../../init/style.css)
and links to other documents (for example help.xml
) that do not work. CSS
is not applied and nothing happens when the link is clicked.
Somehow it seems that webkit loses the root path (xslt:internal:/foo/bar/init/help)
when calling these resources. I never see calls to either CSS
or to help.xml
.
As a side note, links work if the transformation is made by the webkit. And naturally this all works ok in the old JEditorPane component.
I'm not sure how to investigate this problem. Could the exotic URL schemas cause the webkit ignore relative paths?