Closed Bug 154172 Opened 23 years ago Closed 22 years ago

txURIUtils::resolveHref is more than brittle in standalone

Categories

(Core :: XSLT, defect)

x86
Other
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: axel, Assigned: peterv)

Details

Attachments

(3 files)

while discussing the baseURI implementation for standalone in bug 88623, we tried to find out if we can drop the ArrayList without horking baseURI. Hah, baseURI is horked, you can do with it whatever you like :-). Seriously, I´ll attach a implementation for resolve (hinted from the XSLT spec, and a bit guessed what it should be), plus a testcase. baseURI should really be an absolute URL for documents, but right now it´s just the argument to transformiix. We kinda suck at resolving URLs, esp. detecting directories vs. leafs is broken.
I switched style a bit, I created a NS_NewFoo function instead of having all of txResolveFunctionCall in the header.
Comment on attachment 89089 [details] [diff] [review] implement resolve(aNodeSet, aString) btw, this is primarily for testing, I'm not sure if we really wanna check this in. And if, we might wanna have this as a extension function with a namespace
uri parsing is broken all over the place in standalone. We need to make up how to move paths around in standalone, and how to access files. Our platforms are UNIX, Windows, OSX, right? So we could move paths with '/' as parsep around, and replace that with '\' on Windows, but I'm not too sure if we want a file:// prefix in there, and how to deal with drive names.
fwiw windows is perfectly happy with opening paths with '/' rather then '\'. But the paths we recieve (in for example the commandline) might contain '\'s.
txURIUtils::resolveHref does a more or less clever Append of file paths with '/' directory separators. It doesn't handle absolute URLs at all, or URLs in general. renaming appropriatly
Summary: getBaseURI is broken in standalone → txURIUtils::resolveHref is more than brittle in standalone
I fixed this as good as appropriate in the embedding bug. We still don't handle aboslute URLs, but at least fragments and relative paths work again.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
mass verifying
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: