Hi Daniel,

After thinking about this, I tend to agree that it is more straightforward
to use the beginOptional and endOptional tags.  This would allow for more
straightforward embedding of variable rules within optional text.  To
simplify the parsing, I would like to restrict the level and type of
nesting.  Proposal:
- Optional text can embed variable rules
- variable rules cannot embed optional text
- variable rules cannot embed other variable rules

One modification to the rules and optional tag syntax - on one of the calls
we discussed changing the special characters to '<<' and '>>' from '{{' and
'}}' since we are not technically using the Mustache syntax.  If it is OK
with you, let's change to the << >> special characters.


All - let us know if you disagree with the proposed syntax changes for
optional text.  Since we would like to implement this by LinuxConn, we'll
need feedback by end of day Monday.

Thanks,
Gary

-----Original Message-----
From: .dmg [mailto:[email protected]] On Behalf Of D M German
Sent: Friday, September 06, 2013 5:40 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: optional sections in license


Hi Gary, Jilayne, rest of the SPDX technical and legal teams.

I have been thinking about the optional sections of licenses. I think it is
not worth it to create a template rule to match optional sections of known
text

Template rules were supposed to be intended for sections that are expected
to vary, not simply sections that can be omitted. I just feel it
over-complicates things.

What do you think about specifying variable sections with some sort of begin
and end marker, and indicate that they optional sections of a template
cannot be embedded into another one (to avoid recursion).


For example, something like this (the name will uniquely identify the
section).

{{beginOptional;name=anyUniqueName}}

Text that is optional, including some template rules (for variable sections
in the optional text)

{{endOptional}

For example, the BSD-2 is currently specified as follows:

{{original=Copyright (c) <year> <owner>\nAll rights
reserved.;match=Copyright \(c\) .+All rights
reserved.;name=copyrigh;type=optional;example=Copyright (C) 2013 John
Doe\nAll rights reserved.}}

but I think it makes more sense to specify it like this:


{{beginOptional;name=copyrightStatement}}
Copyright (c) {{original=<year>
<owner>.;match=.+;name=copyright;type=optional;example=2013 John Doe}} All
rights reserved.
{{endOptional}


what do you think?

--dmg




--
Daniel M. German                  "I see no good reason why the
                                   views given in this volume
                                   should shock the religious
   Charles Darwin ->               feelings of anyone."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 

_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech

Reply via email to