generate-id is overly complicated

VERIFIED FIXED

Status

()

Core
XSLT
VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

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...
Created attachment 50832 [details] [diff] [review]
this should do it
Blocks: 94471
Status: NEW → ASSIGNED

Comment 2

16 years ago
+        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.
Created attachment 50872 [details] [diff] [review]
this should do it, ver 2
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 5

16 years ago
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
Last Resolved: 16 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.