2012-08-29 15:33 Europe/Helsinki: Robert Hanson:
> I guess I don't have a server that will deliver up Content-Type:
> application/xhtml+xml, so I haven't been able to test that. Is there a way
> to coerce that for a browser? Do you have an example page that does that?

The only way to do that over HTTP is to get the server to emit
content-type application/xhtml+xml. You can get the browser to consider
a local file as application/xhtml+xml if you call it e.g. "index.xhtml".
Technically it should be okay to call it "index.xml" but in that case
the content type is application/xml which *should* work but in real
world probably does not.

I don't have a public web page that contains jmol and is served as
application/xhtml+xml.

Note that real XHTML5/XML files must declare the namespace for the
<html> element, like this:

  <html
    xmlns="http://www.w3.org/1999/xhtml";
    xml:lang="fi"
    lang="fi"
    dir="ltr">

The "xml:lang" and "lang" and "dir" are all optional. Officially,
"xml:lang" will declare the content language for any XML document but
that does not work correctly in Firefox 14 or lesser (automatic
hyphenation of body text requires supported language). Officially the
<html> element does not have "lang" attribute in XHTML mode but Firefox
uses only that attribute to figure out the content language. Of course,
if your content language is not Finnish (left to right), then you want
to say something else for the lang and dir attributes.

PS. to get automatic hyphenation to work, you'll need extra CSS like this:

body
{
        -webkit-hyphens: auto; /* http://crbug.com/47083 */
        -moz-hyphens: auto; /* Firefox 8.0+  */
        -ms-hyphens: auto; /* MSIE 10.0+ */
        hyphens: auto; /* future browers */
}

/* Webkit (iOS safari and friends) fixes
(http://code.google.com/p/hyphenator/wiki/en_CSS3Hyphenation) */
[lang='en'] {
        -webkit-locale: 'en';
}
[lang='fi'] {
        -webkit-locale: 'fi';
}
[lang='sv'] {
        -webkit-locale: 'sv';
}
/* Check for UA auto hyphenation support at
http://hyphenator.googlecode.com/svn/dictChecker.html */

-- 
Mikko


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to