Closed Bug 232591 Opened 21 years ago Closed 21 years ago

Expose name validation methods from the XML parser (expat)

Categories

(Core :: XML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: jst, Assigned: peterv)

References

Details

Attachments

(2 files, 1 obsolete file)

We've got bugs in our code due to the lack of code that can check if a string is
a valid XML name (qname or just name, etc). It'd be totally cool if the XML
parser could expose such functionality, since it already has it, for sure.
ideally nsIExpatSink should have namespaced methods rather then the current ones
IMHO. That way we wouldn't need to resolve namespaces in so many different
codepaths.

Btw, i just noticed yesterday that xul-sink sets the wrong namespace to
attributes named 'xmlns' (kNameSpaceID_None rather then kNameSpaceID_XMLNS)
True, but we still need this for validation of names in places like
document.createElement() etc.
Attached patch v1 (transformiix) (obsolete) — Splinter Review
This converts Transformiix to use the new stuff and removes the implementation
that we had in Transformiix.
Comment on attachment 140449 [details] [diff] [review]
v1 (expat/htmlparser)

What do you think? Note that I have a patch for bug 16603 that adds the
necessary calls to all the DOM methods that need this (I'm holding off on
attaching that until we finalize this one).
Attachment #140449 - Flags: superreview?(jst)
tx part looks good to me
Comment on attachment 140449 [details] [diff] [review]
v1 (expat/htmlparser)

sr=jst
Attachment #140449 - Flags: superreview?(jst) → superreview+
Much to my surprise, when running XSLBench (not a really good testcase for these
changes, but anyway) almost all tests got a very small speedup.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.7alpha
Attachment #140449 - Flags: review?(axel)
Now with Makefiles
Attachment #140450 - Attachment is obsolete: true
Attachment #140548 - Flags: superreview?(jst)
Attachment #140548 - Flags: review?(axel)
Blocks: 16603
Attachment #140449 - Flags: review?(axel) → review+
Comment on attachment 140548 [details] [diff] [review]
v1 (transformiix)

sr=jst
Attachment #140548 - Flags: superreview?(jst) → superreview+
Attachment #140548 - Flags: review?(axel) → review+
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: