Re: [tei-council] co-operative stylesheet education session #9
A few thoughts on the ticket #261 problem: As can be read in several placed on the Web: "the html:address element is ONLY for contact information for its nearest html:article or html:body ancestor" (article only exists in HTML5). In https://developer.mozilla.org/en/docs/Web/HTML/Element/address it also recommends that "to represent an arbitrary address, one that is not related to the contact information, use a html:p element rather than the html:address element." So html:p is a good candidate for the conversion, and a general-purpose one. INLINE vs BLOCK: So at this point my doubt is whether there are cases in TEI where a tei:address should be rendered "inline" (e.g. within a paragraph), instead of the perhaps more common "block" rendering (starting in a new line). If both renderings are expected in TEI, then we need an attribute to encode such difference and choose one option as the default (probably block). So we would have something like (I will use "rend" for the examples, buy can be any other attribute): TEI: <p>Mary moved to <address rend="inline">32nd Moo street<address>, but before, she lived in <address rend="inline">23ed Miou street<address>.</p> And for block rendered addresses, just use rend="block", or nothing if "block" is the default rendering. So a simple HTML rendering solution could be: In the case of inline-rendered addresses: HTML: <p>Mary moved to <span class="address">32nd Moo street</span>, but before, she lived in <span class="address"> 23ed Miou street</span>.</p> And for block-rendered addresses: TEI source: <address> <addrLine>110 Southmoor Road,</addrLine> <addrLine>Oxford OX2 6RB,</addrLine> <addrLine>UK</addrLine> </address> Should simply be converted to HTML like this: <p class="address"> 110 Southmoor Road,<br/> Oxford OX2 6RB,<br/> UK<br/> </p> And, when using more specific elements like tei:street, tei:name, etc., just the same thing: TEI source: <address> <street>110 Southmoor Road</street> <name type="city">Oxford</name> <postCode>OX2 6RB</postCode> <name type="country">United Kingdom</name> </address> Would be converted to HTML like this: <p class="address"> 110 Southmoor Road<br/> Oxford<br/> OX2 6RB<br/> United Kingdom<br/> </p> We could have differentiated renderings for street, name, postCode, etc., but I think this should be customized by projects themselves, and not be part of a general-purpose TEI stylesheet. Anyway, the output for differentiated rendering should be something like this: <p class="address"> <span class="street">110 Southmoor Road</span><br/> <span class="cityName">Oxford</span><br/> <span class="postCode">OX2 6RB</span><br/> <span class="countryName">United Kingdom</span><br/> </p> Which is a very ugly HTML code (but better than using the HTML style attribute and have the CSS code embedded in the HTML target). "span" should be used since there are no HTML elements for street, postcode, city, country, etc. Once we have decided which will the HTML target solution be, the rest is coding an xsl:template and minimally modifying a CSS stylesheet. Alex.- At 22:18 03/05/2017, you wrote:
I've created a test file in case we still need one: https://gist.github.com/raffazizzi/6b57a9c0016e46aebd249d5041ca4ae4
Raff
On Wed, Apr 26, 2017 at 12:20 PM, Syd Bauman
wrote: 1. Andrew, Marcus, Jure, and Ron -- would you like to continue to receive these e-mails? If so, speak up.
2. We're scheduled to meet on Thu 04 May at 13:00Z on Google Hangouts.
3. Per our previous e-mail discussion, we have HOME WORK to complete before this meeting. Our goal is to address ticket #261.[1]
a) Read the ticket.[1]
b) Make a small test TEI file that uses the tei:address element; if you can do so easily, put it up somewhere to share with the rest of us for step #4, below.
c) Make a fork of the Stylesheets repo.
d) Find the 2 files that generate html:address, and fix the one that is general-purpose, leaving the the one that is used in the footer for later -- extra credit :-)
e) Decide what the HTML output (for tei:address input) should be, and implement a fix.
f) Test and update your fix until it works.[2]
g) Validate the HTML produced.[3]
h) Find any CSS files that may need to be changed accordingly, and change 'em as needed.
i) Share your test file and solution.
4. On the call we will try to run each solution on someone else's test file(s).
Notes ----- [1] https://github.com/TEIC/Stylesheets/issues/261 [2] E.g., by running /path/to/Stylesheets/bin/teitohtml TEST.xml [3] E.g., by opening in oXygen or by uploading to either https://validator.nu/ or http://validator.w3.org/. -- tei-council mailing list tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
PLEASE NOTE: postings to this list are publicly archived
-- tei-council mailing list tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
PLEASE NOTE: postings to this list are publicly archived
--------------------------------------------------------- ALEJANDRO BIA e-mail: abia@umh.es CIO - DEMI Centro de Investigación Operativa Departamento de Estadística, Matemáticas e Informática Área de Lenguajes y Sistemas Informáticos Universidad Miguel Hernández Ed. Torretamarit, Av. Universidad s/n, CP:03202, Elche, ESPAÑA Web: http://dhw.umh.es/alex-bia/ Tel: +34 966658973 Móvil: +34 644447008 Skype: alex-bia Twitter: @alex_bia --------------------------------------------------------- --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
participants (1)
-
Alejandro Bia