Content-Length: 60943 | pFad | https://www.w3.org/TR/2002/WD-hlink-20020913/

HLink: Link recognition for the XHTML Family
W3C

HLink

Link recognition for the XHTML Family

W3C Working Draft 13 September 2002

This version:
http://www.w3.org/TR/2002/WD-hlink-20020913
Latest version:
http://www.w3.org/TR/hlink
Editors:
Steven Pemberton, CWI/W3C
Masayasu Ishikawa, W3C

Abstract

The HLink module defined in this specification provides XHTML Family Members with the ability to specify which attributes of elements represent Hyperlinks, and how those hyperlinks should be traversed, and extends XLink use to a wider class of languages than those restricted to the syntactic style allowed by XLink.

Status of This Document

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 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 specifications.

This document has been produced by the 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.

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.

At the time of publication, the Working Group believed there were no 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 is for public review. Please send review comments to www-html-editor@w3.org (archive). Public discussion on this document may take place on the mailing list www-html@w3.org (archive).

Contents

1. Introduction

This section is informative.

This document defines markup that can be used to describe links in XHTML Family members. It consists of two elements that are used to associate properties with markup elements and attributes to describe how they behave as links. Many of the descriptive properties are taken from XLink [XLINK], but with additions to support the behaviour of links in XHTML.

2. The HLink Module

This section is normative.

This specification defines a module called HLink. The module uses the XML Namespaces [NAME] identifier http://www.w3.org/2002/06/hlink.

Examples in this document that use the namespace prefix "hlink" all assume an xmlns declaration xmlns:hlink="http://www.w3.org/2002/06/hlink" somewhere suitable in the document involved. All examples are informative.

The remainder of this section describes the elements and attributes in this module, the semantics, and provides an abstract module definition as required in [XHTMLMOD].

The HLink Module supports the following element and attributes:

Element Attributes Minimal Content Model
hlinks - hlink+
hlink namespace* (URI), element (NAME), locator (CDATA), effect (CDATA), actuate (CDATA), replacement (CDATA), role (CDATA), reverseRole (CDATA), shape (CDATA), coords (CDATA), arcrole (CDATA), label (CDATA), from (CDATA), to (CDATA), mediaType (CDATA), onSuccess (CDATA), onFailure (CDATA) EMPTY

Implementations: DTD, RELAX NG, XML Schema

2.1. The hlinks Element

The hlinks element exists only to be a root element for a document containing only hlink elements.

[[Issue: you could define inheritance in nested <hlink> elements:

<hlink namespace="...">
    <hlink element="a" ... />
    <hlink element="b" ... />
</hlink>

This would make writing descriptions easier, and make an outer <hlinks> unnecessary, though at the cost of complicating implementation]]

2.2. The hlink Element

Element hlink is used to identify an element and/or attributes within a namespace, and associate properties with them to specify how the element should be treated as a link, or how the attributes contribute to an element that is a link. The hlink element has the following attributes:

namespace
This required attribute specifies a namespace URI that the element identified in the element attribute belongs to, or the other attributes when the element attribute is omitted.
element
This optional attribute specifies an element, in the namespace identified by the attribute namespace. The rest of the attributes below specify properties of this element. If this attribute is absent, then the attributes describe global attributes (as defined in [NAME]) within the namespace instead; these attributes then describe the element that they are actually on in the markup. If this attribute has the special value "*" then the rest of the attributes describe all suitable elements in the namespace (as defined by a DTD or schema)

Each remaining attribute can be used in one of two ways: either it specifies a value that indicates how the element is to behave as a link-related element, or if the value of the attribute begins with the character "@", it specifies the name of an attribute on the element being defined that supplies the value. For instance:

locator="http://www.w3.org/"

says that the element in question is a locator for a fixed URI, namely http://www.w3.org/. On the other hand

locator="@href"

says that the element in question has an attribute called href, that contains the URI of the locator.

The remaining attributes are:

locator
This attribute specifies a URI-reference [anyURI] for the link. There is no default value. [[Issue: URI lists, like html:archive]]
effect
This attribute specifies the effect of actuating the link. It has the following possible values:
new
The resource identified by the locator is loaded in a new context. For instance in a windowing environment, the resource is loaded in a new window.
replace
A suitable context, as identified by the replacement attribute is located, and the resource in that context is replaced by the resource identified by the locator. If no such resource can be located, a new context with that name is created, initialised with the identified resource. If the replacement is absent (either directly by not being present on the hlink element, or indirectly, by being present but referring to an attribute on the described element, that in its turn is not present), then the initiating resource is replaced by the resource identified by the locator.
embed
The resource identified by the link should be considered to be embedded in the initiating resource. This includes images and other media resources, as well as such resources as scripts and style sheets.
submit
The locator is used to submit a form [[More needs to be done here]]
map
The locator is to a resource that itself is a further link that describes how the presentation of the current link is to be interpreted as a series of links to further resources. [[More/better]]

The default value is replace.

actuate
This attribute specifies the manner that the link should or can be actuated. It has the following possible values:
onLoad
Actuation of the link is done on loading the initiating resource.
onRequest
Actuation is done by the user using the primary actuation method or by a method (such as scripting) imitating this behavior.
onRequestSecondary
Actuation is done by the user using a secondary actuation method or by a method (such as scripting) imitating this behavior. For instance, an element specifying a link (such as XHTML's <a> element) may contain an image (for instance using XHTML's <img/> element) that itself has a descriptor to a link describing that image (such as XHTML's longdesc attribute). The primary actuation would activate the <a> element; therefore there is a need for a secondary actuation method that allows accessing other links accessible from that point.

The default value is onRequest.

replacement
This attribute specifies an environment in the case that the attribute effect is present, with the value replace. If effect is not present, or does not have the value replace, this attribute has no effect.
role

This attribute gives information to the user agent about the role the link plays. [[More]]

[[These are the values that rel and rev can take according to HTML 4: Contents Glossary Copyright Chapter Section Subsection Appendix Help Bookmark Index Next Prev Alternate Start Stylesheet, and other specifications have added other values; e.g. P3P]]

reverseRole
[[Possible?]]
shape
[[for image maps: default rect circle poly]]
coords
[[For image maps: list of coordinates [[or percentages?]]]]
arcrole
See Xlink [XLINK] for description.
label
See Xlink [XLINK] for description.
from
See Xlink [XLINK] for description.
to
See Xlink [XLINK] for description.
mediaType
This attribute may be used to specify the media type of the linked-to resource. A user agent may use this attribute to decide whether to actuate a link or not, depending on whether it can process a resource of the indicated type, or it may prefer to ignore this attribute and query the resource directly.
onSuccess
This attribute indicates the required processing after successfully actuating a link that has an effect of embed and an actuate of onLoad. It has two values:
processChildren
processing should continue by processing the children of the element
ignoreChildren
processing should continue by ignoring the children of the element

(If the element has no children, these two values are equivalent)

The default value is ignoreChildren.

onFailure
This attribute indicates the required processing when a link that has an effect of embed and an actuate of onLoad cannot be actuated, either because of network failure or the resource not being available or found, or because the user agent cannot process the resource or the mediaType attribute indicates that the user agent would not be able to process the resource. It has four possible values:
processChildren
processing should continue by processing the children of the element
ignoreChildren
processing should continue by ignoring the children of the element
warn
processing continues, though it must be made obvious to the user that the actuation failed
fail
processing stops with an error message

The default value is warn.

[[Issue: onSuccess and onFailure need more work to cover other onLoad cases]]

[[Issue: markup for case where link has a side-effect]]

[[Issue: img map]]

[[Issue: form submit]]

2.3. Examples

  1. The definition of the <a href="..."> element in XHTML:
    <hlink namespace="http://www.w3.org/1999/xhtml"
           element="a"
           locator="@href"
           effect="replace"
           actuate="onRequest"
           replacement="@target"/>
  2. Defining <img/> in XHTML
    <hlink namespace="http://www.w3.org/1999/xhtml"
           element="img"
           locator="@src"
           effect="embed"
           actuate="onLoad"
           onFailure="warn"/>
    <hlink namespace="http://www.w3.org/1999/xhtml"
           element="img"
           locator="@longdesc"
           effect="new"
           actuate="onRequestSecondary"/>
    <hlink namespace="http://www.w3.org/1999/xhtml"
           element="img"
           locator="@usemap"
           effect="map"
           actuate="onLoad"/>
  3. Defining <object> in XHTML
    <hlink namespace="http://www.w3.org/1999/xhtml"
           element="object"
           locator="@data"
           effect="embed"
           actuate="onLoad"
           onFailure="processChildren"
           onSuccess="ignoreChildren"/>
  4. Defining a new <home/> element
    <hlink namespace="http://www.example.com/markup"
           element="home"
           locator="/"
           effect="replace"
           actuate="onRequest"/>
    <hlink namespace="http://www.example.com/markup"
           element="home"
           locator="/icons/home.png"
           effect="embed"
           actuate="onLoad"/>

    In the context of this definition, and the namespace declaration

    xmlns="http://www.example.com/markup"

    the markup

    <home/>

    will display a clickable icon that takes the user to the home page.

  5. Defining redirection:
    <hlink namespace="http://www.example.com/markup"
           element="redirect"
           locator="@href"
           effect="replace"
           actuate="onLoad"/>

    In the context of this definition and a suitable namespace declaration, the following markup will cause the initiating resource to be redirected:

    <redirect href="whereever">This page has moved</redirect>
  6. Defining <html:blockquote>
    <hlink namespace="http://www.w3.org/1999/xhtml"
           element="blockquote"
           locator="@cite"
           effect="new"
           actuate="onRequestSecondary"/>
  7. Defining RDF
    <hlink namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           element="Description"
           locator="about"
           effect="new"
           actuate="onRequestSecondary"/>
    <hlink namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           locator="resource"
           effect="new"
           actuate="onRequestSecondary"/>

3. Usage

This section is normative.

There are two ways to use HLink. The first is [[by putting the <hlink>s in the <head>, and the other by putting them in a separate resource, and referring to that resource by a hlink:definition URI attribute on the root element of the document

Either this

<html hlink:definition="http://www.example.org/whatever" ...>

or this:

<html ...>
<head>
    <hlink:hlink ... />
    ...
</head>

]]

A. Module Implementations

This appendix is normative.

A.1. DTD Implementation

A.1.1. HLink DTD

<?xml version="1.0" encoding="UTF-8"?>
<!-- ...................................................................... -->
<!-- HLink DTD ............................................................ -->
<!-- URI: http://www.w3.org/2002/06/hlink.dtd

     This is HLink - a link recongnition mechanism for the XHTML Family.

     Copyright ©2002 W3C (MIT, INRIA, Keio), All Rights Reserved.

       Editor:   Masayasu Ishikawa <mimasa@w3.org>
       Revision: $Id: hlink.dtd,v 1.3 2002/09/06 20:04:18 mimasa Exp $

     Permission to use, copy, modify and distribute the HLink DTD and its 
     accompanying documentation for any purpose and without fee is hereby 
     granted in perpetuity, provided that the above copyright notice and 
     this paragraph appear in all copies.  The copyright holders make no 
     representation about the suitability of this DTD for any purpose.

     It is provided "as is" without expressed or implied warranty.

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

       PUBLIC "-//W3C//DTD HLink 1.0//EN"
       SYSTEM "http://www.w3.org/2002/06/hlink.dtd"

     Revisions:
     (none)
     ....................................................................... -->

<!-- HLink

     hlinks, hlink

     This HLink DTD declares elements and attributes defining
     HLink, a link recongnition mechanism for the XHTML Family.
-->

<!-- Datatypes

     defines containers for the following datatypes, many of
     these imported from other specifications and standards -
     not quite used at the moment.
-->

<!-- media type, as per [RFC2045] -->
<!ENTITY % ContentType.datatype "CDATA" >

<!-- comma separated list of coordinates to use in defining areas -->
<!ENTITY % Coords.datatype "CDATA" >

<!-- space-separated list of link types -->
<!ENTITY % LinkTypes.datatype "NMTOKENS" >

<!-- the shape of a region -->
<!ENTITY % Shape.datatype "( default | rect | circle | poly )">

<!-- a Uniform Resource Identifier reference, as per anyURI in
     XML Schema Part 2 [SCHEMA]
-->
<!ENTITY % URI.datatype "CDATA" >

<!-- HLink Qname (Qualified Name) Module -->
<!ENTITY % hlink-qname.mod
    PUBLIC "-//W3C//ENTITIES HLink Qualified Names 1.0//EN"
           "hlink-qname.mod" >
%hlink-qname.mod;

<!-- hlinks element .................................... -->
<!ELEMENT %HLINK.hlinks.qname; ( %HLINK.hlink.qname; )+ >
<!ATTLIST %HLINK.hlinks.qname;
    %HLINK.xmlns.attrib;
>

<!-- hlink element ..................................... -->
<!ELEMENT %HLINK.hlink.qname; EMPTY >
<!ATTLIST %HLINK.hlink.qname;
    %HLINK.xmlns.attrib;
    namespace   %URI.datatype; #REQUIRED
    element     NMTOKEN        #IMPLIED
    locator     CDATA          #IMPLIED
    effect      CDATA          #IMPLIED
    actuate     CDATA          #IMPLIED
    replacement CDATA          #IMPLIED
    role        CDATA          #IMPLIED
    reverseRole CDATA          #IMPLIED
    shape       CDATA          #IMPLIED
    coords      CDATA          #IMPLIED
    arcrole     CDATA          #IMPLIED
    label       CDATA          #IMPLIED
    from        CDATA          #IMPLIED
    to          CDATA          #IMPLIED
    mediaType   CDATA          #IMPLIED
    onSuccess   CDATA          #IMPLIED
    onFailure   CDATA          #IMPLIED
>

<!-- end of hlink.dtd -->

A.1.2. HLink Qname Module

<?xml version="1.0" encoding="UTF-8"?>
<!-- ....................................................................... -->
<!-- HLink Qname Module  ................................................... -->
<!-- URI: http://www.w3.org/2002/06/hlink-qname.mod

     This is HLink - a link recongnition mechanism for the XHTML Family.

     Copyright ©2002 W3C (MIT, INRIA, Keio), All Rights Reserved.

     Revision: $Id: hlink-qname.mod,v 1.2 2002/09/06 16:43:51 mimasa Exp $

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

       PUBLIC "-//W3C//ENTITIES HLink Qualified Names 1.0//EN"
       SYSTEM "http://www.w3.org/2002/06/hlink-qname.mod"

     Revisions:
     (none)
     ....................................................................... -->

<!-- HLink Qname (Qualified Name) Module

     This module is contained in two parts, labeled Section 'A' and 'B':

       Section A declares parameter entities to support namespace-
       qualified names, namespace declarations, and name prefixing
       for HLink and extensions.

       Section B declares parameter entities used to provide
       namespace-qualified names for all HLink element types:

         %HLINK.hlinks.qname;   the xmlns-qualified name for <hlinks>
         ...
-->

<!-- Section A: HLink XML Namespace Framework :::::::::::::::::::: -->

<!-- 1. Declare a %HLINK.prefixed; conditional section keyword, used
        to activate namespace prefixing. The default value should
        inherit '%HLINK.NS.prefixed;' from the DTD driver, so that unless
        overridden, the default behaviour follows the overall DTD
        prefixing scheme.
-->
<!ENTITY % HLINK.NS.prefixed "IGNORE" >
<!ENTITY % HLINK.prefixed "%HLINK.NS.prefixed;" >

<!-- 2. Declare a parameter entity (eg., %HLINK.xmlns;) containing
        the URI reference used to identify the HLink namespace
-->
<!ENTITY % HLINK.xmlns  "http://www.w3.org/2002/06/hlink" >

<!-- 3. Declare parameter entities (eg., %MODULE.prefix;) containing
        the default namespace prefix string(s) to use when prefixing
        is enabled. This may be overridden in the DTD driver or the
        internal subset of an document instance. If no default prefix
        is desired, this may be declared as an empty string.

     NOTE: As specified in [XMLNAMES], the namespace prefix serves
     as a proxy for the URI reference, and is not in itself significant.
-->
<!ENTITY % HLINK.prefix  "hlink" >

<!-- 4. Declare parameter entities (eg., %HLINK.pfx;) containing the
        colonized prefix(es) (eg., '%HLINK.prefix;:') used when
        prefixing is active, an empty string when it is not.
-->
<![%HLINK.prefixed;[
<!ENTITY % HLINK.pfx  "%HLINK.prefix;:" >
]]>
<!ENTITY % HLINK.pfx  "" >

<!-- declare qualified name extensions here ............ -->
<!ENTITY % hlink-qname-extra.mod "" >
%hlink-qname-extra.mod;

<!-- 5. The parameter entity %HLINK.xmlns.extra.attrib; may be
        redeclared to contain any non-HLink namespace declaration
        attributes for namespaces embedded in XML. The default
        is an empty string.  XLink should be included here if used
        in the DTD.
-->
<!ENTITY % HLINK.xmlns.extra.attrib "" >

<![%HLINK.prefixed;[
<!ENTITY % HLINK.NS.decl.attrib
     "xmlns:%HLINK.prefix;  %URI.datatype;  #FIXED '%HLINK.xmlns;'
      %HLINK.xmlns.extra.attrib;"
>
]]>
<!ENTITY % HLINK.NS.decl.attrib
     "%HLINK.xmlns.extra.attrib;"
>

<!-- Declare a parameter entity %HLINK.NS.decl.attrib; containing all
     XML namespace declaration attributes used by HLink, including
     a default xmlns declaration when prefixing is inactive.
-->
<![%HLINK.prefixed;[
<!ENTITY % HLINK.xmlns.attrib
     "%HLINK.NS.decl.attrib;"
>
]]>
<!ENTITY % HLINK.xmlns.attrib
     "xmlns                   %URI.datatype;  #FIXED '%HLINK.xmlns;'
      %HLINK.xmlns.extra.attrib;"
>

<!-- Section B: XML Qualified Names ::::::::::::::::::::::::::::: -->

<!-- 6. This section declares parameter entities used to provide
        namespace-qualified names for all HLink element types.
-->

<!ENTITY % HLINK.hlinks.qname "%HLINK.pfx;hlinks" >
<!ENTITY % HLINK.hlink.qname "%HLINK.pfx;hlink" >

<!-- end of hlink-qname.mod -->

A.2. RELAX NG Implementation

<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
         ns="http://www.w3.org/2002/06/hlink"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

  <start>
    <choice>
      <ref name="hlinks"/>
    </choice>
  </start>

  <a:documentation>
     HLink in RELAX NG
     URI: http://www.w3.org/2002/06/hlink.rng

     This is HLink - a link recongnition mechanism for the XHTML Family.

     Copyright ©2002 W3C (MIT, INRIA, Keio), All Rights Reserved.

       Editor:   Masayasu Ishikawa (mimasa@w3.org)
       Revision: $Id: hlink.rng,v 1.4 2002/09/06 20:04:18 mimasa Exp $

     Permission to use, copy, modify and distribute the HLink RELAX NG
     schema and its accompanying documentation for any purpose and
     without fee is hereby  granted in perpetuity, provided that
     the above copyright notice and this paragraph appear in all copies.
     The copyright holders make no  representation about the suitability
     of this RELAX NG schema for any purpose.

     It is provided "as is" without expressed or implied warranty.

     Revisions:
     (none)
  </a:documentation>

  <a:documentation>
     HLink

     hlinks, hlink

     This HLink RELAX NG schema declares elements and attributes defining
     HLink, a link recongnition mechanism for the XHTML Family.
  </a:documentation>

  <a:documentation>
     Datatypes

     defines containers for the following datatypes, many of
     these imported from other specifications and standards.
  </a:documentation>

  <define name="AttName">
    <a:documentation>
       the name of an attribute which begins with "@", a la @name
    </a:documentation>
    <data type="string">
      <param name="pattern">@\c+</param>
    </data>
  </define>

  <define name="ContentType">
    <a:documentation>
       media type, as per [RFC2045]
    </a:documentation>
    <text/>
  </define>

  <define name="Coords">
    <a:documentation>
       comma separated list of coordinates to use in defining areas
    </a:documentation>
    <data type="string">
      <param name="pattern"
        >[-+]?(\d+|\d+(\.\d+)?%)(,\s*[-+]?(\d+|\d+(\.\d+)?%))*</param>
    </data>
  </define>

  <define name="LinkTypes">
    <a:documentation>
       space-separated list of link types
    </a:documentation>
    <data type="NMTOKENS"/>
  </define>

  <define name="Shape">
    <a:documentation>
       the shape of a region
    </a:documentation>
    <choice>
      <value>default</value>
      <value>rect</value>
      <value>circle</value>
      <value>poly</value>
    </choice>
  </define>

  <define name="URI">
    <a:documentation>
       a Uniform Resource Identifier reference, as per anyURI in
       XML Schema Part 2 [SCHEMA]
    </a:documentation>
    <data type="anyURI"/>
  </define>

  <define name="hlinks">
    <a:documentation>
       hlinks element
    </a:documentation>
    <element name="hlinks">
      <oneOrMore>
        <ref name="hlink"/>
      </oneOrMore>
    </element>
  </define>

  <define name="hlink">
    <a:documentation>
       hlink element
    </a:documentation>
    <element name="hlink">
      <ref name="hlink.attlist"/>
    </element>
  </define>

  <define name="hlink.attlist">
    <attribute name="namespace">
      <ref name="URI"/>
    </attribute>
    <optional>
      <attribute name="element">
        <data type="NMTOKEN"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="locator">
        <choice>
          <ref name="URI"/>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="effect" a:defaultValue="replace">
        <choice>
          <value>new</value>
          <value>replace</value>
          <value>embed</value>
          <value>submit</value>
          <value>map</value>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="actuate" a:defaultValue="onRequest">
        <choice>
          <value>onLoad</value>
          <value>onRequest</value>
          <value>onRequestSecondary</value>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="replacement"/>
    </optional>
    <optional>
      <attribute name="role">
        <choice>
          <ref name="LinkTypes"/>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="reverseRole">
        <choice>
          <ref name="LinkTypes"/>
          <ref name="AttName"/>
        </choice>
       </attribute>
    </optional>
    <optional>
      <attribute name="shape" a:defaultValue="default">
        <choice>
          <ref name="Shape"/>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="coords">
        <choice>
          <ref name="Shape"/>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="arcrole">
        <choice>
          <ref name="URI"/>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="label"/>
    </optional>
    <optional>
      <attribute name="from"/>
    </optional>
    <optional>
      <attribute name="to"/>
    </optional>
    <optional>
      <attribute name="mediaType">
        <choice>
          <ref name="ContentType"/>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="onSuccess" a:defaultValue="ignoreChildren">
        <choice>
          <value>processChildren</value>
          <value>ignoreChildren</value>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="onFailure" a:defaultValue="warn">
        <choice>
          <value>processChildren</value>
          <value>ignoreChildren</value>
          <value>warn</value>
          <value>fail</value>
          <ref name="AttName"/>
        </choice>
      </attribute>
    </optional>
  </define>

</grammar>

A.3. XML Schema Implementation

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.w3.org/2002/06/hlink"
           xmlns="http://www.w3.org/2002/06/hlink"
           elementFormDefault="qualified">

  <xs:annotation>
    <xs:documentation>
    HLink in XML Schema
    URI: http://www.w3.org/2002/06/hlink.xsd

    This is HLink - a link recongnition mechanism for the XHTML Family.

    Copyright ©2002 W3C (MIT, INRIA, Keio), All Rights Reserved.

      Editor:   Masayasu Ishikawa (mimasa@w3.org)
      Revision: $Id: hlink.xsd,v 1.4 2002/09/09 07:31:52 mimasa Exp $

    Permission to use, copy, modify and distribute the HLink XML Schema
    and its accompanying documentation for any purpose and without fee
    is hereby granted in perpetuity, provided that the above copyright
    notice and this paragraph appear in all copies.
    The copyright holders make no  representation about the suitability
    of this XML Schema for any purpose.

    It is provided "as is" without expressed or implied warranty.

    Revisions:
    (none)
    </xs:documentation>
  </xs:annotation>

  <xs:annotation>
    <xs:documentation>
    HLink

    hlinks, hlink

    This HLink XML Schema declares elements and attributes defining
    HLink, a link recongnition mechanism for the XHTML Family.
    </xs:documentation>
  </xs:annotation>

  <xs:annotation>
    <xs:documentation>
    Datatypes

    defines containers for the following datatypes, many of
    these imported from other specifications and standards.
    </xs:documentation>
  </xs:annotation>

  <xs:simpleType name="AttName">
    <xs:annotation>
      <xs:documentation>
      the name of an attribute which begins with "@", a la @name
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="@\c+"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ContentType">
    <xs:annotation>
      <xs:documentation>
      media type, as per [RFC2045]
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>

  <xs:simpleType name="Coords">
    <xs:annotation>
      <xs:documentation>
      comma separated list of lengths
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern
          value="[-+]?(\d+|\d+(\.\d+)?%)(,\s*[-+]?(\d+|\d+(\.\d+)?%))*"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LinkTypes">
    <xs:annotation>
      <xs:documentation>
      space-separated list of link types
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKENS"/>
  </xs:simpleType>

  <xs:simpleType name="Shape">
    <xs:restriction base="xs:token">
      <xs:enumeration value="default"/>
      <xs:enumeration value="rect"/>
      <xs:enumeration value="circle"/>
      <xs:enumeration value="poly"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="URI">
    <xs:annotation>
      <xs:documentation>
      a Uniform Resource Identifier reference, as per anyURI in
      XML Schema Part 2 [SCHEMA]
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:anyURI"/>
  </xs:simpleType>

  <xs:simpleType name="Effect">
    <xs:restriction base="xs:token">
      <xs:enumeration value="new"/>
      <xs:enumeration value="replace"/>
      <xs:enumeration value="embed"/>
      <xs:enumeration value="submit"/>
      <xs:enumeration value="map"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Actuate">
    <xs:restriction base="xs:token">
      <xs:enumeration value="onLoad"/>
      <xs:enumeration value="onRequest"/>
      <xs:enumeration value="onRequestSecondary"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OnSuccess">
    <xs:restriction base="xs:token">
      <xs:enumeration value="processChildren"/>
      <xs:enumeration value="ignoreChildren"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OnFailure">
    <xs:restriction base="xs:token">
      <xs:enumeration value="processChildren"/>
      <xs:enumeration value="ignoreChildren"/>
      <xs:enumeration value="warn"/>
      <xs:enumeration value="fail"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:element name="hlinks">
    <xs:annotation>
      <xs:documentation>
      hlinks element
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="hlink"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="hlink">
    <xs:annotation>
      <xs:documentation>
      hlink element
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="hlink.attlist"/>
    </xs:complexType>
  </xs:element>

  <xs:attributeGroup name="hlink.attlist">
    <xs:attribute name="namespace" use="required" type="URI"/>
    <xs:attribute name="element" type="xs:NMTOKEN"/>
    <xs:attribute name="locator">
      <xs:simpleType>
  <xs:union memberTypes="URI AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="effect" default="replace">
      <xs:simpleType>
  <xs:union memberTypes="Effect AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="actuate" default="onRequest">
      <xs:simpleType>
  <xs:union memberTypes="Actuate AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="replacement"/>
    <xs:attribute name="role">
      <xs:simpleType>
  <xs:union memberTypes="LinkTypes AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="reverseRole">
      <xs:simpleType>
  <xs:union memberTypes="LinkTypes AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="shape" default="default">
      <xs:simpleType>
  <xs:union memberTypes="Shape AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="coords">
      <xs:simpleType>
  <xs:union memberTypes="Coords AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="arcrole">
      <xs:simpleType>
  <xs:union memberTypes="URI AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="label"/>
    <xs:attribute name="from"/>
    <xs:attribute name="to"/>
    <xs:attribute name="mediaType">
      <xs:simpleType>
  <xs:union memberTypes="ContentType AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="onSuccess" default="ignoreChildren">
      <xs:simpleType>
  <xs:union memberTypes="OnSuccess AttName"/>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="onFailure" default="warn">
      <xs:simpleType>
  <xs:union memberTypes="OnFailure AttName"/>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>

</xs:schema>

B. References

This appendix is normative.

B.1. Normative References

[XLINK]
"XML Linking Language (XLink)", W3C Recommendation, S. DeRose et al. (editors), 27 June 2001. Available at: http://www.w3.org/TR/2001/REC-xlink-20010627
The latest version is available at: http://www.w3.org/TR/xlink
[URI]
"Uniform Resource Identifiers (URI): Generic Syntax" (RFC 2396), T. Berners-Lee et al., August 1998. Available at: http://www.rfc-editor.org/rfc/rfc2396.txt
[XML]
"Extensible Markup Language (XML) 1.0 Specification (Second Edition)", W3C Recommendation, T. Bray et al. (editors), 6 October 2000. Available at: http://www.w3.org/TR/2000/REC-xml-20001006
The latest version is available at: http://www.w3.org/TR/REC-xml
[NAME]
"Namespaces in XML", W3C Recommendation, T. Bray et al. (editors), 14 January 1999. Available at: http://www.w3.org/TR/1999/REC-xml-names-19990114
The latest version is available at: http://www.w3.org/TR/REC-xml-names
[SCHEMA]
"XML Schema Part 2: Datatypes", W3C Recommendation, P. V. Biron et al. (editors), 2 May 2001. Available at: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502
The latest version is available at: http://www.w3.org/TR/xmlschema-2

B.2. Other References

[HTML4]
"HTML 4.01 Specification", W3C Recommendation, D. Raggett et al. (editors), 24 December 1999. Available at: http://www.w3.org/TR/1999/REC-html401-19991224
The latest version of HTML 4.01 is available at: http://www.w3.org/TR/html401
The latest version of HTML 4 is available at: http://www.w3.org/TR/html4
[XHTML]
"XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition): A Reformulation of HTML 4 in XML 1.0", W3C Recommendation, S. Pemberton et al., August 2002. Available at: http://www.w3.org/TR/2002/REC-xhtml1-20020801
The latest version is available at: http://www.w3.org/TR/xhtml1
[XHTMLMOD]
"Modularization of XHTML™", W3C Recommendation, M. Altheim, et al. (editors), 10 April 2001. Available at: http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410
The latest version is at: http://www.w3.org/TR/xhtml-modularization

C. Acknowledgments

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.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://www.w3.org/TR/2002/WD-hlink-20020913/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy