Modify

Opened 17 years ago

Closed 11 years ago

#1916 closed defect (fixed)

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

Reported by: jcarter@… Owned by: roadrunner
Priority: normal Component: XsltMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by Ryan J Ollos)

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 (0)

Change History (4)

comment:1 Changed 17 years ago by roadrunner

Status: newassigned

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.

comment:2 Changed 17 years ago by jcarter@…

Looks like the versions are libxml2 2.6.20 and libxslt 1.1.14.

Does that help?

Thanks,

Jason

comment:3 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:4 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Taking the liberty to close this since there has been no activity for 5 years. Please reopen if there is a reason to keep the ticket open.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain roadrunner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.