Closed
Bug 353364
Opened 19 years ago
Closed 17 years ago
Same-document references in xml-stylesheet PI processed incorrectly
Categories
(Core :: XSLT, defect)
Core
XSLT
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: bjoern, Assigned: gzlist)
Details
(Keywords: fixed1.9.1)
Attachments
(5 files, 1 obsolete file)
|
328 bytes,
application/xml
|
Details | |
|
3.61 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
|
7.52 KB,
patch
|
Details | Diff | Splinter Review | |
|
3.68 KB,
application/octet-stream
|
Details | |
|
2.05 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9a1) Gecko/20060616 Minefield/3.0a1
<?xml-stylesheet href='' type='text/xsl'?> should be equivalent to
<?xml-stylesheet href='...url of document...' type='text/xsl'?> and
hence the attached test case render as "This test did pass."
Reproducible: Always
| Reporter | ||
Comment 1•19 years ago
|
||
| Reporter | ||
Updated•19 years ago
|
Summary: Same-document references in xsl-stylesheet PI processed incorrectly → Same-document references in xml-stylesheet PI processed incorrectly
The href.isEmpty() check and early return looks wrong to me, but not totally clear from tracing through the code if removing it would expose a problem lower down.
Attachment #345633 -
Flags: review?(peterv)
Updated•17 years ago
|
Assignee: xslt → gzlist
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows Server 2003 → All
Hardware: PC → All
Comment 3•17 years ago
|
||
Comment on attachment 345633 [details] [diff] [review]
Possible fix
>=== modified file 'content/xml/content/src/nsXMLStylesheetPI.cpp'
> nsAutoString href;
> GetAttrValue(nsGkAtoms::href, href);
>- if (href.IsEmpty()) {
>- return;
>- }
Actually, you want
nsAutoString href;
if (!GetAttrValue(nsGkAtoms::href, href)) {
return;
}
The attribute is still required.
Attachment #345633 -
Flags: review?(peterv) → review-
Good catch, had not considered that case. With hope of an eyeball-only fix gone, I actually built and tried this one...
What's the prefered method of doing automated testing on XSLT things?
Attachment #345633 -
Attachment is obsolete: true
Attachment #345821 -
Flags: review?(peterv)
Updated•17 years ago
|
Attachment #345821 -
Flags: superreview+
Attachment #345821 -
Flags: review?(peterv)
Attachment #345821 -
Flags: review+
Comment 5•17 years ago
|
||
Comment on attachment 345821 [details] [diff] [review]
Actual fix
>=== modified file 'content/xml/document/src/nsXMLContentSink.cpp'
> nsXMLContentSink::ParsePIData(const nsString &aData, nsString &aHref,
> aIsAlternate = alternate.EqualsLiteral("yes");
>+ return PR_TRUE;
Add a newline before the return.
I omitted some tests which depend on features is not implemented in mozilla - notably bug 109553 and bug 275196 - and some where I couldn't find the behaviour actually specified. Of particular relevance to this bug, lreas_selflink_empty_href.svg and xslt_selflink_empty_href.xslt pass with the patch applied, and error_no_href.svg catches mistakes of the class pointed out in the first review.
Now the tree is open again I'd like to get this landed. It's a low-risk fix of a minor bug, with no api/performance/etc repercussions. I can provide a bundle with the nit above addressed and tests included.
Attachment #350408 -
Flags: approval1.9.1?
Attachment #350408 -
Flags: approval1.9.1?
Attachment #345821 -
Flags: approval1.9.1?
Updated•17 years ago
|
Attachment #345821 -
Flags: approval1.9.1? → approval1.9.1+
Comment 7•17 years ago
|
||
Comment on attachment 345821 [details] [diff] [review]
Actual fix
a191=beltzner, please do include the bundle as described
Comment 9•17 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/96b47ad640e9
http://hg.mozilla.org/mozilla-central/rev/a80045f6089e
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b3
Comment 10•17 years ago
|
||
I had to mark a test added by this bug as failing on linux:
http://hg.mozilla.org/mozilla-central/rev/120131b3a086
Comment 11•17 years ago
|
||
Bah. I had the nuke the test completely from the manifest file - it was still timing out, so apparently marking it as failing on one platform doesn't catch timeouts:
http://hg.mozilla.org/mozilla-central/rev/58bae41ad72d
| Assignee | ||
Comment 12•17 years ago
|
||
My best guess is it's a mime-types registry issue. If the .xslt extension isn't mapped to an xml type but instead defaults to application/octet-stream, it might prompt for download, blocking completion. I've got the file renamed to end .xml and a couple more tests along the same lines in my tree, will try to find someone to try it out.
| Assignee | ||
Comment 13•17 years ago
|
||
Updated•16 years ago
|
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•