Hello everyone,
I am trying to Import a Reqif file into Doors. Therefore I searching the web for two whole days now. The conclusion from These two days is that I have found a Forum post about importing a XML file "https://www.ibm.com/developerworks/community/forums/html/topic?id=544057af-4813-4771-8331-391eee193334" and I found a function in the doors manual which could perform what I want. string importRifFile(string RifFilename, Folder parent, string targetName,string targetDesc, string RifDefName, string RifDefDescription, DB parent) Additionaly I've read a Bachelor examation("http://www.lab4inf.fh-muenster.de/lab4inf/docs/thesis/BA_Besstschastnich.pdf") on the thopic what the Rif format is ,how it works and how you could work with it. All together it was good for a general understanding what Rif is doing, how it works, that it is based on XML and I assume Reqif is working simiarly. But on every Topic I missing something to understand it completly and how to Import it correctly. For example I never worked with XML like files before and my knowlege about it is also a bit shaky. Furthermore the Ole system is also fairly new for me due to my inability to find easily understandable Information about it. And to according to the informaton above a stable understanding about XML and OLE seems to be required.
If you need any further imformation about my problem feel free to ask.
Thank you in advance, Patrick Patrick_1 - Tue Jul 31 04:49:01 EDT 2018 |
Re: Import Reqif file into Doors Well first of all, what is your problem ;-) ? ReqIF is similar to RIF but different of course. To understand ReqIF you will indeed probably need some basic understanding about XML Schemas (because you may want to read the ReqIF schema) and you should understand XML namespaces. OLE objects are not part of ReqIF (ReqIF like RIF knows file attachments). On import to DOORS they need to be converted into OLE objects, but DOORS does that more or less automatically. As soon as you want to influence how they look (size, etc.) it becomes more ugly. So if you can come up with specific questions, then feel free - although in my opionion: Making Yet Another ReqIF importer for DOORS classic hardly makes sense (except for educational purposes). Regards, Mathias |
Re: Import Reqif file into Doors I do not think that to use ReqIF export / import tools in DOORS you would have to know XML. Just how you configure and use ReqIF in DOORS. DOORS Help on RIF / ReqIF https://www.ibm.com/support/knowledgecenter/en/SSYQBZ_9.5.2/com.ibm.doors.administering.doc/topics/c_aboutRIF.html |
Re: Import Reqif file into Doors Mathias Mamsch - Tue Jul 31 06:15:00 EDT 2018 Well first of all, what is your problem ;-) ? ReqIF is similar to RIF but different of course. To understand ReqIF you will indeed probably need some basic understanding about XML Schemas (because you may want to read the ReqIF schema) and you should understand XML namespaces. OLE objects are not part of ReqIF (ReqIF like RIF knows file attachments). On import to DOORS they need to be converted into OLE objects, but DOORS does that more or less automatically. As soon as you want to influence how they look (size, etc.) it becomes more ugly. So if you can come up with specific questions, then feel free - although in my opionion: Making Yet Another ReqIF importer for DOORS classic hardly makes sense (except for educational purposes). Regards, Mathias Okay In general my problem is to find for me understandable information how to realise the Import. I don't get an anchor from which I can expand. everything I found until now was either to specific for me to understand or it was to far of topic. I am missing Information of Dxl functions to use and especially how to use the ones I found, in this case, for example I know that I have to read in the ReqIF file but I wonder if there is a specific function to read the file in or is the normal file Stream enough. And after this do I have to encrypt the Information from the XML formating manualy or are there preset fonctions for it? I wasn't able to find consisten Information about it.
Stream s = read("");
And I could describe my aim a bit more. I want to read in a ReqIF file and write ist content into a Module at least some special "areas" from it. I hope my Problem is now a bit clearer if not I will try it again.
Kind regards, Patrick |
Re: Import Reqif file into Doors PekkaMakinen - Tue Jul 31 06:33:12 EDT 2018 I do not think that to use ReqIF export / import tools in DOORS you would have to know XML. Just how you configure and use ReqIF in DOORS. DOORS Help on RIF / ReqIF https://www.ibm.com/support/knowledgecenter/en/SSYQBZ_9.5.2/com.ibm.doors.administering.doc/topics/c_aboutRIF.html I found this Topic too but unfortunately I dont have the ability to follow this instructions due to the lack of the |
Re: Import Reqif file into Doors Patrick_1 - Tue Jul 31 07:52:16 EDT 2018 I found this Topic too but unfortunately I dont have the ability to follow this instructions due to the lack of the > missing Import Option Hm, perhaps you do not have enough access rights? Excerpt from https://www.ibm.com/support/knowledgecenter/en/SSYQBZ_9.6.0/com.ibm.doors.administering.doc/topics/t_importingaRIFpackage.html#t_importingaRIFpackage: You must have the power to partition data, and admin access to the project.
> write its content into […] some special "areas" from it. Oh dear, if this is really your requirement, you have quite a big task, I don't think that the ReqIf importer can be configured in any way to import only some things somewhere. Unzipping the reqifz file in DXL might be difficult, for reading XML files, search for "XML Import" in this forum, e.g. look at https://www.ibm.com/developerworks/community/forums/html/topic?id=544057af-4813-4771-8331-391eee193334. There are some products on the market that import ReqIF to DOORS. |
Re: Import Reqif file into Doors Mike.Scharnow - Tue Jul 31 08:27:42 EDT 2018 > missing Import Option Hm, perhaps you do not have enough access rights? Excerpt from https://www.ibm.com/support/knowledgecenter/en/SSYQBZ_9.6.0/com.ibm.doors.administering.doc/topics/t_importingaRIFpackage.html#t_importingaRIFpackage: You must have the power to partition data, and admin access to the project.
> write its content into […] some special "areas" from it. Oh dear, if this is really your requirement, you have quite a big task, I don't think that the ReqIf importer can be configured in any way to import only some things somewhere. Unzipping the reqifz file in DXL might be difficult, for reading XML files, search for "XML Import" in this forum, e.g. look at https://www.ibm.com/developerworks/community/forums/html/topic?id=544057af-4813-4771-8331-391eee193334. There are some products on the market that import ReqIF to DOORS. > missing Import Option I don't think that I get higher rights in this Project
> write its content into […] some special "areas" from it Basicaly a complete Import would be fine to me too. A partionized Import isn't required . I found this post to and I tried a script from this post out. And there I ran in an error which I couldn't solve. I got the error that dxl couldn't open the file. furthermore I tried it with .reqif and .xml both recived the error.
dxl:7 cannot open file (C:/Users/Name/Documents/TO-DO/Tasks/compare/test.xml) for reading (Invalid Argument)
//Stream input = read "C:/Users/Name/Documents/TO-DO/Tasks/compare/test.reqif";
//Stream input = read "C:/Users/Name/Documents/TO-DO/Tasks/compare/test.xml";
Buffer stringXML = create;
string str;
while (true) {
input >> str;
stringXML += str;
if (end of input) break;
}
DOM_Document_ domDoc = parseXMLBuffer_(stringXML);
DOM_Element_ domRoot = getDocumentElement_(domDoc);
DOM_Element_ domLoop;
for domLoop in domRoot do{
string szTag = getElementName_(domLoop);
string szText = getElementText_(domLoop);
string szAttr = "";
if(hasAttribute_(domLoop, "additional")){
szAttr = getStringAttribute_(domLoop, "additional");
}
print "Tag: "szTag" - Text: "szText" - Additional:"szAttr"\n";
if(hasChildElements_(domLoop)){
DOM_Element_ domChildLoop;
print "Children:\n";
int i = 1;
for domChildLoop in domLoop do{
print i"\n";
i++;
}
}
}
>There are some products on the market that import ReqIF to DOORS. And I don't think I am able to spent money on an importer(if required).
|
Re: Import Reqif file into Doors Patrick_1 - Tue Jul 31 09:30:37 EDT 2018 > missing Import Option I don't think that I get higher rights in this Project
> write its content into […] some special "areas" from it Basicaly a complete Import would be fine to me too. A partionized Import isn't required . I found this post to and I tried a script from this post out. And there I ran in an error which I couldn't solve. I got the error that dxl couldn't open the file. furthermore I tried it with .reqif and .xml both recived the error.
dxl:7 cannot open file (C:/Users/Name/Documents/TO-DO/Tasks/compare/test.xml) for reading (Invalid Argument)
//Stream input = read "C:/Users/Name/Documents/TO-DO/Tasks/compare/test.reqif";
//Stream input = read "C:/Users/Name/Documents/TO-DO/Tasks/compare/test.xml";
Buffer stringXML = create;
string str;
while (true) {
input >> str;
stringXML += str;
if (end of input) break;
}
DOM_Document_ domDoc = parseXMLBuffer_(stringXML);
DOM_Element_ domRoot = getDocumentElement_(domDoc);
DOM_Element_ domLoop;
for domLoop in domRoot do{
string szTag = getElementName_(domLoop);
string szText = getElementText_(domLoop);
string szAttr = "";
if(hasAttribute_(domLoop, "additional")){
szAttr = getStringAttribute_(domLoop, "additional");
}
print "Tag: "szTag" - Text: "szText" - Additional:"szAttr"\n";
if(hasChildElements_(domLoop)){
DOM_Element_ domChildLoop;
print "Children:\n";
int i = 1;
for domChildLoop in domLoop do{
print i"\n";
i++;
}
}
}
>There are some products on the market that import ReqIF to DOORS. And I don't think I am able to spent money on an importer(if required).
> no money to buy a tool Well, considering all the things to remember when importing data from a .reqif file and dependent on the requirements your importer has (initial import, later updates, OLE objects, links etc. etc .etc) it might be that your employer has to decide whether to spend some money on a tool or whether he wants to keep you occupied on this tasks for several weeks? months?
> no access rights. Perhaps you can request a project for yourself that you might accidentally "destroy" that is only used for the ReqIF import. And later, do a second script that somehow transports the data with less access rights from your project to the destination project. Besides, you should always do things like this in a test database first. There, you should get enough access rights.
> cannot open file I have no problem with your script, I tried it with one reqif file that I created some minutes ago (attached) and got the expected result Tag: THE-HEADER - Text: - Additional: Children: 1 Tag: CORE-CONTENT - Text: - Additional: Children: 1 Tag: TOOL-EXTENSIONS - Text: - Additional: Children: 1 Perhaps it is just a matter of directories? Use either Unix convention (with slash / as the directory separator) or DOS convention with an escaped backslash \\ as the separator). I used both Stream input = read "d:/xchg/_customerPreject.reqif" and Stream input = read "d:\\xchg\\_customerPreject.reqif" and both variants worked
Attachments _customerPreject.reqif |
Re: Import Reqif file into Doors Mike.Scharnow - Tue Jul 31 09:58:40 EDT 2018 > no money to buy a tool Well, considering all the things to remember when importing data from a .reqif file and dependent on the requirements your importer has (initial import, later updates, OLE objects, links etc. etc .etc) it might be that your employer has to decide whether to spend some money on a tool or whether he wants to keep you occupied on this tasks for several weeks? months?
> no access rights. Perhaps you can request a project for yourself that you might accidentally "destroy" that is only used for the ReqIF import. And later, do a second script that somehow transports the data with less access rights from your project to the destination project. Besides, you should always do things like this in a test database first. There, you should get enough access rights.
> cannot open file I have no problem with your script, I tried it with one reqif file that I created some minutes ago (attached) and got the expected result Tag: THE-HEADER - Text: - Additional: Children: 1 Tag: CORE-CONTENT - Text: - Additional: Children: 1 Tag: TOOL-EXTENSIONS - Text: - Additional: Children: 1 Perhaps it is just a matter of directories? Use either Unix convention (with slash / as the directory separator) or DOS convention with an escaped backslash \\ as the separator). I used both Stream input = read "d:/xchg/_customerPreject.reqif" and Stream input = read "d:\\xchg\\_customerPreject.reqif" and both variants worked
> no access rights. I will consider this Option thank you.
> cannot open file Thank you, with this tipp I was able to read in a reqif and a XML file using the build in Doors XML reader. Now I'll try to learn how it works and hopefully I can achieve some satisfying results. Any hints/tipps where I can find a doucmentation or explained syntax about the DOM functions are welcome. And thank you all for your help. |
Re: Import Reqif file into Doors Patrick_1 - Mon Aug 13 03:09:59 EDT 2018 > no access rights. I will consider this Option thank you.
> cannot open file Thank you, with this tipp I was able to read in a reqif and a XML file using the build in Doors XML reader. Now I'll try to learn how it works and hopefully I can achieve some satisfying results. Any hints/tipps where I can find a doucmentation or explained syntax about the DOM functions are welcome. And thank you all for your help. Sorry for being not very helpful on this one, but just to be very clear and you cannot say you have not been warned: - You will likely be successful for a very basic text import from ReqIF to DOORS - You will very likely fail on the following topics which are hard to solve problems and are either tedious or need very special lowlevel knowledge to get right:
So unless this project is for educational purposes, feel free - if this project is a timelined project with real customer requirements - at all costs - see that you get your employer to buy a proprietary solution or try to use the builtin DOORS functionality. Just my two cents - Regards, Mathias |