Issue 3335: how to extend BSA DTF? (biomolecular-ftf) Source: Japan Biological Informatics Consortium (Mr. Martin Senger, martin.senger@gmail.com) Nature: Uncategorized Issue Severity: Summary: The question is how to extend BSA metadata to be able to include additional vendor-specific tags. Originally, I have suggested tag <extension> of type ANY to be used for these specific tags. However, in that time my understanding of ANY was wrong. I thought that an element of type ANY can have any data including new tags. Which was a wrong assumption. One can use only tags (any of them) defined in the DTD. So now my understanding is that if I need a vendor-specific tags, I need to extend DTD. The XML books say that an internal DTD has priority over an external DTD and that document authors can override things using their own internal DTD. Is this the way how to extend BSA metadata? I have tried. Here is an example of an extended XML file with an internal DTD defined new tags: <?xml version = "1.0"?> <!DOCTYPE DsLSRAnalysis SYSTEM "http://localhost/openBSA/docs/DsLSRAnalysis.dtd" [ <!ELEMENT extension (part1?,part2?,part3*)> <!ELEMENT part1 ANY> <!ELEMENT part2 ANY> <!ELEMENT part3 ANY> ]> <DsLSRAnalysis> <analysis type = "search.list"> <extension> <part1> this is part 1 </part1> </extension> </analysis> </DsLSRAnalysis> Unfortunately, this does not pass validation tests. I am getting an error saying "Error at (file http://....DsLSRAnalysis.dtd, line 13, char 25): Duplicate element name, "extension". Any ideas what I am doing wrong, or what is the correct way how to extend BSA metadata? Is the element <extension> in BSA DTD useable at all? If yes, how can be used, if not, should we re-consider it in the FTF? Resolution: Accepted. A valid DTD was defined. Revised Text: Replace the appendix D.1 "File: DsLSRAnalysis.dtd" by the following: <!ELEMENT DsLSRAnalysis (analysis)+> <!ELEMENT analysis (description?, input*, output*, analysis_extension?)> <!ATTLIST analysis type CDATA #REQUIRED name CDATA #IMPLIED version CDATA #IMPLIED supplier CDATA #IMPLIED installation CDATA #IMPLIED> <!ELEMENT description ANY> <!ELEMENT input (default?, allowed*, input_extension?)> <!ATTLIST input type CDATA #REQUIRED name CDATA #REQUIRED mandatory (true|false) "false"> <!ELEMENT default (#PCDATA)> <!ELEMENT allowed (#PCDATA)> <!ELEMENT output (output_extension?)> <!ATTLIST output type CDATA #REQUIRED name CDATA #REQUIRED> <!ENTITY % vendor_analysis_tags "<!ELEMENT analysis_extension EMPTY>"> <!ENTITY % vendor_input_tags "<!ELEMENT input_extension EMPTY>"> <!ENTITY % vendor_output_tags "<!ELEMENT output_extension EMPTY>"> %vendor_analysis_tags; %vendor_input_tags; %vendor_output_tags; Actions taken: February 21, 2000: received issue May 24, 2001: closed issue Discussion: End of Annotations:===== Date: Mon, 21 Feb 2000 13:33:27 +0000 (GMT) From: Martin Senger To: biomolecular-ftf@emerald.omg.org Subject: how to extend BSA DTF? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: cZ`!!]6""!ZD%!!6NO!! Hi all, I have a question about BSA metadata and I am not sure if the problem is in our DTD or (more probably) in my understanding. Therefore I would like to ask you to discuss it here a bit. Thanks for your time. The question is how to extend BSA metadata to be able to include additional vendor-specific tags. Originally, I have suggested tag of type ANY to be used for these specific tags. However, in that time my understanding of ANY was wrong. I thought that an element of type ANY can have any data including new tags. Which was a wrong assumption. One can use only tags (any of them) defined in the DTD. So now my understanding is that if I need a vendor-specific tags, I need to extend DTD. The XML books say that an internal DTD has priority over an external DTD and that document authors can override things using their own internal DTD. Is this the way how to extend BSA metadata? I have tried. Here is an example of an extended XML file with an internal DTD defined new tags: ]> this is part 1 Unfortunately, this does not pass validation tests. I am getting an error saying "Error at (file http://....DsLSRAnalysis.dtd, line 13, char 25): Duplicate element name, "extension". Any ideas what I am doing wrong, or what is the correct way how to extend BSA metadata? Is the element in BSA DTD useable at all? If yes, how can be used, if not, should we re-consider it in the FTF? Thanks for your time and answers. Martin -- Martin Senger EMBL Outstation - Hinxton Senger@EBI.ac.uk European Bioinformatics Institute Phone: (+44) 1223 494636 Wellcome Trust Genome Campus (Switchboard: 494444) Hinxton Fax : (+44) 1223 494468 Cambridge CB10 1SD United Kingdom http://industry.ebi.ac.uk/~senger Date: Mon, 21 Feb 2000 13:25:04 -0500 From: Michael Petrin Organization: Concept 5 Technologies X-Mailer: Mozilla 4.07 [en] (WinNT; U) MIME-Version: 1.0 To: Martin Senger CC: biomolecular-ftf@emerald.omg.org Subject: Re: how to extend BSA DTF? References: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: %)6e9'k_d9%MSd99i"!! Hi Martin. 1) The ANY can contian any tags. So, the document will be well formed with anything (with legal syntax) in the ANY. However, for it to be valid with respect to a DTD, all tags must exist in a referenced DTD(internal or external). 2) You suggested redefining the "extension" tag for each document to use it. We don't recommend doing that for the sake of clarlity. Just define the "extension" as an ANY and the following will work (the definition of "extension" comes from the DsLSRAnalysis.dtd DTD). ]> this is part 1 This solution does the same thing that you suggested, but is less complex. Another possible solution would be to create your own extension. This would be done by: This would allow you to specify the tag constraints, but is a more proprietary solution and doesn't use the extension defined in DsLSRAnalysis.dtd. 3) We would suggest the use of XML namespaces in your DTD, just as a matter of good DTD programming style. I realize that this was just an example to illustrate your questions, but thought I'd mention it. 4) For an example of the use of ANYs for extensions, see the OMG's XMI definition of the XMI.extension and XMI.extensions tags. The current design allows (since tags can be put in the ANY), but does not facilitate designating the type of extension. This will make it impossible for processing software to know what specialized processing to apply to the document. This is a problem if you want to get information out of the document. XMI uses an attribute of the extension tag to say who the "extender" is so appropriate processing can be applied. Hope this helps, Michael Martin Senger wrote: > Hi all, > I have a question about BSA metadata and I am not sure if the > problem > is in our DTD or (more probably) in my understanding. Therefore I > would > like to ask you to discuss it here a bit. Thanks for your time. > The question is how to extend BSA metadata to be able to include > additional vendor-specific tags. > Originally, I have suggested tag of type ANY to be > used for > these specific tags. However, in that time my understanding of ANY > was > wrong. I thought that an element of type ANY can have any data > including > new tags. Which was a wrong assumption. One can use only tags (any > of > them) defined in the DTD. > So now my understanding is that if I need a vendor-specific tags, > I > need to extend DTD. The XML books say that an internal DTD has > priority > over an external DTD and that document authors can override things > using > their own internal DTD. Is this the way how to extend BSA metadata? > I have tried. Here is an example of an extended XML file with an > internal DTD defined new tags: > > > "http://localhost/openBSA/docs/DsLSRAnalysis.dtd" [ > > > > > ]> > > > > > this is part 1 > > > > > Unfortunately, this does not pass validation tests. I am getting > an > error saying "Error at (file http://....DsLSRAnalysis.dtd, line 13, > char > 25): Duplicate element name, "extension". > > Any ideas what I am doing wrong, or what is the correct way how > to > extend BSA metadata? Is the element in BSA DTD useable > at all? > If yes, how can be used, if not, should we re-consider it in the > FTF? > > Thanks for your time and answers. > Martin > > -- > Martin Senger > > EMBL Outstation - Hinxton Senger@EBI.ac.uk > European Bioinformatics Institute Phone: (+44) 1223 494636 > Wellcome Trust Genome Campus (Switchboard: 494444) > Hinxton Fax : (+44) 1223 494468 > Cambridge CB10 1SD > United Kingdom > http://industry.ebi.ac.uk/~senger Date: Mon, 21 Feb 2000 21:52:06 +0000 (GMT) From: Martin Senger To: Michael Petrin cc: biomolecular-ftf@emerald.omg.org, Alan Robinson Subject: Re: how to extend BSA DTF? In-Reply-To: <38B182FF.FCFDFB54@concept5.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: %Ggd9*iZ!!06cd9&)U!! Thanks, Mike, for a quick and full answer. > > 1) The ANY can contian any tags. So, the document will be well > formed with anything > (with legal syntax) in the ANY. However, for it to be valid with > respect to a DTD, > all tags must exist in a referenced DTD(internal or external). > Yes, that was what I realized. And I am looking for a valid dcument, not onlt a well-formed. > > 2) You suggested redefining the "extension" tag for each document to > use it. We don't > recommend doing that for the sake of clarlity. Just define the > "extension" as an ANY > and the following will work (the definition of "extension" comes > from the > DsLSRAnalysis.dtd DTD). > Unfortunately, this, of course, allows using new tags anywhere, not only within the "extension" tag. This is how I am doing it now, but I consider this only as a workaround for this moment, not a solution. > > Another possible solution would be to create your own extension. > This would be done > by: > > > > > > > This would allow you to specify the tag constraints, but is a more > proprietary > solution and doesn't use the extension defined in DsLSRAnalysis.dtd. > This again allows to put "myextension" anywhere. So the same objections as the solution above. > > 3) We would suggest the use of XML namespaces in your DTD, just as a > matter of good > DTD > programming style. I realize that this was just an example to > illustrate your > questions, but thought I'd mention it. > This sounds interesting. Actually, this may be similar to a solution suggested by Alan Robinson (he mentioned that XSLT may use something similar). However, I do not understand it without having an example. Would you mind to give me an example how this can be used for vendor-specific extensions, please? > > 4) For an example of the use of ANYs for extensions, see the OMG's > XMI definition of > the XMI.extension and XMI.extensions tags. > This also sounds promising and I wanted to do it. Now I feel even stronger and I will look at it. However, I guess (not sure yet) that using this approach with our current DsLSRAnalysis.dtd would not be possible. The DTD would require some changes. Am I right? This is important because if this is the right way how to extend our DTD we should consider to suggest its changes in the FTF. Once more thanks very much for help, Martin P.S. > > > > Unfortunately, this does not pass validation tests. I am > getting an > > error saying "Error at (file http://....DsLSRAnalysis.dtd, line > 13, char > > 25): Duplicate element name, "extension". > > I still wonder why I got this message. I thought that an internal DTD overrides the external one. -- Martin Senger EMBL Outstation - Hinxton Senger@EBI.ac.uk European Bioinformatics Institute Phone: (+44) 1223 494636 Wellcome Trust Genome Campus (Switchboard: 494444) Hinxton Fax : (+44) 1223 494468 Cambridge CB10 1SD United Kingdom http://industry.ebi.ac.uk/~senger Date: Mon, 21 Feb 2000 21:52:06 +0000 (GMT) From: Martin Senger To: Michael Petrin cc: biomolecular-ftf@emerald.omg.org, Alan Robinson Subject: Re: how to extend BSA DTF? In-Reply-To: <38B182FF.FCFDFB54@concept5.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: %Ggd9*iZ!!06cd9&)U!! Thanks, Mike, for a quick and full answer. > > 1) The ANY can contian any tags. So, the document will be well > formed with anything > (with legal syntax) in the ANY. However, for it to be valid with > respect to a DTD, > all tags must exist in a referenced DTD(internal or external). > Yes, that was what I realized. And I am looking for a valid dcument, not onlt a well-formed. > > 2) You suggested redefining the "extension" tag for each document to > use it. We don't > recommend doing that for the sake of clarlity. Just define the > "extension" as an ANY > and the following will work (the definition of "extension" comes > from the > DsLSRAnalysis.dtd DTD). > Unfortunately, this, of course, allows using new tags anywhere, not only within the "extension" tag. This is how I am doing it now, but I consider this only as a workaround for this moment, not a solution. > > Another possible solution would be to create your own extension. > This would be done > by: > > > > > > > This would allow you to specify the tag constraints, but is a more > proprietary > solution and doesn't use the extension defined in DsLSRAnalysis.dtd. > This again allows to put "myextension" anywhere. So the same objections as the solution above. > > 3) We would suggest the use of XML namespaces in your DTD, just as a > matter of good > DTD > programming style. I realize that this was just an example to > illustrate your > questions, but thought I'd mention it. > This sounds interesting. Actually, this may be similar to a solution suggested by Alan Robinson (he mentioned that XSLT may use something similar). However, I do not understand it without having an example. Would you mind to give me an example how this can be used for vendor-specific extensions, please? > > 4) For an example of the use of ANYs for extensions, see the OMG's > XMI definition of > the XMI.extension and XMI.extensions tags. > This also sounds promising and I wanted to do it. Now I feel even stronger and I will look at it. However, I guess (not sure yet) that using this approach with our current DsLSRAnalysis.dtd would not be possible. The DTD would require some changes. Am I right? This is important because if this is the right way how to extend our DTD we should consider to suggest its changes in the FTF. Once more thanks very much for help, Martin P.S. > > > > Unfortunately, this does not pass validation tests. I am > getting an > > error saying "Error at (file http://....DsLSRAnalysis.dtd, line > 13, char > > 25): Duplicate element name, "extension". > > I still wonder why I got this message. I thought that an internal DTD overrides the external one. -- Martin Senger EMBL Outstation - Hinxton Senger@EBI.ac.uk European Bioinformatics Institute Phone: (+44) 1223 494636 Wellcome Trust Genome Campus (Switchboard: 494444) Hinxton Fax : (+44) 1223 494468 Cambridge CB10 1SD United Kingdom http://industry.ebi.ac.uk/~senger Date: Tue, 21 Mar 2000 11:29:36 -0800 From: Scott Markel Organization: NetGenics, Inc. X-Mailer: Mozilla 4.72 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: biomolecular-ftf@emerald.omg.org Subject: Re: issue 3335 -- Biomolecular FTF Issue References: <4.1.20000320162807.00cd3a50@emerald.omg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: 'e!!!=OK!!@B:e9m@:e9 At the Denver meeting we discussed changing the simple DTD as follows. Replace with It was suggested that this be done three different ways in order to distinguish the extensions for AnalysisType, InputPropertySpec, and OutputPropertySpec. I think a larger issue is whether or not the available spec (adopted spec + FTF changes) should include any non-XMI compliant DTD. I wouldn't want to spend too much tweaking a DTD that ends up being removed. Scott Juergen Boldt wrote: > > This is issue # 3335 > > how to extend BSA DTF? > > The question is how to extend BSA metadata to be able to include > additional vendor-specific tags. > Originally, I have suggested tag of type ANY to be > used for > these specific tags. However, in that time my understanding of ANY > was > wrong. I thought that an element of type ANY can have any data > including > new tags. Which was a wrong assumption. One can use only tags (any > of > them) defined in the DTD. > So now my understanding is that if I need a vendor-specific tags, > I > need to extend DTD. The XML books say that an internal DTD has > priority > over an external DTD and that document authors can override things > using > their own internal DTD. Is this the way how to extend BSA metadata? > I have tried. Here is an example of an extended XML file with an > internal DTD defined new tags: > > > "http://localhost/openBSA/docs/DsLSRAnalysis.dtd" [ > > > > > ]> > > > > > this is part 1 > > > > > Unfortunately, this does not pass validation tests. I am getting > an > error saying "Error at (file http://....DsLSRAnalysis.dtd, line 13, > char > 25): Duplicate element name, "extension". > > Any ideas what I am doing wrong, or what is the correct way how > to > extend BSA metadata? Is the element in BSA DTD useable > at all? > If yes, how can be used, if not, should we re-consider it in the > FTF? -- Scott Markel, Ph.D. NetGenics, Inc. smarkel@netgenics.com 4350 Executive Drive Tel: 858 455 5223 Suite 260 FAX: 858 455 1388 San Diego, CA 92121 Date: Tue, 19 Sep 2000 15:52:11 +0100 (BST) From: Martin Senger To: biomolecular-ftf@omg.org Subject: issue 3335 - a proposed resolution In-Reply-To: <200009191154.e8JBsn943066@o2-3.ebi.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: HhE!!)d8e9l^1e9O=+!! As specified earlier, the issue 3335 addresses possibilities how to extend BSA DTD (describing sequence analysis metadata). The DTD which is included in the BSA spec does not allow vendor-specific extensions (even it was meant to do it). The proposal below makes the following changes to achieve such extensibility: 1) It renames tag "extension", used in three different places, to three different tags: "analysis_extension", "input_extension", and "output_extension". 2) It replaces each of these three extension tags by ENTITies: "> "> "> which actually makes the extension tags empty. 3) And finally, it adds definitions for the extension elements (using the entities declared above); %vendor_analysis_tags; %vendor_input_tags; %vendor_output_tags; Now the proposal: ----------------- I am proposing to replace the appendix D.1 "File: DsLSRAnalysis.dtd" by the following: "> "> "> %vendor_analysis_tags; %vendor_input_tags; %vendor_output_tags; --- end of the proposal --- Regards, Martin -- Martin Senger EMBL Outstation - Hinxton Senger@EBI.ac.uk European Bioinformatics Institute Phone: (+44) 1223 494636 Wellcome Trust Genome Campus (Switchboard: 494444) Hinxton Fax : (+44) 1223 494468 Cambridge CB10 1SD United Kingdom http://industry.ebi.ac.uk/~senger