patchGNU Autoconf Archive - Patches: patch #6909, Prevent Unnecessary Downloading in...

 
 

patch #6909: Prevent Unnecessary Downloading in AX_CHECK_DOCBOOK_XSLT

Submitter:  None
Submitted:  Mon 07 Sep 2009 03:23:35 AM UTC
   
 
Priority:  5 - Normal Status:  Done
Assigned to:  djmitche Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 13 Oct 2009 08:52:46 PM UTC, comment #5: 

Huh, apparently a system upgrade un-installed the particular XSLT I thought I had installed -- that explains the 'net access.  Sorry for the confusion!

This one is done, then.

Dustin J. Mitchell <djmitche>
Group Member
Mon 12 Oct 2009 01:51:01 AM UTC, comment #4: 

I'm sorry, I must be misunderstanding something.  Are you saying that the previous code which invoked xsltproc with the XSL URL as the argument didn't download from the 'net, but passing it an XML doc on stdin does cause it to access the 'net?  I could see how both would cause it (if the XSL is not in the local XML catalog), but not that a document would cause it and a URL argument wouldn't.  Odd.  I should mention that I am using version 1.1.26.  What version are you seeing this behavior with?

I'd recommend against using -nonet (although if you wanted to add an option for it, I can imagine someone might find it useful).  The only concern that I have is about unnecessary downloading.  In the case where the XSL is not in the XML catalog, downloading will be necessary and it's fine with me if the XSL is downloaded (and in fact preferable to failing and forcing the user to install the XSL into their XML catalog).

I'm also not sure what you are saying about bug #6910.  I'm actually the submitter of both (I finally broke down and created an account to alleviate some of the confusion).  What would you like to do about this bug with respect to bug #6910?  Adding -nonet but still using the URL for the DocBook 4 version of the stylesheets won't really do much with respect to DocBook 5 detection.  Perhaps I'm missing something...

Kevin Locke <kevinoid>
Sun 11 Oct 2009 05:25:53 PM UTC, comment #3: 

This is doing the opposite for me, now that I start testing this.  Using the Docbook document (which, by the way, triggered bug #6910), xsltproc is now trying to access the 'net when running the macro, but did not make any such attempt at other times.

Perhaps we should add the -nonet flag, optionally, instead?  I'd like to avoid the whole interaction with docbook versions that bug #6910 deals with.

Dustin J. Mitchell <djmitche>
Group Member
Wed 07 Oct 2009 11:53:08 PM UTC, comment #2: 

commit ef779a8c24923c7b0c8d63411d2c2a25fc359970
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date:   Wed Oct 7 19:51:36 2009 -0400

    (bug 6909) Feed a simple dummy Docbook XML file with the appropriate xsl stylesheet to XSLTPROC
   
    This avoids network traffic unless the XSLT is not available in the
    system catalog.

Anonymous
Fri 18 Sep 2009 08:59:16 PM UTC, comment #1: 

Hi Dustin,

would you like to apply this patch?

Take care,
Peter

Peter Simons <simons>
Group administrator
Mon 07 Sep 2009 03:23:35 AM UTC, original submission:  

When AX_CHECK_DOCBOOK_XSLT runs XSLTPROC to test if the stylesheet for transforming Docbook is available, it calls XSLTPROC with the stylesheet URL as the only argument.  This causes XSLTPROC to treat the stylesheet as the XML document to transform and attempts to fetch the document from the given URL, bypassing the XML catalog on the system.  Note:  This appears to happen whenever the URL for the stylesheet is given on the command-line (at least in version 1.1.24).  This will cause problems on systems which don't have an active Internet connection, but do have the XML catalog setup with the proper XSL files to perform the transformation.

To fix this problem, I propose that a simple dummy Docbook XML file with the appropriate xsl stylesheet be fed to XSLTPROC on stdin.  In this way, XSLTPROC will attempt to load the file using the XML catalog, but will still fetch the stylesheet from the web if it is not found in the catalog.  I have attached a patch against current git head which implements this behavior.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #18680:  ax_check_docbook_xslt.m4-prevent_unnecessary_downloading.patch added by None (1KiB - text/x-patch - Proposed patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kevinoid (Posted a comment)
  • -email is unavailable- added by djmitche (Updated the item)
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-08 djmitche Open/ClosedOpen Closed
        StatusNeed Info Done
    2009-09-18 simons Assigned toNone djmitche
        StatusNone Need Info
    2009-09-07 None Attached File- Added ax_check_docbook_xslt.m4-prevent_unnecessary_downloading.patch, #18680

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code