Re: [xslt] In memory stylesheet & external entities

david reid wrote:
> Daniel Veillard wrote:
>> On Thu, Nov 09, 2006 at 11:19:47AM +0000, david reid wrote:
>>> Daniel Veillard wrote:
>>>>   I'm pretty sure this was done in the past or at least discussed
>>>> (for example when using libxslt for Webkit).
>>>> I suggest to search thoroughtly the archives of the list in the last 2
>>>> years. Then try to be more explicit in what calls you are using and what
>>>> is missing.
>>> The search seems broken at present but I did go back through the monthly
>>>  thread listings for 2 years and found a few pointers, but nothing that
>>> directly answers my question. :-(
>>   As far as I can tell search engine indexes the mailing list
>> and does work.
>>   The answer to the same question for the Apple guys was xsltDocLoaderFunc
>> did you looked at it ?
>>> I'll try and explain in more detail!
>>> When the library init's it calls xmlSetExternalEntityLoader() to set a
>>> custom entity loader. This is being called so all is well with this.
>> [...]
>>> It dies at an early stage (style is NULL) as the includes in the
>>> stylesheet can't be resolved. My questions are really
>>   the libxml2 xmlSetExternalEntityLoader support was not sufficient
>> that's why we added 
>>     xsltDocLoaderFunc
>>   Read the doc and the mails pointed out by the query, especially the
>> full "XSLT and Safari" threads, they had exactly the same kind of problems.
> I've looked at the threads and it does seem as though we have similar
> aims, but the include files I want are all on the filesystem, I just
> need to adjust the paths :-)
> I've added the function but when it's called dict and ctxt are NULL. How
> do I set my own data pointer to be passed into the function? Are there
> any good examples of it's usage available?

I found an error in my code, so ctxt is actually being set :-) It's
being called and you were right that it's what I need.

I guess what I'm really asking is how can I get a data pointer set
within the context that is passed into my xsltDocLoaderFunc?


Have you listened to FeatherCast yet?

Bought the t-shirt?

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