Open
Bug 143291
Opened 23 years ago
Updated 2 years ago
function parameters should be checked at parse time
Categories
(Core :: XSLT, defect)
Core
XSLT
Tracking
()
ASSIGNED
People
(Reporter: axel, Assigned: peterv)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
46.71 KB,
patch
|
Details | Diff | Splinter Review |
currently, FunctionCalls check their params at eval time, but that should happen
on parsing.
One way to do this could be to have a |validate| call after we are done parsing,
ExprParser::createExpr(const String& aExpression, txIParseContext* aContext).
That call could go recursivly through the entire tree of expressions and
nodetests. It could possibly also move some more validations steps from evaltime
to parsetime if we can think of any
I'll have a stab at this once the branch has landed
Assignee: peterv → sicking
When doing this we need to keep forwards-compatible-processing in mind. The spec
says that in fcp "if the expression calls a function with a number of arguments
that XSLT does not allow or with arguments of types that XSLT does not allow,
then an error must not be signaled unless the function is actually called."
Either we could call the validate function in ExprParser::createFunctionCall and
replace the function with a ErrorExpr if validate returned false and f-c-p is
enabled.
Or we could let validate take an |MBool aFCPEnabled| argument and replace all
subexpressions that doesn't validate with ErrorExpr if f-c-p is enabled.
Reporter | ||
Comment 4•21 years ago
|
||
taking, patch coming up. This is subject of merges to come, I guess.
Assignee: bugmail → axel
Reporter | ||
Comment 5•21 years ago
|
||
Comment on attachment 132749 [details] [diff] [review]
Add FunctionCall::CheckParams to test for param count (may test expr return type in the future)
This breaks f-c-p. "false() && not()" must not fail in f-c-p. Behaviour in
non-fcp is ok either way.
Reporter | ||
Comment 7•21 years ago
|
||
re #6, I don't think that this is crucial in any way.
"false() && not()" is a counterproductive example, and there are no productive
ones, AFAICT. The logic in itself only works for binary functions, and only if
false is an acceptable default value.
Let alone that there isn't that much to be forwards compatible in the first place.
I vote for leaving the spec as it wants to be here and do something useful.
Assignee | ||
Comment 8•18 years ago
|
||
This depends on bug 361441.
Assignee | ||
Comment 9•16 years ago
|
||
Updated to trunk.
Attachment #250053 -
Attachment is obsolete: true
Updated•15 years ago
|
QA Contact: keith → xslt
Assignee | ||
Comment 10•15 years ago
|
||
Attachment #324774 -
Attachment is obsolete: true
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•