[Jsdsi-devel] SimpleTag -- ALL_TAG
Status: Pre-Alpha
Brought to you by:
sajma
From: Michael J. <mij...@in...> - 2003-08-02 18:59:00
|
Hi, there has been a lot of silence on the lists the last months. Today I found the time to work on jsdsi and the first thing i wanted to fix was the SimpleTag: As i wrote previously, the combination with the ALL_TAG is currently not correct. As a reminder here is what i wrote: > I've got a suggestion for JSDSI: I don't know if I'm right, but maybe we > should overthink the implementation of the ALL_TAG. Currently it's a > Tag and not an ExprTag, which means that you can't use it in a SimpleTag. In > RFC 2693 Ellison et al. quote an example in section 6.5.7 which looks like > this: > > (tag (* set (ssl) (dns (*)))) > > This examples looks like the ALL_TAG is allowed in a SimpleTag. What do you > think? In my opinion it makes sense to allow the ALL_TAG in SimpleTags. As Carl Ellison replied to my question on the SPKI Mailinglist this behaviour is wrong and not covered in the BNF. For my diplomathesis I just changed the implies()-method in the following way, which is quite a dirty fix: boolean implies(Tag that) { // By mic...@in... if( (value.equals("*") && tags.length==0) ) { return true; } if( that instanceof SimpleTag ) { SimpleTag sThat = (SimpleTag) that; if( sThat.getValue().equals(value) && tags.length==sThat.getTags().length) { for(int i=0; i<tags.length; i++ ) { if( !tags[i].implies(sThat.tags[i]) ) { return false; } } return true; } } return false; } My suggestion is to solve the problem by refactoring the ALL_TAG. This could otherwise be problematic as this would mean altering the BNF-scheme defined by Carl Ellison. What do you think? All the best, Michael. |