Closed Bug 101672 Opened 23 years ago Closed 23 years ago

generate-id is overly complicated

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

()

Details

Attachments

(1 file, 1 obsolete file)

our current generate-id() function is unneccesarily complicated. The fastest 
and simplest way to generate the id should be to just convert the node-pointer 
to a string and prepend some string to make sure the id is a valid xml-name.

This is currently blocking orderinfo moving of orderInfo since it was easier to 
remove the use of orderInfo there then to fix how it was used...
Blocks: 94471
Status: NEW → ASSIGNED
+        ExprResult* exprResult = param->evaluate(aContext, aCs);
+        if (!exprResult)
+            return new StringResult();

This is prolly out of mem, so returning a new (even if empty) stringresult
isn't safer and more expressive than just returning 0. IMHO.
Attachment #50832 - Attachment is obsolete: true
Comment on attachment 50872 [details] [diff] [review]
this should do it, ver 2

30 is overkill, use 20. With that, r=peterv.
Attachment #50872 - Flags: review+
Comment on attachment 50872 [details] [diff] [review]
this should do it, ver 2

with "id%08p" -> "id-0x%08p" (16 as well)
r=axel@pike.org
we agreed on irc to go with "id0x%08p" and size 22
Comment on attachment 50872 [details] [diff] [review]
this should do it, ver 2

sr=jst
Attachment #50872 - Flags: superreview+
checked in. Thanks for reviews and superreviews
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: