W3C home > Mailing lists > Public > www-html@w3.org > July 2004

Re: [XHTML2] CITELANG, TITLELANG attributes

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Wed, 28 Jul 2004 10:27:21 +0200
Message-ID: <41076369.2000402@annevankesteren.nl>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: www-html@w3.org

>> Let me give an example:
>> 
>> <p cite="http://example.com/origineel.nl.xh2"> This is a
>> translation, since most people who read my site don't speak Dutch. 
>> </p>
> 
> (I'm not sure whether your text "This is a translation - -" was meant
> to be taken literally, i.e. whether text like that would be the real
> content, or just a description, so that the actual content would be
> an English translation of a poem in Dutch.)

A description :-). I totally agree with the abuse you have described,
but it was just a description. I should have used BLOCKQUOTE instead. So
it wasn't really a link, but just a translation of a Dutch poem, but
there isn't a way to say that the original poem was written in Dutch.


>> So the source is written in Dutch, that could be an article, or a
>> poem and you want to cite a part of that on your site and make it
>> readable for non Dutch people. What to do? Translate.
> 
> I'm not sure I see how this applies to your case. If you have a
> document in English and you wish to include a _quotation_, then you
> could use a <blockquote> or <quote> element and there a cite="..."
> attribute could have a well-defined meaning, _if_ the meaning will
> actually be defined in the XHTML 2.0 specification (instead of the
> current draft's hopelessly vague wording). But I don't think we
> really need that. For a quotation, you can simply insert a citation,
> i.e. a reference to the quoted document, either as text (as in books)
> or as hypertext (using a link). A citation hidden in an attribute is
> rather pointless. If browsers are not expected to render it by
> default, we can't really count on it.

Agreed. XHTML 2.0 should probably define something else to define this 
relationship in which case both CITE and CITELANG won't be needed at all.


> Irrespectively of this, I don't think a hreflang or a citelang
> attribute is needed much. Your example refers to a document via HTTP,
> and presumably to an HTML document; this means that one can use both
> the Content-Language header and <html xml:lang="nl"> if desired.

How can I show that to someone who reads my page?


>> So the language of the document is EN, the language of the cited 
>> document is NL.
> 
> The latter need not be known when the citing document is processed, 
> and it may in fact change independently of the citing document. For 
> example, you might wish to change the declaration of the language
> from "nl" to "nl-NL" or "nl-NL-officialese"

I don't really follow this.


>> If I want to show that metadata to my visitor, by using CSS for
>> instance, I don't want to check the HTTP header and use some 
>> server-side logic to write it down in my document. I just want an 
>> attribute to mention the resource language.
> 
> You have a point there, but such situations are rare and can be
> handled using classes, as authors now have to do (since language
> selectors are mostly unsupported in CSS implementations). I think it
> is rather rare that you would want to style texts differently
> depending on the language of the texts that they refer to (with links
> or "cite links"), as opposite to styling them by their own language.

You could also want to extract the information using CSS generated content:

   blockquote.poem[citelang=nl]::after{
    content:"The original was written in Dutch.";
   }


>> Like HREFLANG acted in HTML 4.01, purely for metadata.
> 
> I don't think HREFLANG ever acted in HTML 4.01 - there's nothing that
> browsers are required to do with it, and they mostly don't bother
> trying anything with it.

Various weblogs extract the metadata using CSS as showed above.


> I think HREFLANG and relatives try to address a problem that should
> not be created in the first place: if a link text refers to a
> document in a language other than the link text itself, we might feel
> the need for HREFLANG, but we should realize that the discrepancy
> should be resolved rather than documented with semi-cryptic invisible
> attributes. In the rare case where a link text should be in a
> language different from that of the linked document, the situation
> should be clarified explicitly, e.g. by adding "(in French)" after
> the link text, or maybe "(fr)" when conciseness is needed and such
> notations are explained suitably.

Note that HREFLANG has changed in XHTML 2.0. When we refer to a document 
as in: http://example.org/content and that document is using content 
negotiation to give back the right language. For example; this document 
'content' was written in 'en', 'nl', 'fr' and 'de'.

If I point to it like:

  <a href="http://example.org/content" hreflang="nl">Content</a>

... the user agent should change it's 'Accept-Language' header to 
'Accept-Language:nl', which is imo a great change. HREFTYPE works in a 
similar way.


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>
Received on Wednesday, 28 July 2004 04:30:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT