Welcome to the project page for WebKit's XSLT implementation. XSLT is a W3C standard for defining how to transform source XML into a result document that can be examined using the DOM or displayed as a Web document. Here is a test file that demonstrates client-side XSLT in action.

WebKit uses the excellent libxslt library to do XSL transformations. Bugs in WebKit's XSLT support fall into two categories: either they are bugs in libxslt itself, or they are bugs in WebKit's glue code that interacts with libxslt. The following page at xmlsoft.org has a list of helpful resources and explains the process of bug reporting and getting help for bugs in libxslt. Even if the bug is in libxslt, file a tracking bug in WebKit's XSLT component and paste in a link to the corresponding libxslt bug. That way we can track the issue and know that an update to the version of libxslt on the system may be necessary.

WebKit's implementation of XSLT can be found in the WebCore framework in the khtml/xsl subdirectory. There are two classes of interest, XSLStyleSheetImpl and XSLTProcessorImpl. The style sheet class shares a common base with CSS style sheets, and exists as an object-oriented expression of the stylesheets that WebKit encounters when it parses the source XML file. The processor wraps the code that actually performs the transformation. It takes the stylesheets and source XML and produces result text that is then fed back into WebKit for parsing as HTML, XML or plain text.

Get Involved!

View bugs in the XSLT component on OpenDarwin.

Below is a sampling of interesting open issues with WebKit's XSLT support. If you wish to sign up for any of these tasks, send mail to webkit-dev@opendarwin.org or comment in the appropriate bug.

XSL transformations block the user interface
The XSLTProcessor that performs the transformation using libxslt does so on the UI thread. Therefore a transformation that takes a long time to complete will block the UI of a WebKit application. The code should be restructured so that both synchronous and asynchronous transformations are allowed, since until JavaScript can be suspended/resumed a synchronous transformation mode must be possible in order for a JS API for XSL transformations to work.
The document() function is not supported
The document() capability of XSLT is not supported. XSLT's loader API (the one used to load stylesheets) needs to be used in order to synchronously load and hand back an XML document. This code could be similar to (or possibly reuse) the sync code for XMLHttpRequests.
Implement Mozilla's XSLTProcessor JS object
Right now the only way XSLT can be used in WebKit is through the use of client-side processing instructions in the source XML. Mozilla offers a programmatic API for performing transformations from JS through an XSLTProcessor object. The following document on the Mozilla Web site describes this JS API. We would like to match this API exactly.