Closed Bug 335367 Opened 15 years ago Closed 15 years ago

Add support for <xsd:import>

Categories

(Core Graveyard :: XForms, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspeiche, Assigned: sspeiche)

References

()

Details

(Keywords: fixed1.8.0.9, fixed1.8.1)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

In utilizing reword XML-based applications, their data models are most often
represented in reusable modules utilizing the XML Schema construction
<xsd:import> (different namespace)

This is the case of schemas I/we have seen usage from many organizations

(opening separate enhancement request for xsd:include (bug 335366) and xsd:redefine, as they have different priorities and may require different amount of effort). 

Reproducible: Always
Assignee: aaronr → xforms
Have done some investigation with this, trying to get targetNamespace handling right as well.

Here's a high-level of possible changes in schema loader to make this work right:
- add member variable to nsSchema for storing parent schema, like: mParent
- add member variable to nsSchema for storing virtual/implied targetNamespace, say: mImpliedTargetNamespace
- perhaps a method to nsSchema for determining implied schema by traversing mParents
- update ProcessSchemaElement to not cache Schemas based on targetNamespace, as there can be many schemas in the include/import chain with same targetNamespace.  Perhaps use schemaLoc (abs) as key instead.

trying not to change the method signature for ProcessSchemaElement or Load, as it will affect WSDLLoader and XForms

feedback/input welcome
I think we can live with the targetNamespace caching for now, so that you can only have one schema per namespace referenced.

If 2 schemas import the same namespace, I doubt they will import 2 different schema files.

For firefox 2.0, we won't get a major change like adding multiple schems per namespace and a parent chain etc, so I think focusing on the easy fix would be best.

For Firefox 3.0, the plan is to remove web services anyways, and I'll probably move schema parsing into its own extension then, which we ship and maintain.
Status: UNCONFIRMED → NEW
Ever confirmed: true
A prelim patch that is based off of include work (bug 335366) that hasn't been checked in.  I also have updates to schema-val tests for this.
Depends on <xsd:include> support provided in bug 335366, which has been completed.

if patch approved, doronr can you assist me in getting it into appropriate branches?
Attachment #226335 - Flags: review?(doronr)
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

looks good, the targetName requirements for inport (it can't be defined) needs to be checked, but that is part of the XXX:ed part.
Attachment #226335 - Flags: review?(doronr) → review+
Adding dependency on <xsd:include>
Depends on: 335366
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

As with doronr's <xsd:include> enh, would like <xsd:import> for ff2.0
Attachment #226335 - Flags: review?(peterv)
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

change is simple enough to not need an additional r.
Attachment #226335 - Flags: review?(peterv)
checked into trunk
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

This would be a nice to have for XForms on the 1.8.1 branch.  The code change is minimal and low-risk - most of the patch is comment and testsuite changes.
Attachment #226335 - Flags: approval1.8.1?
Attachment #226335 - Flags: approval1.8.1? → approval1.8.1+
thanks for approval.
Keywords: fixed1.8.1
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

asking for 1.8.0.x approval
Attachment #226335 - Flags: approval1.8.0.7?
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

1.8.0.7 is done and gone.
Attachment #226335 - Flags: approval1.8.0.8?
Attachment #226335 - Flags: approval1.8.0.7?
Attachment #226335 - Flags: approval1.8.0.7-
Attachment #226335 - Flags: approval1.8.0.8? → approval1.8.0.9?
Comment on attachment 226335 [details] [diff] [review]
patch + schema-val updated test cases

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #226335 - Flags: approval1.8.0.9? → approval1.8.0.9+
Assignee: xforms → sspeiche
Whiteboard: xf-to-branch → xf-to-branch [checkin needed (1.8.0 branch)]
checked into MOZILLA_1_8_0_BRANCH
Keywords: fixed1.8.0.9
Whiteboard: xf-to-branch [checkin needed (1.8.0 branch)]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.