Author |
Message
|
Dave Ziegler |
Posted: Tue May 06, 2014 7:28 am Post subject: Schema Locations |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
When I start a message model, the Toolkit dumps it in my application directory by default, and also creates an IBMdefined folder containing supporting schemas.
If I want to place my schema in another location, what is the proper way to reference that schema in my project such that it can still ref the IBMdefined schemas?
Here is where I'm at presently. I get the problem, just not sure how to fix it (correctly anyway).
c:\workspace\project\FileTransfer.app\IBMdefined\RecordFixLengthFormat.xsd
c:\workspace\schemas\....several dirs....\EnrollmentFormat.xsd (refs ^)
CTDV1439E : DFDL property 'ref' does not refer to a known defineFormat annotation. Value 'RecordFixLengthFieldsFormat'. DFDL schema default format. EnrollmentFormat.xsd /FileTransfer.app/enrollment line 1 Message Broker XSD DFDL Problem
Also, do people leave those IBMdefined schemas alone? Or would it make sense to place these in a location where my custom schemas can reference them? Seems silly to fill my source code repository up with multiple copies of these files. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue May 06, 2014 8:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Leave the IBMDefined schemas alone.
Change the target namespace of your schemas to change the folder they live under. |
|
Back to top |
|
 |
Dave Ziegler |
Posted: Tue May 06, 2014 8:25 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue May 06, 2014 9:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
it works the same way for an XML schema as it does for a DFDL file.
Because DFDL schemas are XML schemas. |
|
Back to top |
|
 |
Dave Ziegler |
Posted: Tue May 06, 2014 9:40 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
So.. back to my original question (and please note the title below my avatar):
If I want to place my schema in another location, what is the proper way to reference that schema in my project such that it can still ref the IBMdefined schemas?
I understand that DFDL schemas are XML schemas, that makes total sense. What I don't know how to do is properly reference (import?) an external file into my project so that it will recognize the IBMdefault stuff. |
|
Back to top |
|
 |
Dave Ziegler |
Posted: Tue May 06, 2014 9:44 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
I think I'm close. I used Advanced and Create links in workspace, that got me a reference. But that's putting an extra folder between my XSD and the app folder, and I believe that's causing the broken ref.
Last edited by Dave Ziegler on Tue May 06, 2014 9:50 am; edited 1 time in total |
|
Back to top |
|
 |
Dave Ziegler |
Posted: Tue May 06, 2014 9:49 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
That was it. Not sure if there is a better way, but changing my xsd:import to "../IBMdefined/RecordFixLengthFieldFormat.xsd" did the trick. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 06, 2014 9:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Not quite the same way.
When you create your dfdl file (starting from scratch), you can specify the folder you want it in. This folder will get created relative to the project you are creating your model in.
In the top level of the dfdl editor you can specify a namespace uri ex
Code: |
uri:<bcomp.com/schemas/dfdl/DeLuxe/Whatever |
The display on the left will then show the xsd as showing up under the uri namespace folder... Play around modifying the uri and you will see the change in uri on the left where the xsd seems to be attached to. It does not appear to change folder though...
Now if you are not talking DFDL but just plain xsds, put them in their rightful namespace folder (outside of the workspace?) and just import the xsds.... (create from wizard)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Dave Ziegler |
Posted: Tue May 06, 2014 10:11 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
The trouble I was having was when I do an import, and choose the option Create links in workspace (so I don't get a copy of the file imported, rather a reference... at least that's my intent), the From directory: dialog allows me to select a directory and a file within that directory, but the reference being added brings the directory name along with the file. So I thought I was importing EnrollmentFormat.xsd, when in fact I was importing enrollment/EnrollmentFormat.xsd. Adding ../ to my XSD reference fixed this. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 06, 2014 10:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Dave Ziegler wrote: |
The trouble I was having was when I do an import, and choose the option Create links in workspace (so I don't get a copy of the file imported, rather a reference... at least that's my intent), the From directory: dialog allows me to select a directory and a file within that directory, but the reference being added brings the directory name along with the file. So I thought I was importing EnrollmentFormat.xsd, when in fact I was importing enrollment/EnrollmentFormat.xsd. Adding ../ to my XSD reference fixed this. |
Glad you found your fix!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|