Closed Bug 307347 Opened 20 years ago Closed 20 years ago

nsSchemaLoader needs to take ns:name into account for ref=""

Categories

(Core Graveyard :: Web Services, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: doronr, Assigned: doronr)

Details

(Keywords: fixed1.8)

Attachments

(1 file)

There are still several places that use ref="" without taking ns:name into account.
Attached patch patchSplinter Review
This fixes all ref="" users.
Attachment #195144 - Flags: superreview?(peterv)
Comment on attachment 195144 [details] [diff] [review] patch >Index: extensions/webservices/schema/src/nsSchemaLoader.cpp >=================================================================== >@@ -2809,25 +2791,28 @@ nsSchemaLoader::ProcessAttribute(nsIWebS >+ nsresult rv = ParseNameAndNS(ref, aElement, ref, refNS); Don't redeclare rv. >@@ -2911,26 +2896,31 @@ nsSchemaLoader::ProcessAttribute(nsIWebS > nsresult > nsSchemaLoader::ProcessAttributeGroup(nsIWebServiceErrorHandler* aErrorHandler, > nsSchema* aSchema, > nsIDOMElement* aElement, > nsISchemaAttributeGroup** aAttributeGroup) > { > nsresult rv; >+ nsresult rv = ParseNameAndNS(ref, aElement, ref, refNS); Don't redeclare rv. >Index: extensions/webservices/schema/src/nsSchemaParticles.cpp >=================================================================== >@@ -305,21 +306,31 @@ NS_IMETHODIMP >+ // use the namespace and type >+ nsCOMPtr<nsISchemaCollection> schemaColl; >+ mSchema->GetCollection(getter_AddRefs(schemaColl)); >+ NS_ENSURE_STATE(schemaColl); >+ >+ // get the right schema >+ nsCOMPtr<nsISchema> schema; >+ schemaColl->GetSchema(mRefNS, getter_AddRefs(schema)); >+ NS_ENSURE_STATE(schema); >+ >+ schema->GetModelGroupByName(mRef, getter_AddRefs(mModelGroup)); Shortcut to |mSchema->GetModelGroupByName(mRef, getter_AddRefs(mModelGroup));| when mRefNS is empty?
Attachment #195144 - Flags: superreview?(peterv)
Attachment #195144 - Flags: superreview+
Attachment #195144 - Flags: review+
checked into trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 195144 [details] [diff] [review] patch No regressions, asking for 1.8b5, needed for XForms and probably also fixes some broken web services..
Attachment #195144 - Flags: approval1.8b5?
Comment on attachment 195144 [details] [diff] [review] patch can you tell us more about the risk here ?
This code is only used by web services, and I checked existing ones and they still worked. There should be no risk here since this code isn't used a lot.
Attachment #195144 - Flags: approval1.8b5? → approval1.8b5+
checked into trunk
Keywords: fixed1.8
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: