Print

Print


Mike,

    From what you've said, it seems to me that initialisable cases are your default. If that is so, why not modify your schema to have it's own attribute (or child element) of specialInitial (or something similar) which contains the non-standard initialisation of that name? In processing, where that attribute/element is present, use its contents for the initial. Where it is missing, use the first letter of the content of the name and add a period. You won't have to add code to each name entry - especially if you add it to the schema as default empty - but only to those edge cases.

Misha

On Mon, Jun 20, 2016 at 3:54 PM, Michael Hawkins <[log in to unmask]> wrote:

Thanks for the reply.

My problem was simply ascertaining whether the idea of using an attribute to indicate this sort of thing was acceptable to the broader TEI community and, if so, what attribute to use. Your feeling that @type could work is comforting.

Generating the initial itself was never an issue for me. It's a piece of cake to do this within my XSLT so I don't need to worry about CSS's text-transform.

Mike


On 20/06/2016 14:33, Antonio Rojas Castro wrote:
Hi there,

I am not 100% I understand your problem but... I would use @type and then transform elements into HTMLs spans or paragraphs with @class. Then you can style all this in CSS -- use the property text-transform: lowercase, capitalize or initial acoording to your desired output. For instance: http://www.w3schools.com/cssref/pr_text_text-transform.asp

Hope it helps.

Best,

2016-06-20 14:47 GMT+02:00 Michael Hawkins <[log in to unmask]>:
I've got a problem that I'm hoping someone will be able to help me resolve. I'm in the process of converting about 7,000 legacy person authority files into TEI. Mapping the data in TEI is more or less straightforward. My problem stems from the fact that I need to be able to output the name in two distinct ways.

The name itself is coded in the following manner:

<persName>
        <forename>Joe</forename>
        <forename>Robert</forename>
        <surname>Bloggs</surname>
</persName>

I'd then need to generate two different versions of the name (depend on the context on the site).

The first type of output is pretty well just a normal natural language version of the name (e.g. Joe Robert Bloggs) - and that can easily be generated from the above XML. This version is always just a straight dump of the name as it's coded by the editors.

The second form is the sort of output you might find in an index (e.g. Bloggs, J. R.). The challenge with this version is that the form of the name varies from person to person. For some people, the forenames are rendered in full and that's simple enough to generate. However, for some people, one or more of the forenames need to be initialised in this output (and ONLY this output).

Looking back through the list, I found one possible suggestion from Syd about a decade ago using <choice>:
<persName>
        <forename>
            <choice>
                <expan>Joe</expan>
                <abbr>J.</abbr>
            </choice>
        </forename>
        <forename>
            <choice>
                <expan>Robert</expan>
                <abbr>R.</abbr>
            </choice>
        </forename>
        <surname>Bloggs</surname>
</persName>

This would obviously work. It would also deal with the annoying edge cases involving people with unusual initialised versions of their names (e e cummings). However, for most of our needs, this amount of code feels like overkill since the initials could (in our case) be automatically extracted from the forename as needed.

What I was wondering was whether it would be possible to simply flag forename elements with some attribute to indicate that it is capable of being rendered in an initialised form for the index. If so, what attribute would you suggest? I had a look at the ones available and none really seem to fit. @full describes the content of the element itself and not how it might be output. Ditto, @rend/@rendition, which describe how it was rendered in the original source and not how it might be rendered. The only possible candidate seems to be @type (type="initialisable"). Either that, or I'm stuck adding my own namespaced attribute.

Does anyone have any ideas or suggestions?

Mike Hawkins



--