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

Restore the custom attribute sections #1756

Merged
merged 4 commits into from
Aug 18, 2021
Merged

Restore the custom attribute sections #1756

merged 4 commits into from
Aug 18, 2021

Conversation

mattgarrish
Copy link
Member

@mattgarrish mattgarrish commented Jul 9, 2021

Also adds @iherman's suggested text about rs-specific nature of the attributes. I've made this a note, though, as it's more describing future process.

Only other change was to use "domain" instead of "authority component" in the part about the restricted strings so we can reference the URL standard instead of RFC3186.

Fixes #1602


Preview | Diff

add note about rs-specific nature of the attributes
Copy link
Member

@iherman iherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wonder whether, for reasons of symmetry, we should not make a similar section (or factor out a common section) for SVG, too. After all, an RS may decide to have a RS-specific attribute in SVG content, too.

(I realize this is probably a technical purity issue of the spec rather than reflecting real usage out there, so I am o.k. if you decide to ignore this...)

@mattgarrish
Copy link
Member Author

After all, an RS may decide to have a RS-specific attribute in SVG content, too.

We don't have this issue with SVG: https://www.w3.org/TR/SVG2/struct.html#ForeignNamespaces

HTML is more restrictive, so we had to explicitly allow foreign attributes.

@mattgarrish
Copy link
Member Author

I guess we should wait on a formal WG nod before merging this one, since it's undoing an earlier resolution.

@iherman iherman added the Agenda+ Issues that should be discussed during the next working group call. label Jul 26, 2021
Copy link
Contributor

@dauwhe dauwhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be more clear about what a custom attribute is (it's not quite a standard term in HTML). As far as I can tell, what EPUB has historically allowed is attributes in namespaces other than xhtml or epub. Just adding a foo attribute won't validate.

@iherman
Copy link
Member

iherman commented Aug 13, 2021

I think we should be more clear about what a custom attribute is (it's not quite a standard term in HTML). As far as I can tell, what EPUB has historically allowed is attributes in namespaces other than xhtml or epub. Just adding a foo attribute won't validate.

The proposed text says:

To facilitate this experimentation, vendors MAY define custom attributes for use in XHTML Content Documents provided they are from a foreign namespace, which is defined as a namespace [ XML-NAMES ] that does not incorporate either of the following strings in its domain [ URL ]:

  • w3.org
  • idpf.org

For me, that makes it explicit that just foo won't be acceptable because it would not be in a foreign namespace.

@dauwhe
Copy link
Contributor

dauwhe commented Aug 13, 2021

Ah, I guess I hope there would be some explanation about the namespaces in the authoring spec as well as the reading system spec. I fear content authors will see this as a license to use <p foo="bar"> and will then wonder why it fails EPUBCheck.

@iherman
Copy link
Member

iherman commented Aug 13, 2021

The issue was discussed in a meeting on 2021-08-13

List of resolutions:

View the transcript

3. Custom Attributes

See github pull request #1756.

Dave Cramer: we took out the custom attributes section, but it turns out there are RS that use these
… so now we want to put it back

Dan Lazin: can we get some documentation on what exists in terms of custom attributes? So people can make use of them in their books?

Dave Cramer: we can see about including some examples

Proposed resolution: Merge PR 1756 (Wendy Reid)

Dave Cramer: +1

Wendy Reid: +1

Dan Lazin: +1

Matthew Chan: +1

Ivan Herman: +1

Charles LaPierre: +1

Ben Schroeter: +1

Brady Duga: +1

Masakazu Kitahara: +1

Resolution #2: Merge PR 1756

Dave Cramer: okay, thanks everyone!


@iherman iherman removed the Agenda+ Issues that should be discussed during the next working group call. label Aug 15, 2021
@iherman
Copy link
Member

iherman commented Aug 15, 2021

Ah, I guess I hope there would be some explanation about the namespaces in the authoring spec as well as the reading system spec. I fear content authors will see this as a license to use <p foo="bar"> and will then wonder why it fails EPUBCheck.

@dauwhe I do not think the normative statements should be changed. But I have added an extra note right after the list of domains, as follows:

Note that this restriction also disallows the usage of custom attributes without a namespace prefix
(e.g., <p foo="">…</p>). Indeed, such attributes are considered to be part of
the default namespace, i.e., either the XHTML or SVG namespaces, which are both in the w3.org domain.

@iherman
Copy link
Member

iherman commented Aug 18, 2021

@dauwhe are you o.k. with #1756 (comment)? We could then close this PR

@iherman iherman merged commit 884f2a4 into main Aug 18, 2021
@mattgarrish mattgarrish deleted the fix/issue-1602 branch August 19, 2021 11:10
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

Successfully merging this pull request may close these issues.

Spec recommends documenting custom attributes, but zero documented in 5 years
4 participants