Open
Bug 292040
Opened 20 years ago
Updated 2 years ago
Raw xpath expressions being sent as requests
Categories
(Core :: XSLT, defect)
Tracking
()
NEW
People
(Reporter: bugzilla, Assigned: peterv)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
I've just noticed that Firefox is filling up my eror log with additional access
for files that it shouldn't be. After discovering that XPATH 1.0 (especially
Mozilla's implementation) lacks any useful uri-accessor functions, I worked
around it by using global parameters for paths so that these can be manipulated
on the fly.
What seems to be happening is that mozilla is requesting the raw expression
(i.e. here's the relevant apache log snippet:
[Wed Apr 27 04:57:33 2005] [error] [client 192.168.69.199] File does not exist:
/var/www/random/{concat($base-uri, ', referer:
http://random.jamie-thompson.co.uk/xpath-extra-error.xsl
The code in question is:
<img alt="Testing!" src="{concat($base-uri, '/images/background')}"/>
The resource is then requested correctly and all is fine with the world.
My initial solution was to add the src attribute with the xsl:attribute element,
in which case the bug isn't triggered, but using in on a script tag cause
Internet Explorer to break quite badly so I'll have to be content with only
having a single expression filling up my logs rather tan the 8 or so that was
occurring when I noticed it.
Reproducible: Always
Steps to Reproduce:
1. Use an inline XPATH attribute template for a "src" attribute
2. Access the page
3. Look in the apache error logs
Actual Results:
An erroneous additional resource was incorrectly requested.
Expected Results:
Not requested the raw expression from the server.
Comment 1•20 years ago
|
||
What probably happens is this:
During the load of the source xml (not the stylesheet),this code creates an
xhtml:img element that tries to load its src. That (the source xml) actually
does have a src="{concat($base-uri, '/images/background')}" and of course tries
to load that file.
It's an interesting question wether that is a bug or a feature.
The resulting XML does reference the right image, and as we're not constructing
a DOM for the stylesheet, that for sure won't load the image.
It seems to me that this is rather specific to embedded stylesheets, not sure
if we want to fix that. Or if, once we have an xslt proc in the xml content
sink, we should switch over to load-as-data.Yeah, IMHO we should switch to load-as-data. As well as disable the script and stylesheet loaders. And we should make sure document() loaded docs are loaded as data too if that's not already the case.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•15 years ago
|
QA Contact: keith → xslt
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•