Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330017 - Relative import location can not be resolved when resource URI is relative
Summary: Relative import location can not be resolved when resource URI is relative
Status: RESOLVED FIXED
Alias: None
Product: MDT.BPMN2
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 11:39 EST by Henning Heitkoetter CLA
Modified: 2010-11-15 05:32 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Heitkoetter CLA 2010-11-11 11:39:16 EST
The value of the location attribute of import elements should be interpreted as relative to the URI of the importing document.

Example:
Document /absolute/path/to/A.bpmn2 has an import element with location="subfolder/B.bpmn2". This should be resolved as "/absolute/path/to/subfolder/B.bpmn2".

At the moment, this only works if the BPMNResource of the importing document (A) that contains the import element is created with an absolute URI. If the resource has a relative URI (which should be common when constructing BPMN models), a relative import location can not be (de)resolved, as location and resource/base URI are relative.
(With the current implementation, it works if the import location is relative to the working directory instead of the importing document, which is not what we want, because the working directory of a program execution can change and has no meaning for the BPMN model.)

As a second way of specifying the import location, we should also support absolute URIs in the location attribute.
Comment 1 Henning Heitkoetter CLA 2010-11-11 12:01:35 EST
This affects saving and loading, so BpmnXmlHelper.getNsPrefix (for saving) and ~.getPathForPrefix or QNameURIHandler.resolve (for loading) need to be adapted.
Comment 2 Henning Heitkoetter CLA 2010-11-15 05:32:21 EST
Fixed in e9996e93e211031c6f1f6c263aa9dbbcb9ba2b11
Preceding commits introduce corresponding test cases.