W3C home > Mailing lists > Public > www-html@w3.org > December 2004

XHTML: Combine p and section?

From: Daniel Kraft <d@daniel-kraft.net>
Date: Tue, 21 Dec 2004 15:52:21 +0000
To: <www-html@w3.org>

Dear XHTML-Working-Group,
first, I think it was a very important change to allow paragraphs to contain, for instance, lists.
But as the semantics of paragraphs are to form the lowest-level-grouping in the structure of a document, I'd like to see the p and section elements combined to only one element (called 'ps' later on).

ps-elements which don't contain ps-children represent a paragraph as the current p-element. If they have nested ps's, they act as a "super-paragraph", which groups its children (as the current section-element (or eventually the div-element) does).

Look at the following piece of a XSLT-stylesheet which transforms ps into p and section (default-namespace is bound to http://www.w3.org/1999/XSL/Transform", and prefix html is bound to "http://www.w3.org/1999/xhtml"):

<!-- Super-Paragraphs -->
<template match="html:ps[.//html:ps]" priority="2">
  <copy-of select="@*" />
  <apply-templates />

<!-- Ordinary Paragraphs -->
<template match="html:ps" priority="1">
  <copy-of select="@*" />
  <apply-templates />

<!-- Copy all other elements -->
<template match="*" priority="-1">
  <copy-of select="@*" />
  <apply-templates />

Daniel Kraft
Received on Tuesday, 21 December 2004 21:45:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:09 UTC