Opened 17 years ago
Last modified 12 years ago
#1916 closed defect
Relative paths in document() function cause I/O errors — at Version 3
Reported by: | Owned by: | roadrunner | |
---|---|---|---|
Priority: | normal | Component: | XsltMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description (last modified by )
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
Change History (3)
comment:1 Changed 17 years ago by
Status: | new → assigned |
---|
comment:2 Changed 17 years ago by
Looks like the versions are libxml2 2.6.20 and libxslt 1.1.14.
Does that help?
Thanks,
Jason
comment:3 Changed 12 years ago by
Description: | modified (diff) |
---|
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.