#295 create @refLang, add it to att.pointing

RED
closed
5(default)
2013-10-10
2011-04-16
No

In view of the discussion on why @xml:lang is unsuitable in stand-off contexts[1], I suggest that we introduce @refLang (name suggestion by Conal Tuohy), modeled on HTML's @hreflang [2], and add it to att.pointing, to be conditioned by the presence of @target.

[1]: http://listserv.brown.edu/archives/cgi-bin/wa?A2=ind1104&L=TEI-L&P=R1767&D=0&T=0&m=14690
(make sure to read on, this one just sets the context)

[2]: http://www.w3.org/TR/html401/struct/links.html#h-12.1.5

----------------
This is meant for cases such as <ptr @target="URI" @refLang="BCP47-value"/>

Content: data.language. Suggested semantics: @refLang identifies the language of the content of elements/documents identified by the URI.

Suggested assertion to go into the definition of the attribute, roughly:

<sch:rule context="tei:ptr">
<sch:assert test="count(@target)">@refLang can only be used if @target is specified.</sch:assert>
</sch:rule>

(this assumes that @target="" is caught elsewhere)

Issues:
* can @xml:lang be used in such contexts instead, given that what is being identified is/may be virtual content of the containing element or its parent? (assumed answer: no)
* should att.global.linking be affected as well?
* should the remote character set be definable as well? and if so, how?
* do we want to bother about the language of remote attributes (suggested answer, in view of the short-sighted part of the definition of @xml:lang, and the TEI's strategy to avoid language in attributes: NO)
* what should be done if the *script* of remote *attributes* should be thus identified (not just the language)? (suggested answer: the same as in the case of mismatches between the script set by some @xml:lang and the script of attributes accompanying that @xml:lang; in other words: this is a more general problem that needs to be solved separately)

Discussion

  • Lou Burnard

    Lou Burnard - 2011-11-02
    • milestone: --> RED
     
  • Lou Burnard

    Lou Burnard - 2011-11-02

    FWIW, here are my reactions to the questions raised above:
    - using xml:lang to specify anything other than the language of the element content would be an inappropriate semantic change
    - if the value of the proposed attribute is data.language then the script can be specified (the character set is always going to be Unicode in XML-world)
    - definitely not
    - see second answer above

    I am so far unconvinced that there is a persuasive case for introducing this feature. What problem is it meant to resolve?

     
  • BODARD Gabriel

    BODARD Gabriel - 2012-03-20

    I agree with Lou's answers to the questions below.

    I can see the point, semantically, in being able to specify the language, not of the element on which the attribute sits but of the element (or external document) to which it points --just as I can see the value in being able to specify the language of a work referenced in a bibliographical item independently of the language of the content of the bibl element itself. I'm not sure if Lou is asking for more than this when he asks "what problem does this solve?"

    Presumably the problem is that when wanting to indicate the language of a target element/document, using the @xml:lang attribute, currently the only way to encode language, would be wrong. Could Piotr come up with, or reproduce here from the TEI-L thread, a specific use-case to help clarify this?

    (Looking through the thread, a good statement of this argument seems to be made by Conal at http://listserv.brown.edu/archives/cgi-bin/wa?A2=ind1104&L=TEI-L&D=0&T=0&m=14690&P=6366 )

     
  • Martin Holmes

    Martin Holmes - 2012-03-20

    I can imagine the following scenario that would justify the use of this:

    - I have an XSLT stylesheet which is processing a TEI document.
    - The TEI document points to a number of external text files, which the XSLT process will pull in and manipulate.
    - The text files are in a range of different languages, and the XSLT needs to process them differently based on their language.

    There's no reliable way to specify the language of a text file, and even if there was, it would involve injecting something into the text file (which may be unacceptable if, for instance, it's part of a language corpus of some kind).

    So being able to state, in the TEI document, that the external file you're linking to is "fr" or "es" would be very useful.

     
  • Piotr Banski

    Piotr Banski - 2012-04-16

    Assigning this ticket to myself after a discussion with the Council.

     
  • Piotr Banski

    Piotr Banski - 2012-04-16
    • assigned_to: nobody --> bansp
     
  • Piotr Banski

    Piotr Banski - 2012-04-18

    Got this partially implemented in rev. 10242 when Lou asked why not "targetLang". My answer is that "refLang" is short and analogous to "hreflang", but I admit that "targetLang" is not hideously long and, since it is meant to always accompany @target, Lou's suggestion makes a lot of sense. SO, while the world still doesn't know about it, I can redo the name in no time.

    Any comments/votes, please?

     
  • Martin Holmes

    Martin Holmes - 2012-04-19

    @targetLang works for me. It is analogous with @hrefLang.

     
  • Piotr Banski

    Piotr Banski - 2012-04-20

    Yep, it's growing on me. If no one objects in the coming days, I'll redo the name.

     
  • Lou Burnard

    Lou Burnard - 2012-06-17
    • status: open --> closed
     
  • Lou Burnard

    Lou Burnard - 2012-06-17

    Closing, since it seems to be done.

     
  • Piotr Banski

    Piotr Banski - 2013-10-10
    • labels: TEI: New or Changed Class --> TEI: New or Changed Class, LingSIG
    • Priority: 5 --> 5(default)
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks