Error when object supplied to ixsl:get() is null
Note that if ixsl:call() is called on an object which is null, then this produces a decent XError because it fails a cardinality check: "Required cardinality of first argument of ixsl:call() is exactly one; supplied value is empty at test.xsl#15".
#2 Updated by Debbie Lockett 9 months ago
- Subject changed from Improve error message when object supplied to ixsl:get() is null to Error when object supplied to ixsl:get() is null
- Status changed from New to In Progress
Note that this ensures that (as the documentation states): "ixsl:get($object, "prop") and $object?prop are interchangeable". i.e. these give the same results, including the case when $object is null.
Similarly, if the argument supplied to ixsl:style() is not an Element (i.e. if it is null, or some other object), then we should return an empty map.
Fixes committed on 1.0 and trunk branches.
A number of JS unit tests have been added: ixsl/getEmpty01 - 04, ixsl/styleEmpty01, ixslErr/callErr03.
The documentation needs to be updated to clarify these cases.
#3 Updated by Debbie Lockett 9 months ago
- Status changed from In Progress to Resolved
- Fix Committed on JS Branch 1.0, Trunk added
I have made these changes in the online documentation - to add further details/clarification for how the functions should work, even though bugs like this one remain for now.
Please register to edit this issue