Print

Print


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
>



-- 
Antonio Rojas Castro
<http://goog_1138293057>
www.antoniorojascastro.com
https://www.zotero.org/groups/humanidades_digitales

<http://www.facebook.com/antoni.rojas>