Namespace support

The primary enhancement to the DOM standard provided by this release concerns its support for namespaces. A number of new methods have been added to access and create elements and attributes that use the Namespaces standard. This support also ensures that elements that are moved from one part of a DOM structure to another part of the structure retain their namespace identity. Methods with names ending '…NS' are used to create, access and modify elements and attributes without needing to know the namespace prefixes used.

Consider the following document fragment, which declares the prefix 'H' for the HTML 4.0 namespace, and includes a Span element with a Style attribute. This fragment is referenced in numerous examples below, which focus on the embedded Span element and Style attribute:

<H:html xmlns:H="http://www.w3.org/TR/REC-html40">
  ... <H:span H:style="color:red">...</H:span> ...
</H:html>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.56.45