Closed Bug 59937 Opened 25 years ago Closed 25 years ago

XPath and XSLT function lib incomplete

Categories

(Core :: XSLT, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: axel, Assigned: axel)

Details

Attachments

(3 files)

The following functions are not implemented yet: id() normalize-space() sum() key() unparsed-entity-uri() // what the heck does this? Example? element-available() function-available() Axel
I assign this bug to me, at least for now. I implemented the first three functions, patch will come in a minute. I have no idea about the others, though. So somebody will have to take over. Axel
Assignee: kvisco → axel
More spam, accepting bug. Please review this one, I'm not sure I did all the memory issues allright, and I didn't test the mozilla part. As I don't have a working example for the id() function :-( Axel
Status: NEW → ASSIGNED
Keywords: review
OK, I have looked thru the problems with the id() function. We definitly need to work dependent on DTD, it's not the "id" attribute, but a as ID specified attribute. Checking for "id" would work for HTML4, but we don't set the document type. Therefor I can't check that. I will leave the implementation for getElementById() in, and return NULL for the standalone. How is that? Axel
I will attach a new patch, that does id() better, my code in standalone/Document.ccp was under a false impression about what NodeDefinition::nextSibling is. I completely removed that code in favor of a return NULL; and some comments. I didn't return the NodeSet in the id() function, too, and didn't resolve the function name. The current patch runs most (I didn't test all) examples from docbook and quite a few from the XSLT benchmark. Adding format-number() to the list of unimplemented. I will file a bug on the benchmark tests, a good amout of work there. I'd like a review, I think the memory stuff is good, looking at it awake. Thanx to dr and jag for pointing my nose on to my shameless assumptions on the id() impl for standalone. We essentially have none, as we don't resolve DTDs and don't set the doctype, AFAI understood the code. Adding dr to CCs Axel
Target Milestone: --- → mozilla0.9
The number functions should be revisited, to return NaN in error cases instead of 0.0. Axel
fix is in, r=peterv. Peter's code r=me. xpath function lib complete xslt functions key(), format-number(), unparsed-entity-uri(), element-available() and function-available() not yet implemented, but parsed correctly and error handled. Axel
Keywords: review
Sounds good... You should probably be able to implement element-available() and function-available() trivially... I'd suggest closing this bug (as fixed) in favor of specific ones for the small number of leftover bits.
Marking fixed. Bugs have been filed per remaining function.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
We haven't been verifying bugs for quite a while :-(
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: