Copyright ©2002 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
XFrames, an XML application for composing documents together, replacing HTML Frames.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.
This is the first public Working Draft of this specification for review by W3C Members and other interested parties. It is guaranteed to change; anyone implementing it should realize that we will not allow ourselves to be restricted by experimental implementations when deciding whether to change the specification.
This document has been produced by the W3C HTML Working Group (members only) as part of the W3C HTML Activity. Publication as a Working Draft does not imply endorsement by the W3C Membership, nor of members of the HTML Working Group.
Comments on this document should be sent to www-html-editor@w3.org (archive). Public discussion on this document may take place on www-html@w3.org (archive).
At the time of publication, the Working Group believed there were zero patent disclosures relevant to this specification. A current list of patent disclosures relevant to this specification may be found on the Working Group's patent disclosure page.
This document may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.
This section is informative.
Frames were introduced into HTML at version 4.0 [HTML4]. They introduced a manner of composing several HTML documents into a single view to create an application-like interface.
However, Frames introduced several usability problem that caused several commentators to advise Web site builders to avoid them at all costs. Examples of such usability problems are:
noframes
markup is
necessary for user agents that don't support frames. However, almost no
one produces noframes
content, and so it ruins Web searches,
since search engines are examples of user agents that do not support
frames.This document defines a separate XML application, not a part of XHTML per se, that allows similar functionality to HTML Frames, with fewer usability problems, principally by making the content of the frameset visible in its URI.
This section is normative.
This specification defines an XML application called XFrames. It uses the
XML Namespaces [NAME] identifier:
http://www.w3.org/2002/06/xframes
All examples in this document are informative.
The remainder of this section describes the elements and attributes in XFrames, and their semantics.
The XFrames Module supports the following element and attributes:
Element | Attributes | Content Model |
---|---|---|
frames | class (NMTOKENS), id (ID), title (CDATA), xml:base (URI) | head?, (row | column | frame+) |
head | class (NMTOKENS), id (ID), title (CDATA) | title, style* |
title | class (NMTOKENS), id (ID), title (CDATA) | PCDATA |
style | class (NMTOKENS), id (ID), title (CDATA), type* (ContentType) | PCDATA |
row | class (NMTOKENS), id (ID), title (CDATA) | (column | frame)+ |
column | class (NMTOKENS), id (ID), title (CDATA) | (row | frame)+ |
frame | EMPTY |
Implementation: DTD
An XFrames document is a specification for composing several documents,
potentially of different types, together in a view. The frames
element forms the container for the composed document. The individual
sub-documents ('frames') may be composed together in a rectangular space by
placing them next to, or above, each other in rows and columns, or they may
be displayed as separate movable window-like panes, or as tabbed panes, or in
any other suitable manner. The collection of frames in an XFrames document is
referred to as a frameset. The frames
element
has the following additional attribute on top of the set of attributes common
to all elements:
xml:base
The head
element contains meta-data about the document, specifying
a title, and a style sheet.
[[Issue: Include meta
? Include RDF?]]
The title
element contains an identifying text for the document,
that may be used by a user agent to label the document.
The style
element allows the specification of styling instructions
that affect the presentation of the frames in the document. The required
type
attribute specifies the style sheet language of the
element's contents. The style sheet language is specified as a content type
(e.g., "text/css"). A value must be supplied for this attribute; there is no
default value.
The row
element specifies a series of columns and single frames.
The columns and single frames are placed next to each other horizontally,
from left to right.
The column
element specifies a series of rows and single frames.
The rows and single frames are placed one above the other, from top to
bottom.
The frame
element is a place holder for the content of a
document. It has one additional attribute:
source
id
This attribute assigns a name to an element. This name must be unique in an XFrames document. It may be used as a style sheet selector, a target anchor for hypertext links or as a means to reference a particular element for general purpose processing by user agents.
class
This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters. It may be used as a style sheet selector (when an author wishes to assign style information to a set of elements) or for general purpose processing by user agents.
title
All these examples assume at least a surrounding <frames
xmlns="http://www.w3.org/2002/06/xframes">
element. The
id
attributes have been omitted from the
frame
elements for clarity.
<row><frame/><frame/></row>
<column><frame/><frame/></column>
------- | | | |---| | | | | -------
you specify
<row>
<column>
<frame/>
<frame/>
</column>
<frame/>
</row>
------- | | | |-------| | | -------
you specify as
<column>
<row>
<frame/>
<frame/>
</row>
<frame/>
</column>
----- | | |-----| | | | |-----| | | -----
you specify
<column>
<frame/>
<row>
<frame/>
<frame/>
</row>
<frame/>
</column>
----- | | | |-----| | | | -----
can be specified as either a column of two rows, or a row of two columns:
<column>
<row>
<frame/>
<frame/>
</row>
<row>
<frame/>
<frame/>
</row>
</column>
or
<row>
<column>
<frame/>
<frame/>
</column>
<column>
<frame/>
<frame/>
</column>
</row>
An XFrames document is referenced by a URI [URI] of
the form
http://example.org/home.frm#frames(id1=uri1,id2=uri2,...)
. Each
id
identifies a frame
element within the document
with an id
attribute with that value. Each associated URI is
then assigned to that frame. If there is no frame with that id
,
the URI is ignored. If a frame within the document is not populated (because
it has no id
attribute, or because there is no parameter that
uses its id), and it has a source
attribute, the URI in that
attribute is used instead. If an unpopulated frame has no source
attribute, the frame is left blank.
Relative parameter URIs are interpreted relative to the XFrames document,
taking into account any xml:base
[XMLBASE] value on the <frames>
element.
Having associated URIs to the frames, the XFrames document is displayed accordingly.
For example, in a document home.xfm
, describing the following
layout
------- | | | |---| | | | | -------
as
<row>
<column>
<frame id="a"/>
<frame id="b"/>
</column>
<frame id="c" source="main.xml"/>
</row>
and populated as follows
home.xfm#frames(a=one.xhtml,b=two.xhtml,c=three.xhtml)
the frames would be populated by assigning one.xhtml
to the
frame with id="a"
, two.xhtml
to the frame with
id="b"
, and three.xhtml
to the frame with
id="c"
:
------- | 1 | | |---| 3 | | 2 | | -------
Populated as follows:
home.xfm#frames(a=one.xhtml,b=two.xhtml)
the frame with id="c"
would be populated with
main.xml
.
Populated as follows
home.xfm#frames(a=one.xhtml)
the frame with id="b"
would additionally be left blank.
Populated as follows:
home.xfm#frames(z=nav.xml)
the frames with id="a"
and id="b"
would be
blank, and the frame with id="c"
would be associated with
main.xml
(and nav.xml
would be ignored).
If a document assigned to a frame contains hyperlinks, and one of these is activated by some means (such as by the user clicking on it), then the URI of that hyperlink is normally assigned to the frame instead, and the XFrames document is redisplayed.This changes the URI associated with the frameset, by adding or replacing an association between the frame and the URI for the frame document; this would normally be visible to the user. If the frame containing the document does not have an id attribute, so that such an association is not possible, the entire frameset is replaced by the linked-to document.
If the hyperlink is in some way targetted (for instance by being
associated with a target attribute in XHTML 1.0 [XHTML]), then in the containing frameset a frame
with an id
equal to the target is located, and the URI is
associated with that frame instead. If the current frameset contains no such
id
, but the frameset is associated with a frame in another
frameset, then the process continues with that frameset, and so on. If no
matching id
is found, then the targetted resource is processed
in an entirely new environment (for instance, a visual browser might open a
new window).
All styling, positioning, and sizing of frames is done using a style sheet
in CSS or some other suitable styling language. This means that there is
nothing normative in the names <row>
and
<column>
except a suggestion on how they should be
rendered, and a default presentation in the absence of a stylesheet. If the
<frames>
element contains only <frame>
elements (and no <row>
and <column>
elements), the default is to render them as tabbed or overlapping panes.
In the absence of height and width information from a style sheet, rows and columns are divided equally over the space available to them without regards to their content (so in a column of three frames, each frame is allocated one third of the height of the column; with a column of two frames and a row, the row is still allocated one third of the height of the column, even if the row itself contains more columns; in a column of three frames where one frame has been assigned a height, the remaining space is divided over the other two frames).
Note that the stylesheet in an XFrames document has no effect on the contents of any frame.
[[Issue: applying stylesheets to contents of frames? <frame stylesheet="override.css"/>]]
[[Issue: use the CSS table layout algorithm instead?]]
[[Issue: require a minimum level of CSS for setting widths and heights as percentages, so that in the absence of a CSS you still have some interoperable control over layout?]]
[[Issue: add additional suggestive elements, such as <tabbed>?]]
This specification does not require conformant XFrames user agents to accept or refuse any particular type of document for assignment to a frame.
This appendix is normative.
[To come]
This appendix is normative.
This section is informative.
At the time of publication, the members of the W3C HTML Working Group were:
List will be inserted when this document becomes a Recommendation.