Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Then xmlns attribute in the XHTML DOM Date: Tue, 07 Jun 2016 20:29:53 +0200 Organization: PointedEars Software (PES) Lines: 35 Message-ID: <2430820.NM7pdxVHKh@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1465324194 22044 eJwVyMkRgDAMBLCW4huXY9Zs/yVk0FNhKYnyjPRg0Gu74vg8hK2FUo9i6CCTeD8Z2a3/0rtxASQ4Eb4= (7 Jun 2016 18:29:54 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 7 Jun 2016 18:29:54 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYEBwCAIA7CXqtDizkGQ/09YQtNShYtyDgc9X3kpbYDAlaUiuBN7XutEHJAo+h4kFNWr0i7fWOd7P0dDFa8= Cancel-Lock: sha1:YgnnggEiYbvvL94E77w7Bk05+Dg= X-NNTP-Posting-Host: eJwFwYERADEIArCVioJe16kv+4/wibJQ0ywVZbl1MhB77kuvaCd6vE4W+yAIj+obvBBGPwtfEJM= Xref: csiph.com comp.lang.javascript:30646 Stefan Ram wrote: > span = document.createElement( 'span' ); > span.setAttribute( "xmlns", "http://www.w3.org/1999/xhtml" ); > document.getElementById( "example" ).appendChild( span ); > > , or > > span = document.createElementNS( "http://www.w3.org/1999/xhtml", "span" ); > document.getElementById( "example" ).appendChild( span ) > > , or even just > > span = document.createElement( 'span' ); > document.getElementById( "example" ).appendChild( span ) > > . Which of these three approaches is correct? The latter two. > Especially, I'd like to know whether the last one, the one > that does no mention »w3.org«, already is correct.) It is: Next time, RTFSpec. (It is not the first time that you should have done that before you posted.) -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.