Ticket #1916 (new defect)

Opened 1 year ago

Last modified 1 year ago

Relative paths in document() function cause I/O errors

Reported by: jcarter@cs.utk.edu Assigned to: anonymous
Priority: normal Component: XsltMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

After troubleshooting for a while I think this MIGHT be an error and thought I would mention it (If I am hosed let me know). I am trying to separate in the repo my transforms and data files. I call the Xslt macro like this:

[[Xslt(source:/trunk/transforms/asgh.xsl, source:/trunk/datafiles/asgh.xml)]]

In the .xsl file a variable is assigned a path to a datafile and then I call the document function using an apply-templates tag. This is the document call in the asgh.xsl file: document('../datafiles/asgc<x>.xml')

I checked the string to make sure it was correct. I am assuming after reading many items on the web that the base URI for this stylesheet is where the .xsl file resides or "trunk/transforms". The dump below is what I get in the apache logs. The // between source and trunk looks strange in a path. The two trunks look strange as well in the path.

Is there a different way to call the macro so that relative paths will work within the transforms?

I/O warning : failed to load external entity "browser://source//trunk/transforms/trunk/datafiles/asgc1.xml" Exception exceptions.AttributeError?: "'BrowserSource?' object has no attribute 'obj'" in <bound method BrowserSource?.del of <Xslt.BrowserSource? object at 0xb5a6478c>> ignored I/O warning : failed to load external entity "browser://source//trunk/transforms/trunk/datafiles/asgc2.xml" Exception exceptions.AttributeError?: "'BrowserSource?' object has no attribute 'obj'" in <bound method BrowserSource?.del of <Xslt.BrowserSource? object at 0xb5a6452c>> ignored I/O warning : failed to load external entity "browser://source//trunk/transforms/trunk/datafiles/asgc3.xml" Exception exceptions.AttributeError?: "'BrowserSource?' object has no attribute 'obj'" in <bound method BrowserSource?.del of <Xslt.BrowserSource? object at 0xb5a645cc>> ignored I/O warning : failed to load external entity "browser://source//trunk/transforms/trunk/datafiles/asgc4.xml" Exception exceptions.AttributeError?: "'BrowserSource?' object has no attribute 'obj'" in <bound method BrowserSource?.del of <Xslt.BrowserSource? object at 0xb5a6460c>> ignored I/O warning : failed to load external entity "browser://source//trunk/transforms/trunk/datafiles/asgc5.xml" Exception exceptions.AttributeError?: "'BrowserSource?' object has no attribute 'obj'" in <bound method BrowserSource?.del of <Xslt.BrowserSource? object at 0xb5a6420c>> ignored

Thanks for all the improvements this far.

Jason

Attachments

Change History

08/10/07 03:46:50 changed by roadrunner

  • status changed from new to assigned.

While the second double slash ('//') may look weird, it's actually as intended. However, the second occurrence of 'trunk' is definitely wrong. This looks like a problem with libxslt/libxml2 . What version of those (native) libraries do you have installed?

Since there's no entry in the repository under that path you should've gotten a TracError to that effect. The exception shown here is due to a small bug in the del method (fixed in [2559]), but maybe this obscured the original exception.

08/10/07 11:16:10 changed by jcarter@cs.utk.edu

Looks like the versions are libxml2 2.6.20 and libxslt 1.1.14.

Does that help?

Thanks,

Jason

08/21/07 09:02:07 changed by anonymous

  • owner changed from roadrunner to anonymous.
  • status changed from assigned to new.

Add/Change #1916 (Relative paths in document() function cause I/O errors)




Change Properties
Action