[giftfile-dev] certificate format: rights
Anthony Carrico
acarrico at memebeam.org
Mon Jun 13 23:03:53 EDT 2005
I'd like to tweak the Certificate format. The Certificate schema's
current subversion URL is:
http://giftfile.org/depot/trunk/giftfile/software/giftfile-system/xml/schema/rng/certificate.rng
Here is the current Rights element definition (call it syntax A):
<define name="Rights">
<element name="Rights"><ref name="RightsType"/></element>
</define>
<define name="RightsType">
<choice>
<element name="License">
<ref name="URI"/>
<oneOrMore>
<element name="Copyright">
<element name="Year"><ref name="year"/></element>
<element name="Claimant"><text/></element>
</element>
</oneOrMore>
</element>
<element name="PublicDomain">
<element name="Year"><ref name="year"/></element>
<element name="Author"><text/></element>
</element>
<element name="And"><oneOrMore><ref name="RightsType"/></oneOrMore></element>
<element name="Or"><oneOrMore><ref name="RightsType"/></oneOrMore></element>
</choice>
</define>
The biggest problem with syntax A is that Rights can nest arbitrarily.
This is challenging from a user interface point of view, both for
input and output. It also leads to crazy expressions like:
((BSD (Copyright 2002 Foo-san)) Or (Public Domain 2002 Foo-san))
or
((MIT (Copyright 2002 Foo-san)) Or (MIT (Copyright 2002 Bar-san)))
In reality, we only want:
1. "or" among licenses (for dual licensed works).
2. "and" among copyright and public domain expressions (for combined
works).
It would be nice keep the ability to collect a bunch of copyrights
under the license, since this is the common case for a work with a
bunch of authors.
This version does so (call it syntax B):
<define name="Rights">
<element name="Rights"><ref name="RightsType"/></element>
</define>
<define name="RightsType">
<oneOrMore>
<choice>
<element name="License">
<oneOrMore>
<ref name="URI"/>
</oneOrMore>
<oneOrMore>
<element name="Copyright">
<element name="Year"><ref name="year"/></element>
<element name="Claimant"><text/></element>
</element>
</oneOrMore>
</element>
<element name="PublicDomain">
<element name="Year"><ref name="year"/></element>
<element name="Author"><text/></element>
</element>
</choice>
</oneOrMore>
</define>
Syntax B is concise, but is not explicit about the semantics of the
"oneOrMore" element semantics.
This version is explict (call it syntax C):
<define name="Rights">
<element name="Rights"><ref name="RightsType"/></element>
</define>
<define name="CopyrightExp">
<element name="Copyright">
<element name="Year"><ref name="year"/></element>
<element name="Claimant"><text/></element>
</element>
</define>
<define name="RightsClause">
<choice>
<element name="License">
<choice>
<ref name="URI"/>
<element name="Or">
<oneOrMore>
<ref name="URI"/>
</oneOrMore>
</element>
</choice>
<choice>
<ref name="CopyrightExp"/>
<element name="Or">
<oneOrMore>
<ref name="CopyrightExp"/>
</oneOrMore>
</element>
</choice>
</element>
<element name="PublicDomain">
<element name="Year"><ref name="year"/></element>
<element name="Author"><text/></element>
</element>
</choice>
</define>
<define name="RightsType">
<choice>
<ref name="RightsClause"/>
<element name="And">
<oneOrMore>
<ref name="RightsClause"/>
</oneOrMore>
</element>
</choice>
</define>
...and hence more verbose, but the actual Certificates produced under
this schema aren't much more verbose.
Comments?
--
Anthony Carrico
http://giftfile.org
More information about the giftfile-dev
mailing list