Closed
Bug 284351
Opened 20 years ago
Closed 20 years ago
nsSchemaLoader doesn't handle xsd:complexType correctly.
Categories
(Core Graveyard :: Web Services, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: doronr, Assigned: doronr)
Details
Attachments
(2 files, 2 obsolete files)
2.05 KB,
patch
|
peterv
:
superreview-
|
Details | Diff | Splinter Review |
2.04 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
So I have a schema file with:
<xsd:complexType name="MoneyLaundering">
<xsd:annotation>
<xsd:documentation>Electronic Money Laundering</xsd:documentation>
</xsd:annotation>
<xsd:sequence maxOccurs="unbounded">
<xsd:element ref="ml:individual"/>
</xsd:sequence>
</xsd:complexType>
http://lxr.mozilla.org/seamonkey/source/extensions/webservices/schema/src/nsSchemaLoader.cpp#1305
is called on the annotation node, and
http://lxr.mozilla.org/seamonkey/source/extensions/webservices/schema/src/nsDOMUtils.h#119
results in the mathml namespace.
Comment 1•20 years ago
|
||
Where does nsMathMLAtoms come in? Is there a testcase that shows the bug?
Note that there is a nsMathMLAtoms::annotation_ atom that maps to the string
"annotation". But that would be the tagname, not the namespace here...
Assignee | ||
Comment 2•20 years ago
|
||
I'm working on a testcase. It seems the DOMElement for the xsd:annotation node
uses nsMathMLAtoms:Annotation for its mName.
I thought this was failing:
http://lxr.mozilla.org/seamonkey/source/extensions/webservices/schema/src/nsSchemaLoader.cpp#1323
since we seem to get into the last else{} but I am told that compating atoms who
define "annotation" should be equal. I'll find out more tomorrow.
This bug was more of a reminder for me on what I found out and to include in my
status report :)
Comment 3•20 years ago
|
||
> It seems the DOMElement for the xsd:annotation node uses
> nsMathMLAtoms:Annotation for its mName.
That's fine, and the expected behavior under the circumstances. Why is this a
problem?
Assignee | ||
Comment 4•20 years ago
|
||
Assignee: web-services → doronr
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #176047 -
Attachment is obsolete: true
Assignee | ||
Comment 6•20 years ago
|
||
Spec is here:
http://w3.org/TR/xmlschema-1/#element-complexType
Oops, patch had tabs, going to fix that in a sec.
Summary: xsd:annotation becomes nsMathMLAtoms:Annotation → nsSchemaLoader doesn't handle xsd:complexType correctly.
Assignee | ||
Comment 7•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #176049 -
Attachment is obsolete: true
Attachment #176050 -
Flags: superreview?(peterv)
Assignee | ||
Comment 8•20 years ago
|
||
The problem here was simple - if we hit annotation, we would bail, saying its
invalid, while all other items were processed:
else if (tagName != nsSchemaAtoms::sAnnotation_atom) {
} else {
}
This patch follows the spec and bails on any item not allowed in the spec,
rather than trying to process ones we know aren't allowed. Also, it handles
annotations and currently does nothing with them.
Comment 9•20 years ago
|
||
Comment on attachment 176050 [details] [diff] [review]
remove tabs.
You could remove all the else-after-break's too. But shouldn't we actually
continue looping after finding an annotation? With this patch we'll ignore the
simpleContent/complexContent/... coming after the annotations.
Attachment #176050 -
Flags: superreview?(peterv) → superreview-
Assignee | ||
Comment 10•20 years ago
|
||
Ah, so just removing the break; from the annotation condition should do it, right?
Assignee | ||
Comment 11•20 years ago
|
||
Attachment #176737 -
Flags: superreview?(peterv)
Comment 12•20 years ago
|
||
Comment on attachment 176737 [details] [diff] [review]
don't break when we find an annotation
Sure, but if you can, please remove the else's after a break, they're not
needed.
Attachment #176737 -
Flags: superreview?(peterv)
Attachment #176737 -
Flags: superreview+
Attachment #176737 -
Flags: review+
Assignee | ||
Comment 13•20 years ago
|
||
checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•