Closed
Bug 285207
Opened 20 years ago
Closed 20 years ago
Need to handle inline schema
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aaronr, Assigned: doronr)
Details
Attachments
(2 files, 1 obsolete file)
|
1.98 KB,
application/xhtml+xml
|
Details | |
|
8.29 KB,
patch
|
aaronr
:
review+
|
Details | Diff | Splinter Review |
As noted in http://www.w3.org/TR/xforms/index-all.html#concepts-model, we need to be able to handle inline schema.
| Assignee | ||
Comment 2•20 years ago
|
||
this patch fixes several issues: - mSchemas needs to be QI'ed to nsISchemaCollection, not nsISchema - handle schemas without a target namespace (affects schema-validation and xforms) - load inline schemas
Attachment #177396 -
Flags: review?(aaronr)
Comment on attachment 177396 [details] [diff] [review] le patch @@ -805,11 +808,13 @@ aType.Assign(NS_LITERAL_STRING("string")); rv = NS_OK; } else { - // get the namespace url from the prefix - nsCOMPtr<nsIDOM3Node> domNode3 = do_QueryInterface(mElement, &rv); - NS_ENSURE_SUCCESS(rv, rv); - - rv = domNode3->LookupNamespaceURI(schemaTypePrefix, aNSUri); + if (!schemaTypePrefix.IsEmpty()) { + // get the namespace url from the prefix + nsCOMPtr<nsIDOM3Node> domNode3 = do_QueryInterface(mElement, &rv); + NS_ENSURE_SUCCESS(rv, rv); + + rv = domNode3->LookupNamespaceURI(schemaTypePrefix, aNSUri); + } } return rv; } Only change that I'd make would be to make sure that aNSUri has a value (even if it is empty) when nsXFormsModelElement::GetTypeAndNSFromNode returns. Right now if there is no prefix, then aNSUri won't get assigned a value. Also, can't you move all of the schema processing from HandleEvent to FinishConstruction(), too? Might as well put it all in one place.
Attachment #177396 -
Flags: review?(aaronr) → review-
| Assignee | ||
Comment 4•20 years ago
|
||
Moving the code may break things and isn't in the scope of this bug :)
Attachment #177396 -
Attachment is obsolete: true
Attachment #177526 -
Flags: review?(aaronr)
Comment on attachment 177526 [details] [diff] [review] 2.0 I guess that we'll suffer with schema in two seperate places for now. *sigh*.
Attachment #177526 -
Flags: review?(aaronr) → review+
| Assignee | ||
Comment 6•20 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•