Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we allow formatting in the alt and optional elements #393

Closed
goneall opened this issue Feb 25, 2017 · 5 comments
Closed

Should we allow formatting in the alt and optional elements #393

goneall opened this issue Feb 25, 2017 · 5 comments

Comments

@goneall
Copy link
Member

goneall commented Feb 25, 2017

Question: Should we allow paragraphs, bullets, lists inside the optional and alt elements? I would assume we should disallow nested optional and alt elements (e.g. " this is an really optional text ")

Note that the current schema definition only uses simple text for optional and alt.

@wking
Copy link
Contributor

wking commented Feb 27, 2017 via email

@bradleeedmondson
Copy link
Contributor

@goneall I can say that we have a fair number of licenses with significant portions of text marked optional, so I'd think that we'd need to be able to include formatting tags within <optional> blocks to be able to display that in a readable way.

I have no opinion on nesting <optional> or <alt> tags within each other.

@goneall
Copy link
Member Author

goneall commented Mar 22, 2017

Agree on the nesting of the formatting. We'll need to update the schema for this.

I'm thinking that we do not nest and - I haven't seen this in practice and it would really complicate the schema.

@wking Your proposal is quite reasonable, however, we have already standardized on the current approach for the text files. I would like to keep the basic format between the template text and HTML structurally similar. If we were to change the structure of both, it would involve a revision of the spec. I would suggest we go with the current approach for now and consider alternative formats in future revisions of the spec. We would also want to take into account backwards compatibility since these formats have been encoded in license text outside of the XML.

@wking
Copy link
Contributor

wking commented Mar 22, 2017 via email

@goneall
Copy link
Member Author

goneall commented May 29, 2017

I added nested formatting for the alt and optional fields in the schema and implemented support in the spdx-tools.

@goneall goneall closed this as completed May 29, 2017
wking added a commit to wking/license-list-XML that referenced this issue Nov 1, 2017
By differentiating between formattedAltText..., which may contain
<alt> and <optional>, and formattedFixedText..., which may not.  The
optionalType is using formattedAltTextGroup, because nesting variable
content inside an optional element can be useful [1,2].  The <alt>
element, on the other hand, specifies all the variable options in its
match attribute, so there's no need for nesting variable elements
inside the alt body.

[1]: spdx#393
[2]: spdx#462
wking added a commit to wking/license-list-XML that referenced this issue Nov 6, 2017
By differentiating between formattedAltText..., which may contain
<alt> and <optional>, and formattedFixedText..., which may not.  The
optionalType is using formattedAltTextGroup, because nesting variable
content inside an optional element can be useful [1,2].  The <alt>
element, on the other hand, specifies all the variable options in its
match attribute, so there's no need for nesting variable elements
inside the alt body.

Also require fixed text for <notes>, since those aren't templates.
And drop the unused notesType, since they're vanilla formatted text.

We almost certainly want to drop titleText and copyrightText fro the
formatted*TextGroup choices, but I'm leaving that for [3].

[1]: spdx#393
[2]: spdx#462
[3]: spdx#452
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants