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

TEI address element is wrongly converted to HTML address element #261

Closed
martindholmes opened this issue Apr 18, 2017 · 9 comments
Closed
Assignees
Labels
status: inProgress Ticket has been assigned and someone is working on it. type: bug A bug report.

Comments

@martindholmes
Copy link
Contributor

martindholmes commented Apr 18, 2017

The purpose of the HTML <address> element is very precise and constrained:

The address element provides contact information for a document or part of a document. 
Information provided by address may include the names of the document’s maintainers, 
links to the maintainers’ Web pages, e-mail addresses for feedback, postal addresses, 
phone numbers, and so on. The address element is not appropriate for all postal and 
e-mail addresses; it should be reserved for providing such information about the contact 
people for the document.

The TEI <address> element is much more generic, and appears all over the place, containing the addresses of people in personographies, places in gazetteers, and so on. However, the Stylesheets (in particular html/html_core.xsl, line 95) simply converts the TEI <address> to the HTML <address>, which is both semantically wrong and often invalid (because the range of contexts allowing the HTML address is quite constrained).

We need to decide on another default rendering approach for generic addresses (<span class="address">?) for most contexts, and also we need to see if we can figure out when an address would be a good candidate for conversion to the HTML <address> element (for instance when it's associated with a document author, a publisher, an editor, or something like that).

@martindholmes martindholmes added the type: bug A bug report. label Apr 18, 2017
@lb42
Copy link
Member

lb42 commented Apr 19, 2017

Ill bet there are plenty of places where html:address is used for its formattibg effect only. And where it really corresponds to something like tei:trailer

@jamescummings
Copy link
Member

Where can the html:address appear or not? What are the constraints on it? I would agree that the fall back for tei:address is html:span with a class='address' makes sense since most of the places tei:address is allowed seem to be phrase-level. When you are rendering metadata (e.g. when ancestor::publicationStmt) then perhaps it makes sense to be doing something different with it, but surely that depends on whatever it is we're doing with publicationStmt in our teitohtml at the moment?

@martindholmes
Copy link
Contributor Author

html:address can appear anywhere flow content is allowed (I know that's vague, but I can't find anything more specific). Here's a useful page on it:

https://www.w3.org/wiki/HTML/Elements/address

I think the semantic issues are more significant than the validation issues, although I first came across this through a validation problem in one of our test outputs.

@martindholmes
Copy link
Contributor Author

martindholmes commented May 4, 2017

The Stylesheets co-op group looked at this and decided that in html_core.xsl, the output from <address> should be <span class="address">, and that css/tei.css should have the following rule added to it:

span.address{
  display: block;
  font-style: italic;
}

That should mean that the output appearance should not change from what it now is, but the invalidity issues should go away. Two other issues came up, which will get separate tickets. One issue that remains for this ticket: are there contexts (such as <publicationStmt>, should that be processed into HTML) in which an HTML <address> element is appropriate as output from the TEI element?

@martindholmes
Copy link
Contributor Author

See Martina's pull request here:

#265

Looks good to go -- as soon as anyone has the time to handle the expected-results fallout, do pull it!

martindholmes added a commit that referenced this issue May 15, 2017
TEI address element is wrongly converted to HTML address element (#261)
@ebeshero
Copy link
Member

ebeshero commented Oct 5, 2017

I'm reviewing XSLT Stylesheets tickets, and saw we have at least a partial fix here thanks to @martinascholger . Where are we with this?

@ebeshero ebeshero self-assigned this Oct 5, 2017
@ebeshero
Copy link
Member

ebeshero commented Oct 5, 2017

We may be finished with this: Tasks to double-check:

  • Write up a test file with <address> and check how it works.
  • check pull request

@ebeshero
Copy link
Member

ebeshero commented Nov 16, 2017

F2F Group: Pull request looks good. Questions: Should all TEI address elements be processed in this way? Check how we want <address> to be handled when we have ancestor::publicationStmt.

@ebeshero
Copy link
Member

ebeshero commented Nov 16, 2017

F2F: publicationStmt use of <address>does not neatly correlate to the HTML address. We think this fix is sufficient for all cases and can close the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: inProgress Ticket has been assigned and someone is working on it. type: bug A bug report.
Projects
None yet
Development

No branches or pull requests

5 participants