Please login or register.

Login with username, password and session length
Advanced search  


Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Xhtml2.0 coming soon?  (Read 1357 times)


  • Guest
Xhtml2.0 coming soon?
« on: April 20, 2007, 02:11:47 pm »

I saw an article in Linux Format recently and I am not sure whether to learn this new version as of yet.  Anyone know if it is being supported by any of the browsers yet?  I didn't check personally.

Differences between xhtml1 and 2 from the
XHTML 2 is designed to be recognizable to the HTML and XHTML 1 author, while correcting errors and insufficiencies identified in earlier versions of the HTML family, and taking the opportunity to make improvements.

The most visible changes are the following:

    * More structuring possibilities:
          o Sections and headings: in previous versions of HTML a document's structure had to be inferred from the various levels of headings in the document; this was particularly a problem when authors misused the heading elements for visual effects. XHTML 2 lets you explicitly markup the document structure with the section element, and its related header element h.
          o Separators: in previous versions of HTML, the hr element was used to separate sections of a text from each other. In retrospect, the name hr (for horizontal rule) was misleading, because an hr was neither necessarily horizontal (in vertical text it was vertical), nor necessarily a rule (books often use other typographical methods such as a line of three asterisks to represent separators, and style sheets can be used to give you this freedom). In order to emphasize its structuring nature, to make it more widely usable, and to make it clearer that it has no essential directionality, hr has been renamed separator.
          o Line breaks: in previous versions of HTML, the br element was used to add micro-structure to text, essentially breaking a piece of text into several 'lines'. This micro-structure is now made explicit in XHTML 2 with the l element, which encloses the text to be broken. Amongst other advantages, this gives more presentational opportunities, such as the ability to automatically number lines, or to color alternate lines differently.
          o Paragraph structure: in earlier versions of HTML, a p element could only contain simple text. It has been improved to bring it closer to what people perceive as a paragraph, now being allowed to include such things as lists and tables.
    * Navigation lists: Part of the design of XHTML 2 has been to observe existing use of HTML and identify what is perceived as missing, for instance by use of scripting to achieve ends not supported directly in HTML. One obvious component of very many HTML pages is the 'navigation list', consisting of a collection of links to other parts of the site, presented vertically, horizontally, or as a drop-down menu. To support this type of usage, XHTML 2 introduces the navigation list element nl, which codifies such parts of documents, and allows different presentational idioms to be applied. An additional advantage is for assistive technologies, that can allow the user to skip such elements.
    * Images: the HTML img element has many shortcomings: it only allows you to specify a single resource for an image, rather than offering the fallback opportunities of the object element; the only fallback option it gives is the alt text, which can only be plain text, and not marked up in any way; the longdesc attribute which allows you to provide a long description of the image is difficult to author and seldom supported.

      XHTML 2 takes a completely different approach, by taking the premise that all images have a long description and treating the image and the text as equivalents. In XHTML 2 any element may have a src attribute, which specifies a resource (such as an image) to load instead of the element. If the resource is unavailable (because of network failure, because it is of a type that the browser can't handle, or because images have been turned off) then the element is used instead. Essentially the longdesc has been moved into the document, though this behavior also mimicks the fallback behavior of the object element. (To achieve the tooltip effect that some browsers gave with the alt attribute, as in HTML 4 you use the title attribute).
    * Type: in HTML 4, the srctype attribute when referring to an external resource was purely a hint to the user agent. In XHTML 2 it is no longer a hint, but specifies the type(s) of resource the user agent must accept.
    * Tables: the content model of tables has been cleaned up and simplified, while still allowing the same functionality.
    * Bi-directional text: rather than use an explicit element to describe bi-directional override, new values have been added to the dir attribute that allow bi-directional override on any element.
    * Edit: rather than use explicit ins and del elements to mark changes in a document, an attribute edit may be used on any element for the same purpose.
    * Linking: In HTML 3, only a elements could be the source and target of hyperlinks. In HTML 4 and XHTML 1, any element could be the target of a hyperlink, but still only a elements could be the source. In XHTML 2 any element can now also be the source of a hyperlink, since href and its associated attributes may now appear on any element. So for instance, instead of
  • Home
  • , you can now write
  • Home
  • . Even though this means that the a element is now strictly-speaking unnecessary, it has been retained.
        * Metadata: the meta and link elements have been generalized, and their relationship to RDF [RDF] described. Furthermore, the attributes on these two elements can be more generally applied across the language.
        * Role: in order to aid adding semantics to documents, the role attribute has been added, along with an initial set of useful values, in order to classify the use of a particular element. For instance a paragraph may play the role of a note, and so may be marked up


          Events: event handling in HTML was restricted in several ways: since the event names were hard-wired in the language (such as onclick), the only way to add new events was to change the language; many of the events (such as click) were device-specific, rather than referring to the intent of the event (such as activating a link); you could only handle an event in one scripting language it was not possible to supply event handlers in the same document for several different scripting languages.

          XHTML 2 uses XML Events [XMLEVENTS] to specify event handling, giving greater freedom in the ability to handle events. Along with this, the script element has been renamed handler to indicate its different semantics.
        * Forms: HTML Forms were introduced in 1993, before the advent of the e-commerce revolution. Now with more than a decade of experience with their use, they have been thoroughly overhauled and updated to meet the needs of modern forms, in the shape of XForms [XFORMS], which are an integral part of XHTML 2.
        * Ownership where due: since HTML 4 was a standalone application, it defined many things which no longer need to be defined now that it is an XML application. For instance the definitions of whitespace are given by XML for input, and CSS for output; similarly, the definition of values of the media attribute are relegated to the relevant style sheet language.
        * Frames and Framesets: In HTML 4 multi-panel "pages" could be described using the frameset and frame elements. The Frames model is no longer defined in XHTML. Instead, if is defined through the separate [XFRAMES] specification.



    • Guest
    Xhtml2.0 coming soon?
    « Reply #1 on: May 24, 2007, 09:27:56 pm »

    to add to this....and this might seem like i'm throwing a stone in the bush (duck if you're hiding!)...why is snews built with xhtml? xhtml is certainly not more standards valid than a properly constructed html4.01 page. also, xhtml is not that widely 'accepted', if i could use that term. is it to make provision for those who do make use of XML? cos i don't see XML used in the default installation of snews.

    just a question...


    • Guest
    Xhtml2.0 coming soon?
    « Reply #2 on: May 24, 2007, 11:06:15 pm »

    If I recall RSS is XML, which is built in sNews