Re: [xslt] XSLT and Safari

On Aug 16, 2004, at 4:13 PM, Mark Vakoc wrote:

How are you going to know which documents a stylesheet includes before the
stylesheet is compiled?

I was planning on walking the DOM myself to find out that information. Our stylesheet loading code already deals with imports and recursion defense and so on.

The fundamental issue is (and please correct me if I'm wrong) that libxml/xslt seem to have a sync model of I/O. They expect the data to be handed back synchronously, and so everything blocks while the data is read. In order for us to use this model (and actually override the I/O), we'd have to push all of the libxml parsing and libxslt compilation off onto a separate thread (or do something hideous like push a nested event loop so we didn't block the UI).

Our loading model is asynchronous, so what I wanted to do was simply get everything loaded myself up front so that when libxslt asked for stylesheets I could synchronously hand them back without having to do I/O.

And how can you possibly handle the document()
function that can have it's arguments dynamically built (and hence no way to
know before transformation) the URI to parse/include?

We probably would not handle this in an initial release if the transformation expects to block while doing synchronous I/O.

(hyatt apple com)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]