From: Miller, M. D (Rosetta) <Michael_Miller@Rosettabio.com> - 2006-06-30 14:59:19
|
Hi Jason, > I thought the issue was that looking at the DTD files, you couldn't > tell which one was 1.1 and which one was 1.0. Valerie suggested adding > a comment to the DTD indicating the version number. The information I sent out in the original e-mail about the differences makes it possible to tell which version of the DTD it is by inspection, so the update to the comment is just a convenience. Even simpler is to download the DTDs from the OMG site one time only to 1.0 and 1.1 subdirectories and use those. So figuring out what version the DTD is not really an issue. > True, it is valid. So I will extend what I said: >=20 > using a MAGE-ML DOCTYPE with only a SYSTEM identifier and not a > PUBLIC identifier should be considered an error... This is a true issue, because it is not an error (although I agree it should be). So Valerie is correct that one potentially has to deal with this if the source of the document is not in best practice. A parser will be set up to know already where to find each version of the DTD. The parser only deals with documents, it most decide which version should be used. If the PUBLIC identifier isn't present and the dtd isn't qualified in the DOCTYPE, what to do? We simply guess the 1.1 version and that has worked so far. If we ever needed to, we might implement my suggestion below, to grep for the four differences but until we need to, we won't bother in our implementation of the parser. But it might not be bad to update the MAGEstk parser for this. cheers, Michael > -----Original Message----- > From: Jason Stewart [mailto:jas...@gm...]=20 > Sent: Friday, June 30, 2006 7:39 AM > To: Miller, Michael D (Rosetta) > Cc: Valerie Wagner; mge...@li... > Subject: Re: [Mged-mage] Versions of MAGE and MAGE-ML >=20 >=20 > Hey, >=20 > On 6/30/06, Miller, Michael D (Rosetta)=20 > <Mic...@ro...> wrote: > > Hi Jason and Valerie, > > > > > Beyond what Michael said, it is an *error* not to reference the > > > DOCTYPE in a MAGE-ML file. > > > > I think the issue is that this is prefectly valid: > > > > <!DOCTYPE MAGE-ML SYSTEM "MAGE-ML.dtd"> > > > > But anyone who does this should still be admonished to change their > > ways. >=20 > True, it is valid. So I will extend what I said: >=20 > using a MAGE-ML DOCTYPE with only a SYSTEM identifier and not a > PUBLIC identifier should be considered an error... >=20 > > > > > Michael, isn't this a 100% backwards compatible idea that=20 > would make > > > life easier for people? Is this change possible? I mean=20 > clearly the > > > version that we distribute from the MGED site could be=20 > modified, but > > > can the *official* version at the OMG be modified like this? > > > > It is definitely 100% backwards compatible, since it is=20 > just a comment. > > Unfortunately, even a minor change like this takes a process at OMG. >=20 > Yes, I see. I think it's worth it. >=20 > > > > In practice, I don't think this is has been a huge issue, it is rare > > that I've seen a DOCTYPE where the dtd isn't qualified by=20 > the version > > directory, and, although it is ugly and inelegant, in the > > resolveEntity() method one can look for the elements that=20 > require one or > > the other DTD and/or special case to look for who produced=20 > the document > > and map to the correct DTD. >=20 > Doesn't this miss the point? >=20 > I thought the issue was that looking at the DTD files, you couldn't > tell which one was 1.1 and which one was 1.0. Valerie suggested adding > a comment to the DTD indicating the version number. >=20 > Or did I misunderstand? >=20 > Cheers, jas. >=20 >=20 |