Login 
 
 Pref   Your subscriptions   Home   Help 
users@ml.mod-xslt2.com
mod-xslt2 - Users Mailing List
   
 
List info
 
 
 
Subscribe
 
 
Unsubscribe
 
 
Archive
 
 
Post
 



Advanced search
2004 01 02 03 04 05 06 07 08 09 10 11 12
2005 01 02 03 04 05 06 07 08 09 10 11 12
2006 01 02 03 04 05 06 07 08 09 10 11 12
2007 01 02 03 04 05 06 07 08 09 10 11 12
2008 01 02 03 04 05 06 07 08 09 10 11 12
2010 01 02 03 04 05 06 07 08 09 10 11 12
2011 01 02 03 04 05 06 07 08 09 10 11 12

  previous   Chronological   next       previous   Thread   next  

Re: [mod-xslt users] Problem with 'local' URLs Carlo Contavalli
  • From: Carlo Contavalli <ccontavalli@xxxxxxxxxxx>
  • To: users@xxxxxxxxxxxxxxxx
  • Subject: Re: [mod-xslt users] Problem with 'local' URLs
  • Date: Tue, 26 Jul 2005 17:40:08 +0200
  • References: <20050720120529.GA16771@mx.0n3.org>


  • On Wed, Jul 20, 2005 at 02:05:29PM +0200, Richard Leopold wrote:
    > [...]
    > Any suggestions ?
    uhm .. just a couple more questions: what happens if you
    try to access your .xsl document from your browser? do
    you get an apache error? If you want to use local://, make
    sure your .xsl file is accessible by any browser... otherwise,
    bad things (tm) may happen!

    Watch also out that on most systems, by default both xml
    and xsl files are of type application/xml, which means
    that they cannot be put in the same directory if you
    want local:// urls to work... and you are using any
    mime/type related directive.

    There also were a couple bugs that caused troubles. Thanks
    for reporting the problem!

    The patch below fixed those bugs. It has already been committed
    to the TLA archive and will be made available on next public
    release.

    Cheers,
    Carlo

    --- orig/lib/modxslt-doc.c
    +++ mod/lib/modxslt-doc.c
    @@ -1464,7 +1464,7 @@
    /* If uri_try was set by someone, parse it.
    * Otherwise, build an uri starting from base */
    if(uri_try == NULL) {
    - uri_try=(char *)xmlBuildURI((xmlChar *)uri, (xmlChar *)doc->localurl);
    + uri_try=(char *)xmlBuildURI((xmlChar *)uri+str_size("local://"),
    (xmlChar *)doc->localurl);
    retval->data=mxslt_http_real_open(doc, (char *)uri_try);
    xmlFree(uri_try);
    } else {
    @@ -1613,7 +1613,7 @@
    return -1;
    }

    - if(ctx->handled == MXSLT_OK)
    + if(ctx->handled == MXSLT_OK && doc->state->http_handler.read)
    return mxslt_sapi_http_read(doc, ctx->data, buffer, len);

    return xmlIOHTTPRead(ctx->data, (char *)buffer, len);

    --
    GPG Fingerprint: 2383 7B14 4D08 53A4 2C1A CA29 9E98 5431 1A68 6975
    -------------
    We are drowning in information but starved for knowledge.
    -- John Naisbitt, Megatrends

      Powered by Sympa