Click to See Complete Forum and Search --> : Mixing and Matching acceptable?


Mr Initial Man
12-17-2007, 04:01 AM
Is it appropriate to mix and match markups by using, say, XHTML 1.1 as a base language, and filling in the gaps with something else? Something along the lines of, say...


<html
xml:lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:forms="http://www.w3.org/2002/xforms"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:tei="[Whatever the namespace is]"
xmlns:mine="[XML for my own elements]"
>

I know it would be impossible to validate, but would something like this be acceptable?

Mr Initial Man
01-10-2008, 12:38 PM
*Poke*

jkmyoung
01-11-2008, 11:30 AM
Declaring the namespaces themselves would be correct. Declaring elements from other namespaces inside the xhtml would only be acceptable if the schema for xhtml allows other elements in the locations you've declared.

Mr Initial Man
01-11-2008, 03:50 PM
Damn. I've been trying to use XForms inside XHTML. BTW, can namespaces replace Doctypes?

jkmyoung
01-11-2008, 04:04 PM
Not really. Most browsers examine the doctype at the beginning, to know how to interpret the rest of the document.

I suggest getting the right doctype from here: http://www.alistapart.com/articles/doctype/