- From: CVS User lsilli <cvsmail@w3.org>
- Date: Thu, 26 Sep 2013 16:17:08 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-xhtml-author-guide In directory roscoe:/tmp/cvs-serv13670/html-xhtml-author-guide Modified Files: html-xhtml-authoring-guide.html Log Message: Added a note more about [*|xlink] in the first paragraph of #css-and-namespaced-attributes --- /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html 2013/09/26 16:01:57 1.136 +++ /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html 2013/09/26 16:17:08 1.137 @@ -1036,15 +1036,16 @@ <section id="css-and-namespaced-attributes" class="section"> <h3>CSS: Attribute selectors that require a namespace prefix</h3> <p>CSS allows authors to select elements by referencing their attributes using so called attribute selectors: - <code class="css">[attr]{rule:foo}</code>. And for the most part, attribute selectors can be used freely - since <a>polyglot markup</a> relies on default namespaces, which do not affect attributes. - However, some of the attributes required by <a>polyglot markup</a>, are namespaced – either by default (such - as for the <code>xmlns</code> attribute) or via a prefix that by default is namespaced (such as <code>xml:</code>, - <code>xmlns:</code>, <code>xlink:</code>). Extension specs might allow even other namespaced attributes than - those defined by the HTML specification. As result, a selector such as <code class="css">[xmlns]{rule:foo}</code> - will only work in HTML – it will not work in XHTML, where it is a namespace attribute. And the same goes for prefixed - attributes – even if one escapes the colon (<code class="css">[xml\:lang]{rule:foo}</code>), such selectors - will only work in HTML.</p> + <code class="css">[attr]{rule:foo}</code>. And for the most part, attribute selectors can be used freely + since <a>polyglot markup</a> relies on default namespaces, which do not affect attributes. + However, some of the attributes required by <a>polyglot markup</a>, are namespaced – either by default (such + as for the <code>xmlns</code> attribute) or via a prefix that by default is namespaced (such as <code>xml:</code>, + <code>xmlns:</code>, <code>xlink:</code>). Extension specs might allow even other namespaced attributes than + those defined by the HTML specification. As result, a selector such as <code class="css">[xmlns]{rule:foo}</code> + will only work in HTML – it will not work in XHTML, where it is a namespace attribute. And the same goes for prefixed + attributes – even if one escapes the colon (<code class="css">[xml\:lang]{rule:foo}</code>), such selectors + will only work in HTML, except that for the namespace declaration for the <code>xlink:</code> prefix, then + it works like in XML even in the HTML syntax and must thus be selected in a namespaced way in both syntaxes.</p> <p>To be able to select namespaced attributes in XML, the attribute selector must include a <a href="http://www.w3.org/TR/css3-selectors/#attrnmsp">namespace prefix</a>. [[!SELECT]]</p>
Received on Thursday, 26 September 2013 16:17:10 UTC