Open
Bug 136720
Opened 23 years ago
Updated 2 years ago
[persist] FixupNode does not deal with XLinks
Categories
(Firefox :: File Handling, defect)
Firefox
File Handling
Tracking
()
NEW
People
(Reporter: hjtoi-bugzilla, Unassigned)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Save as complete (the FixupNode in webbrowserpersist) does not deal with XLinks.
To test, open URL and save it as complete (please note that I intend to fix bug
128326 by disabling save as complete until this is fixed, so you will need to
modify your tree to test this.
You may also need to think about XML Base (not sure, didn't think this through
yet). There is a testcase for XML Base in mozilla/content/xml/tests/xmlbase/.
Specifications:
XLink: http://www.w3.org/TR/xlink/
XML Base: http://www.w3.org/TR/xmlbase/
XML Links can probably be done something like this (but prettier) during
walking/fixup.
element->GetAttributeNS(NS_LITERAL_STRING("http://www.w3.org/1999/xlink"),
NS_LITERAL_STRING("href"),xlinkHref);
The XML base bits is the thing that scares me. It sounds very gnarly having to
maintain a stack of them during traversal *and* have them affect links (is that
just XML links or XHTML anchors, links, stylesheets too?) *and* fix them up so
the document runs properly after being saved somewhere else.
Reporter | ||
Comment 3•22 years ago
|
||
For XHTML elements you must ignore XML Base (XHTML spec does not account for
them at the moment, might change in the future).
For all other cases (I think, at least XLink and non-namespaced content, for
other namespaces you should look at the specification and see if it normatively
refers to XML Base in which case it should be counted for, otherwise perhaps
not) you need to pay attention to XML Base.
Strictly speaking, you'd need to check for type="simple", and if so, then get
the href, although we do this same mistake for performance reasons in some other
places as well.
I would be happy if you just accessed the baseURI property (or if you wanted
nsIURI object you'd call GetXMLBaseURI or something like that on nsIXMLContent)
for each node you are fixing up. That will calculate the base for you every
time, which is obviously inefficient but saves you the trouble. Saving XML is
still rare, and we can worry about performance later.
Patch adds xlink support but totally untested yet! Many of the changes involve
making existing methods PRunichar & namespace aware.
Updated•22 years ago
|
QA Contact: sairuh → petersen
Summary: FixupNode does not deal with XLinks → [persist] FixupNode does not deal with XLinks
Target Milestone: --- → mozilla1.5beta
Updated•15 years ago
|
QA Contact: chrispetersen → file-handling
Updated•8 years ago
|
Product: Core → Firefox
Target Milestone: mozilla1.5beta → ---
Version: Trunk → unspecified
Comment 6•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:Gijs, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: adamlock → nobody
Flags: needinfo?(gijskruitbosch+bugs)
Updated•3 years ago
|
Flags: needinfo?(gijskruitbosch+bugs)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•