On 27.03.2004 11:26, beyaNet Consultancy wrote:
Hi Marc,
I am trying to achieve the following:

1. Determine, in my sitemap, whether a browser is XHTML 1.1 compatible. If it is, the XHTML 1.1 serializer is used, which when view sourced in the browser you see:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd";>


Now, as part of the XHTML 1.1 specification you also need to say the following in the <html> tag:

<html xmlns="http://www.w3.org/1999/xhtml";>

I have not found a way in the serialization process of writing the xmlns line into the <html> tag if the browser viewing the site is XHTML 1.1 compatible, so I thought maybe if I specify UTF-8 as the encoding type for XHTML 1.1 browsers and a different encoding type for non 1.1 browsers, I could then dynamically write the xmlns line into the tag if the browser was XHTML 1.1 compatible.

Do you know of a more efficient way I could probably do this?

Peter

This is only possible by operating on the XML stream, for example using an additional stylesheet that puts all your HTML elements into XHTML namespace. But wouldn't it be possible to put them always in that namespace, i.e. does not the HTMLSerializer remove this namespace?


Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to