<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='note.xsl'?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.1//EN" "xmlspec.dtd" [

<!-- ================================================================ -->

<!ENTITY draft.day "5">
<!ENTITY draft.iso-day "05">
<!ENTITY draft.month "06">
<!ENTITY draft.monthname "June">
<!ENTITY draft.year "2001">
<!ENTITY iso6.doc.date "&draft.year;&draft.month;&draft.iso-day;">
<!ENTITY short-ident "xml-link-style">
<!ENTITY TR-loc "http://www.w3.org/TR">
<!ENTITY xlinkurl "http://www.w3.org/TR/xlink/">
<!ENTITY xslturl "http://www.w3.org/TR/xslt">

<!ENTITY namespaceName "http://www.w3.org/2001/06/xml-link-style">

<!-- ================================================================ -->

<!ENTITY infoset "Infoset">
<!ENTITY elemii "Element Information Item">
<!ENTITY linkii "Link Information Item">
<!ENTITY arcii "Arc Information Item">
<!ENTITY partii "Participant Information Item">
<!ENTITY startpa "Starting Participant Arcs">
<!ENTITY endpa "Ending Participant Arcs">

<!ENTITY presctxt
"<termref def='dt-presentation-context'>presentation context</termref>">
<!ENTITY procctxt
"<termref def='dt-processing-context'>processing context</termref>">
<!ENTITY target "<termref def='dt-target'>target</termref>">

<!-- ================================================================ -->

<!ENTITY def.show
'<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:show</att> attribute for the arc for which
this is the starting resource.</p>
<p>This property is null if the relevant <el>arc</el>- or
<el>simple</el>-type element does not have an <att>xlink:show</att>
attribute value.</p>
</def>'>

<!ENTITY def.actuate
'<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:actuate</att> attribute for the arc for which
this is the starting resource.</p>
<p>This property is null if the relevant <el>arc</el>- or
<el>simple</el>-type element does not have an <att>xlink:actuate</att>
attribute value.</p>
</def>'>

<!ENTITY def.participant.resource
'<def>
<p>A reference to the
<xspecref href="http://www.w3.org/TR/xlink/#dt-resource">resource</xspecref>
this participant identifies. We intentionally do not stipulate the type
of this reference. Often it will be a URI reference
(obtained from the <att>xlink:href</att>
attribute on the relevant <el>locator</el>- or <el>simple</el>-type element),
but in cases
where there is no extant URI (for example, to identify the starting
participant of a <el>simple</el>-type link), we do not wish to require
that a URI reference be manufactured.</p>
</def>'>

<!ENTITY def.participant.title
'<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:title</att> attribute for this participant.</p>
<p>This property is null if the relevant <el>locator</el>- or
<el>resource</el>-type element does not have an <att>xlink:title</att>
attribute value or if the link is of the <el>simple</el> type.</p>
</def>'>

<!ENTITY def.participant.role
'<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:role</att> attribute for the <el>locator</el>-
or <el>resource</el>-type element that specifies this starting
resource.</p>
<p>This property is null if the relevant <el>locator</el>- or
<el>resource</el>-type element does not have an <att>xlink:role</att>
attribute value or if the link is of the <el>simple</el> type.</p>
</def>'>

<!ENTITY def.arc.title
'<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:title</att> attribute for this arc.</p>
<p>This property is null if the <el>extended</el>-type element does
not have an <att>xlink:title</att> attribute value or if the link is of
the <el>simple</el> type.</p>
</def>'>

<!ENTITY def.arc.role
'<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:arcrole</att> attribute for this arc.</p>
<p>This property is null if the relevant <el>arc</el>- or
<el>simple</el>-type element does not have an <att>xlink:arcrole</att>
attribute value.</p>
</def>'>

<!ENTITY def.target.stylesheet
'<def>
<p>The stylesheet that should be used when this arc
is traversed.
(See <specref ref="sec-link-traversal"/>)</p>
</def>'>

<!ENTITY def.target.processing.context
'<def>
<p>A URI reference that identifies the processing context associated
with traversal of this arc.
(See <specref ref="sec-link-traversal"/>)</p>
</def>'>

<!ENTITY def.target.presentation.context
'<def>
<p>A URI reference that identifies the presentation context associated
with traversal of this arc.
(See <specref ref="sec-link-traversal"/>)</p>
</def>'>

<!ENTITY % local.spec.att "xmlns:xlink CDATA #IMPLIED">

<!-- ================================================================ -->

<!ENTITY AElig	"&#x00C6;"> <!-- LATIN CAPITAL LETTER AE -->
<!ENTITY eacute	"&#x00E9;"> <!-- LATIN SMALL LETTER E WITH ACUTE -->
<!ENTITY egrave	"&#x00E8;"> <!-- LATIN SMALL LETTER E WITH GRAVE -->

<!-- ================================================================ -->

<!ENTITY ex01.eg SYSTEM "ex01.eg">
<!ENTITY ex02.eg SYSTEM "ex02.eg">
<!ENTITY ex03.eg SYSTEM "ex03.eg">
<!ENTITY ex04.eg SYSTEM "ex04.eg">
<!ENTITY ex04b.eg SYSTEM "ex04b.eg">
<!ENTITY ex05.eg SYSTEM "ex05.eg">
<!ENTITY ex05b.eg SYSTEM "ex05b.eg">
<!ENTITY ex06.eg SYSTEM "ex06.eg">
<!ENTITY ex07.eg SYSTEM "ex07.eg">

<!ENTITY ex-style01.eg SYSTEM "ex-style01.eg">

<!ENTITY prune1.eg SYSTEM "prune1.eg">
<!ENTITY prune2.eg SYSTEM "prune2.eg">
<!ENTITY fo.eg SYSTEM "fo.eg">
<!ENTITY html.eg SYSTEM "html.eg">
<!ENTITY linkii.eg SYSTEM "linkii.eg">
<!ENTITY arcii.eg SYSTEM "arcii.eg">
<!ENTITY partii.eg SYSTEM "partii.eg">

<!ELEMENT e:element-syntax
  (e:in-category*, e:attribute*, (e:empty|e:text|e:element|e:model|e:sequence|e:choice))
>
<!ATTLIST e:element-syntax
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
  name NMTOKEN #REQUIRED
>
<!ELEMENT e:in-category EMPTY>
<!ATTLIST
  e:in-category name NMTOKEN #REQUIRED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:attribute (e:attribute-value-template|(e:constant|e:data-type)+)>
<!ATTLIST e:attribute
  name NMTOKEN #REQUIRED
  required (yes) #IMPLIED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:attribute-value-template (e:constant|e:data-type)+>
<!ATTLIST e:attribute-value-template
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:constant EMPTY>
<!ATTLIST
  e:constant value CDATA #REQUIRED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:data-type EMPTY>
<!ATTLIST e:data-type
  name NMTOKEN #REQUIRED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:empty EMPTY>
<!ATTLIST e:empty
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:text EMPTY>
<!ATTLIST e:text
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:element EMPTY>
<!ATTLIST e:element
  name NMTOKEN #REQUIRED
  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:model EMPTY>
<!ATTLIST e:model
  name NMTOKEN #REQUIRED
  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:sequence (e:element|e:model|e:choice)+>
<!ATTLIST e:sequence
  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ELEMENT e:choice (e:element|e:model|e:sequence)+>
<!ATTLIST e:choice
  repeat (zero-or-one|zero-or-more|one-or-more) #IMPLIED
  xmlns:e CDATA #FIXED "http://www.w3.org/1999/XSL/Spec/ElementSyntax"
>
<!ENTITY % local.illus.class "|e:element-syntax">
]>
<!-- ================================================================ -->
<spec w3c-doctype="note" xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">
<?CVS $Id: xml-link-style.xml,v 1.9 2001/06/05 20:08:03 ht Exp $?>
<header>
<title>XML Linking and Style</title>
 <!--<version>Version 1.0</version>-->
<w3c-designation>&TR-loc;/&short-ident;</w3c-designation>
<w3c-doctype>W3C NOTE</w3c-doctype>
<pubdate><day>&draft.day;</day>
<month>&draft.monthname;</month>
<year>&draft.year;</year>
</pubdate>
<publoc><loc href="&TR-loc;/&draft.year;/NOTE-&short-ident;-&iso6.doc.date;/">&TR-loc;/&draft.year;/NOTE-&short-ident;-&iso6.doc.date;/</loc>
(<loc href="&TR-loc;/&draft.year;/NOTE-&short-ident;-&iso6.doc.date;/&short-ident;.html">HTML</loc>,
<loc href="&TR-loc;/&draft.year;/NOTE-&short-ident;-&iso6.doc.date;/&short-ident;.xml">XML</loc>)</publoc>
<latestloc><loc href="&TR-loc;/&short-ident;/">&TR-loc;/&short-ident;/</loc>
</latestloc>
<!--
<prevlocs></prevlocs>
-->
<authlist>
<author><name>Norman Walsh</name>
<affiliation>Sun Microsystems, Inc.</affiliation>
<email href="mailto:Norman.Walsh@East.Sun.COM">Norman.Walsh@East.Sun.COM</email></author>
</authlist>
<abstract>
<p>The interaction of XLink linking elements and styling has not
previously been carefully described. This note, the result of an XML
Linking/XSL joint task force, attempts to rectify that oversight by
providing a clear conceptual model for linking and styling and
suggestions for the practical application of that model using current
W3C Recommendations (and Working Drafts, Candidate Recommendations, and
Proposed Recommendations).</p>
</abstract>
<status>

<p>This document is a Note made available by
the World Wide Web Consortium (W3C) for information only.  Publication of this Note by W3C does not imply endorsement by W3C or the W3C Team, or any W3C Members, nor that the W3C has, is, or will be allocating any resources to the issues addressed by this Note.
</p>

<p>It was produced by a joint task force of the XML Linking
and XSL Working Groups.  We plan to update this Note according to
comments received and, if there is enough interest, consider promoting
parts of it into Recommendation-track specifications where appropriate.
Comments may be directed to the task force mailing list <loc href="mailto:w3c-xsl-link-tf@w3.org">w3c-xsl-link-tf@w3.org</loc>
(Member-only <loc href="http://lists.w3.org/Archives/Member/w3c-xsl-link-tf/">archive</loc>).</p>

<p>A list of current W3C Recommendations and other
technical documents, including Working Drafts and Notes, can be found at
<loc href="http://www.w3.org/TR/">http://www.w3.org/TR/</loc>.</p>

<p><emph>This section represents the status of this document at the time
this version was published. It will become outdated if and when a new
version is published. The latest status is maintained at the W3C.</emph></p>
</status>
<pubstmt>
<p>Chicago, Vancouver, Mountain View, et al.: World-Wide Web Consortium,
XML Linking/XSL Joint Task Force, 2001.</p>
</pubstmt>
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="EN">English</language>
</langusage>
<revisiondesc>
<slist>
<sitem>2000-25-08 : Initial draft</sitem>
</slist>
</revisiondesc>
</header>
<body>

<div1 id="sec-intro">
<head>Introduction</head>

<p>Linking and styling have significant interactions. On the one hand,
style may be applied to elements because they participate in links.
On the other, selecting a link may modify, replace, or create a new
document which must then be styled.</p>

<p>This note introduces a conceptual model for describing the
interactions of XLink linking elements and styling. It then shows how
this model may be applied in two different ways:</p>

<olist>
<item><p>Using current and anticipated technologies supported by existing W3C
Recommendations (and Working Drafts, Candidate Recommendations, and
Proposed Recommendations).</p>
</item>
<item><p>In an environment where the XSLT processor provides
significantly more functionality for linking and contains several
new features.</p></item>
</olist>

<p>The full generality of the conceptual model cannot be represented
with current Recommendations. Rather than attempt to restrict the
model, we observe that by accepting default values for parts of the
model, a useful, practical subset can be implemented today. </p>

<div2><head>Design Principles</head>

<p>The task force used the following principles to develop the model
described in this note:</p>

<olist>
<item><p>The model must support applications of linking and styling
for the purpose of presentation to a human audience.</p>
<p>There are countless XML linking applications that are not related to
style at all (robots, indexing applications, etc.). At best, the
conceptual framework described in this note may aid in developing
interoperable, standard applications of this sort. At the very least,
nothing in this note should inhibit the development of XML linking
applications that are not related to style.</p></item>
<item><p>The model must not compromise accessibility.</p></item>
<item><p>This model must apply equally well to XSL and CSS.</p></item>
<item><p>The consequences of linking to or from non-XML resources is
outside the scope of this note.</p></item>
</olist>

</div2>

<div2><head>Requirements Framework</head>

<p>In considering this design, we felt the following requirements
had to be met by any proposed solution:</p>

<olist>
<item><p>The overall treatment of the ending resource is controlled
by the <att>xlink:show</att> attribute.</p></item>
<item><p>The overall treatment of link traversal is controlled by
the <att>xlink:actuate</att> attribute.</p></item>
<item><p>It must be possible to style both starting and ending
resources.</p></item>
<item><p>It must be possible to process inbound, outbound, and third
party arcs.</p></item>
<item><p>It must be possible to process starting resources regardless
of "well-balancedness": whole documents, one or more whole nodes,
an arbitrary range, including partial nodes, and non-contiguous
selections of all of the above.</p></item>
<item><p>It must be possible to process ending resources regardless
of "well-balancedness".</p></item>
<item><p>It must be possible to control the context in which ending
resources are displayed. While whole documents are the standard context for
web browsers, it is easy to imagine situations where it would be desirable
to show a portion of the document that contains the target, or even just
the target itself.</p></item>
<item><p>We must consider the consequences of encountering different
sequences and nestings
of starting resources with various combinations of behavior
settings.</p></item>
</olist>
</div2>

</div1>
<div1 id="sec-xlink">
<head>Processing XLink Linking Elements</head>

<p>Processing XLink linking elements can be divided into two functions: link
identification and link traversal. It is useful for our purposes to
consider these functions separately.</p>

<div2 id="sec-xlink-identification">
<head>XML Link Identification</head>

<p>XLink
<xspecref href="&xlinkurl;#dt-link">linking elements</xspecref>
may or may not participate in the
link they identify. Consider the following example:</p>

<eg role="linkex">&ex01.eg;</eg>

<p>In this example, the two green (and underlined) elements are starting
resources.  The blue (and italic) element is an ending
resource. There is no explicit markup to identify ending resources,
but an XLink-aware application can identify them because they are
pointed to by URI references.</p>

<p>Linking relationships can be less obvious. Consider the case where
an extended link is used:</p>

<eg role="linkex">&ex02.eg;</eg>

<p>With the addition of an extended link element, the courses in the
course list also become starting resources. Note that this makes the
first course in the course list (identified in red and bold-italic)
both a starting resource and an ending resource. This example could be
complicated further by placing the extended link in a physically
separate resource from the documents in question.</p>

<p>In order for links to be styled, they must be identified. The XLink-aware
application must somehow provide additional information beyond what is
explicitly marked up in the document available to the styling engine.
This can be described in terms of &infoset; contributions.</p>

<div3 id="xlink-infoset">
<head>XLink &infoset; Contributions</head>

<p>Conceptually, the XLink-aware application must provide additional
information to the styling engine about links in a document.  This
can be modeled in terms of contributions to the document's &infoset;.
</p>

<note><p>We use the &infoset; here as a conceptual model. We are not
suggesting that applications be required to build or maintain
any specific set of data structures for this purpose, merely that they
be able to provide certain information to the application.</p>

<p>Because it is convenient to describe some aspects of link
processing in terms of the XPath data model, we use mostly &elemii; in
our contributions, but that does mean that implementations are required
to construct their internal data models that way.</p>
</note>

<p>An XLink-aware processor has at its disposal some
collection of XLinks. They may come from
<xspecref href="http://www.w3.org/TR/xlink/#simple-links">simple</xspecref>
and/or
<xspecref href="http://www.w3.org/TR/xlink/#extended-link">extended</xspecref>
links in the source document, or from external
<xspecref href="http://www.w3.org/TR/xlink/#dt-linkbase">linkbases</xspecref>.
We treat them all equally.</p>

<p>To augment the &infoset;, we introduce a new data structure, the
Link Set, and three new properties to access it. The Link Set holds an
interpretation of the XLink data model: the links, arcs, and participants
that are known as well as any additional metadata about them
that may be available.</p>

<p>We construct the Link Set using &elemii;s. Note, however, that
these elements are not the children of any information items in the
document's &infoset;. They are accessible only through new
properties. We elected to use &elemii;s for the Link Set because:
</p>

<olist>
<item><p>It is a hierarchical data structure with a natural tree
structure.</p></item>
<item><p>Style engines already have well-understood mechanisms for navigating
through a tree of elements and attributes.</p></item>
<item><p>XLinks can have additional metadata elements inside them, and it
is possible for these elements to have semantic meaning, it is therefore
necessary to provide a means for XLink processors to access them.
</p></item>
</olist>

<p>There are three types of &elemii;s in the Link Set: &linkii;s,
which represent links, &arcii;s which represent single arcs, and two
&partii;s which represent the start and end of an arc.
</p>

<p>More formally:</p>

<ulist>
<item><p><termdef id="dt-linkii" term="Link Information Item">There is
one <term>Link Information Item</term> for every XLink that the
processor knows about.</termdef>
</p>
</item>

<item><p><termdef id="dt-arcii" term="Arc Information Item">Every
&linkii; contains an
<term>Arc Information Item</term> for every arc associated with that
XLink.</termdef></p>

<p>In the case of simple links, there will only ever be a single arc,
but extended links may include many. Note that the number of &arcii;s
is not necessarily the same as the number of <el>arc</el>-type elements in the
XLink. XLink <el>arc</el>-type elements can define any number of arcs;
&arcii;s define exactly one arc.</p>
</item>

<item>
<p>Finally, <termdef id="dt-partii" term="Participant Information
Item">Every &arcii; contains exactly two <term>Participant Information
Items</term>: one Start &partii; for the starting resource and one End
&partii; for the ending resource.</termdef></p>
</item>
</ulist>

<p>Once constructed, the new information items must be inserted into
the &infoset;. We define new properties for this purpose.</p>

<ulist>
<item>
<p><termdef id="dt-linkset" term="Link Set">
The Document Information Item is extended with a new Link Set property.
The <term>Link Set</term> property contains the set of &linkii;s
associated with this document.</termdef></p>
</item>
</ulist>

<p>Every Element, Character, Processing Instruction, and Comment
Information Item in the document is augmented with two new
properties: &startpa; and &endpa;.</p>

<ulist>
<item>
<p><termdef id="dt-startpa" term="Starting Participant Arcs">The
<term>Starting Participant Arcs</term> property is a list of the
&arcii;s for which this information item is a part of the Start &partii; for
the arc.</termdef> In other words, if this
element is part of the starting resource of a link, it has a pointer
to the arc(s) that define the traversal from this resource.</p>
</item>

<item>
<p><termdef id="dt-endpa" term="Ending Participant Arcs">The
<term>Ending Participant Arcs</term> property is a list of the
&arcii;s for which this information item is a part of the End &partii; for
for the arc.</termdef> Again, in other words, if this
element is part of the ending resource of a link, it has a pointer
to the arc(s) that define the traversal to this resource.
</p>
</item>
</ulist>

<p>If an information item has more than one &arcii; associated with it,
they are ordered. That is, one can refer to the first
&arcii;, the second &arcii;, etc. There is no requirement for different
implementations to select the same order, or even for the same implementation
to select the same order over multiple runs. They need only be consistent
for the logical duration of any given information set.</p>

<p>If more than one information item in the document is associated
with an arc (for example, if the starting or ending resources are
comprised of several elements or a range of characters), the
&startpa; or &endpa; of each
relevant information item in the &infoset; is augmented.
</p>

<p>Once the &infoset; has been augmented with these items, linking
applications can process links in a uniform way, independent of
whether the elements in question are simple, extended, or even third
party links.</p>

<note><p>We observe that this interface extends even beyond XLink.
Processors for schemas that have linking semantics defined independent
of XLink, such as HTML, can augment the &infoset; and
take advantage of this linking framework without literally making every
link an XLink.</p></note>

<p>An XLink can be quite complex. In the most general case, linking
semantics may be influenced by the roles of the <el>link</el>-type
element, the <el>arc</el>-type element, and the roles on the
participating resources involved in the link. In designing
this model, our goal was to provide link processors with access to all
of this information.</p>

<div4 id="linknamespace">
<head>Link Element Namespace</head>

<p>In order to provide fully qualified names for the linking information
items, they are placed in the linking and style namespace with
<xspecref href="http://www.w3.org/TR/REC-xml-names/#dt-NSName">Namespace
name</xspecref> "&namespaceName;".</p>
<p>This namespace name (URI) will only be used to refer to this
version of this Note: different URIs will
be used for any and all new versions of the specification except that this namespace name may be reused in any update of this
Note which is made for the purpose of
    clarification or bug fixes. These changes will be minor in that
they will not (a) change the meaning or
    validity of existing documents written using the namespace, or (b) 
affect the operation of existing
    software written to process such documents.</p>
</div4>

<div4 id="linkinfoitem">
<head>Link Information Item</head>

<p>A &linkii; is an &elemii;. It must conform to the following
<bibref ref="xmlschema-cr"/> type definition:</p>

<eg>&linkii.eg;</eg>

<p>It has the following properties:</p>

<glist>
<gitem><label>type</label>
<def>
<p>The value of the <att>xlink:type</att> attribute for this link: either
"simple" or "extended".</p>
</def>
</gitem>
<gitem><label>role</label>
<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:role</att> attribute for this link.</p>
<p>This property is null if the <el>extended</el>-type element does
not have an <att>xlink:role</att> attribute value or if the link is of
the <el>simple</el> type.</p>
</def>
</gitem>
<gitem><label>title</label>
<def>
<p>The
<xspecref href="http://www.w3.org/TR/REC-xml#AVNormalize">normalized</xspecref>
value of the <att>xlink:title</att> attribute for this link.</p>
<p>This property is null if the <el>extended</el>-type element does
not have an <att>xlink:title</att> attribute value or if the link is of
the <el>simple</el> type.</p>
</def>
</gitem>
<gitem><label>##other:*</label>
<def><p>It may have any other properties as long as they are from
a different namespace.</p>
</def>
</gitem>
</glist>

<p>A &linkii; must contain at least one &arcii; and may contain any
number of <el>xlink:title</el> elements and
elements from other namespaces.</p>

</div4>

<div4 id="arcinfoitem">
<head>Arc Information Item</head>

<p>An &arcii; is an &elemii;. It must conform to the following XML
Schema type definition:</p>

<eg>&arcii.eg;</eg>

<p>It has the following properties:</p>

<glist>
<gitem><label>role</label>
&def.arc.role;
</gitem>
<gitem><label>title</label>
&def.arc.title;
</gitem>
<gitem><label>show</label>
&def.show;
</gitem>
<gitem><label>actuate</label>
&def.actuate;
</gitem>
<gitem><label>target-stylesheet</label>
&def.target.stylesheet;
</gitem>
<gitem><label>target-processing-context</label>
&def.target.processing.context;
</gitem>
<gitem><label>target-presentation-context</label>
&def.target.presentation.context;
</gitem>
<gitem><label>##other:*</label>
<def><p>It may have any other attributes as long as they are from
a different namespace.</p>
</def>
</gitem>
</glist>

<p>An &arcii; must contain a Start &partii; and an End &partii;.
It may also contain any
number of other elements from other namespaces.</p>

</div4>

<div4 id="partinfoitem">
<head>Participant Information Item</head>

<p>A &partii; is an &elemii;. It must conform to the following XML
Schema type definition:</p>

<eg>&partii.eg;</eg>

<p>It has the following properties:</p>

<glist>
<gitem><label>role</label>
&def.participant.role;
</gitem>
<gitem><label>title</label>
&def.participant.title;
</gitem>
<gitem><label>resource</label>
&def.participant.resource;
</gitem>
<gitem><label>##other:*</label>
<def><p>It may have any other properties as long as they are from
a different namespace.</p>
</def>
</gitem>
</glist>

<p>A &partii; may contain any
number of other elements from other namespaces.</p>

</div4>

<div4 id="infoset-examples">
<head>&infoset; Contribution Examples</head>

<p>The &elemii; for the <code>a</code> element in the
following document:</p>

<example><head>Simple Link in http://www.example.org/test.xml</head>
<eg>&lt;doc>
&lt;a xlink:href="foo.xml"
      xlink:show="new" xlink:actuate="onRequest">Click here&lt;/a>
&lt;/doc></eg>
</example>

<p>can be represented with one &linkii;:</p>

<eg><![CDATA[<link>
  <arc show="new" actuate="onRequest">
    <startParticipant resource="/doc/a[1]"/>
    <endParticipant resource="foo.xml"/>
  </arc>
</link>]]></eg>

<p>For an information item that participates in several links, the
situation is slightly more complex. Consider the following document:</p>

<example><head>Extended Links in http://www.example.org/test2.xml</head>
<eg>&ex06.eg;</eg>
</example>

<p>In this document, there is one link with two arcs:</p>

<eg><![CDATA[<link role="http://example.com/props/link1">
  <arc role="http://example.com/props/loc1">
    <participant resource="#a"/>
    <participant resource="#b1" role="http://example.com/props/loc1"/>
  </arc>
  <arc role="http://example.com/props/loc1">
    <participant resource="#a"/>
    <participant resource="#b2"/>
  </arc>
</link>]]></eg>

</div4>
</div3>
</div2>

<div2 id="sec-xlink-traversal">
<head>XLink Traversal</head>

<p>Link
<xspecref href="&xlinkurl;#dt-traversal">traversal</xspecref>
always involves exactly two participating resources. In the context of
a styling application, it can have several possible results:</p>

<olist>
<item><p>The document currently being presented may be replaced by
the new resource identified as the
<xspecref href="&xlinkurl;#dt-ending-resource">ending
resource</xspecref> of the traversal.</p></item>
<item><p>A new viewing context (window, frame, pane, etc.) may be
created in which to present the
<xspecref href="&xlinkurl;#dt-ending-resource">ending
resource</xspecref> of the traversal.</p></item>
<item><p>The
<xspecref href="&xlinkurl;#dt-ending-resource">ending
resource</xspecref> may be styled and the styled result may be
embedded within the document currently being presented (instead of,
or perhaps in addition to, the starting resource).</p></item>
<item><p>Application-specific semantics outside the scope of this
note.</p></item>
</olist>

<p>In the context of styling, each of these operations
can be considered a presentation or style issue.
This is particularly the case since XLink linking elements leave
the processing of the attributes controlling presentation
(<att>xlink:show</att> and <att>xlink:actuate</att>) at the discretion of
the application.</p>

<p>Consequently, we will address these issues under style.</p>

</div2>
</div1>

<div1 id="sec-style">
<head>Styling Link Resources</head>

<p>Broadly speaking, style processing can be divided into two
processes: styling of resources based upon how they participate in
linking and styling the results of link traversal.</p>

<p>In this section, we consider the process of styling link resources.
This model may be applied in two different ways:</p>

<olist>
<item><p>Using current and anticipated technologies supported by existing W3C
Recommendations (and Working Drafts, Candidate Recommendations, and
Proposed Recommendations).</p>
</item>
<item><p>In an environment where the XSLT processor provides
significantly more functionality for linking and contains several
new features.</p></item>
</olist>

<div2 id="sec-style-content-10">
<head>With Current Technologies</head>

<p>Once the XLink-aware application has identified the information items that
are participants in a link, styling the link becomes relatively
straightforward. One can easily imagine an augmented CSS application or
even a Perl script that made styling choices based upon the information
obtained from the augmented &infoset;.</p>

<p>Styling linking resources in XSL V1.0
can be achieved with small set of extension functions.  The addition of
a standard extension function API, anticipated for XSLT 1.1, makes this
a practical solution for the present.</p>

<p>There are significant drawbacks to using extension functions for
styling links, principal among them the fact that it places all of the
burden on the stylesheet author. In order to handle links between
arbitrary elements, <emph>every</emph> template would have to include
conditional logic using the extension functions.  This makes the
extension function approach impractical as a long-term solution, but
it is a solution that can be made to work today.</p>

<div3 id="sec-xsltx-functions">
<head>XSLT Extension Functions</head>

<p>In the descriptions that follow, <code>ext:</code> must be
an <xspecref href="&xslturl;#section-Extension-Functions">extension
function namespace</xspecref> as defined in <bibref ref="xslt-rec"/>.</p>

<proto name="ext:link" return-type="node-set"/>

<p>The <function>ext:link</function> function returns a node
set containing the &linkii;s known to the processor.
</p>

<proto name="ext:arc-start" return-type="node-set"/>

<p>The <function>ext:arc-start</function> function returns a node
set containing the &arcii;s in the &startpa; property of the context
node. It takes no arguments.</p>

<proto name="ext:arc-end" return-type="node-set"/>

<p>The <function>ext:arc-end</function> function returns a node
set containing the &arcii;s in the &endpa; property of the context
node. It takes no arguments.</p>

</div3>

<div3>
<head>Function Example</head>

<p>The following templates show how one might format a <code>phrase</code>
element in the source document differently depending on whether or not
it was identified as the starting resource of a link:</p>

<eg>&lt;xsl:template match="phrase[count(ext:arc-start()) > 0]">
  &lt;-- If the phrase is part of a link, make it a link to the target
         of the first arc. This does not adequately handle the case where
         the phrase participates as the starting resource in more than
         one link. -->
  &lt;fo:basic-link
      external-destination="{ext:arc-start()/endParticipant/@resource}">
    &lt;xsl:apply-templates/>
  &lt;/fo:basic-link>
&lt;/xsl:template>

&lt;xsl:template match="phrase">
  &lt;xsl:apply-templates/>
&lt;/xsl:template></eg>

</div3>
</div2>

<!--
<div2 id="sec-style-content-axes">
<head>With New Axes</head>

<p>The approach described in <specref ref="sec-style-content-10"/>
uses extension functions to access fundamental linking properties. In
some sense, this makes the link information "second class" in the
styling data model. We see link information as being a much more
integral part of the system.</p>

<p>We therefore propose the addition of three new axes in a future
version of XSLT:</p>

<glist>
<gitem><label>link::</label>
<def>
<p>The link:: axis selects &linkii;s associated with the document.</p>
</def>
</gitem>
<gitem><label>arc-start::</label>
<def>
<p>The arc-start:: axis selects the &arcii;s in the &startpa; property
of the context node.</p>
</def>
</gitem>
<gitem><label>arc-end::</label>
<def>
<p>The arc-end:: axis selects the &arcii;s in the &endpa; property
of the context node.</p>
</def>
</gitem>
</glist>

<div3>
<head>Axis Example</head>

<p>The following templates show how one might format a <code>phrase</code>
element in the source document differently depending on whether or not
it was identified as the starting resource of a link:</p>

<eg>&lt;xsl:template match="phrase[arc-start::*]">
  &lt;&hyphen;- If the phrase is part of a link, make it a link to the target
         of the first arc. This does not adequately handle the case where
         the phrase participates as the starting resource in more than
         one link. &hyphen;->
  &lt;fo:basic-link
      external-destination="{arc-start::*[1]/endParticipant/@resource}">
    &lt;xsl:apply-templates/>
  &lt;/fo:basic-link>
&lt;/xsl:template>

&lt;xsl:template match="phrase">
  &lt;xsl:apply-templates/>
&lt;/xsl:template></eg>
</div3>
</div2>
-->

<div2 id="sec-style-content-auto">
<head>With a Link-Aware XSLT Processor</head>

<p>[This section describes hypothetical additions to XSLT and/or
XSL. These additions have not been reviewed by the WG and their
presence here does not indicate that they will be added to any future
version of XSL.]</p>

<p>In order to address the problems associated with placing all of the
burden of link maintenance on the stylesheet author, we need to add
XLink support into XSLT in a much more significant manner.</p>

<p>We observe that once the XSLT processor is aware of the link
relationships that exist in the source document, it could conceivably
maintain those relationships across transformation. Consider a simple
document with a link from node B to node D:</p>

<graphic source="link-xform.gif" alt="Automatic Link Transformation"/>

<p>During transformation, for every node in the result tree, the XSLT
processor knows what the context node in the source tree was when the
result node was created. It follows that XSLT can, in principle,
maintain the link relationships across transformation.</p>

<p>Some difficulties need to be addressed:</p>

<olist>
<item><p>How does the stylesheet author control the selection of links?</p>
<p>Suppose that the source document links an element, A, in the source
document with three other elements in the source document, B, C, and
D. The XLink-aware processor can maintain that relationship in the
result tree (linking A' with B', C', and D'), but what if the
stylesheet author wishes to suppress the arc between A and C?</p>
<p>We suggest two new top-level XSLT elements, <el>xsl:strip-links</el>
and <el>xsl:preserve-links</el>, to provide this capability.</p>
</item>
<item><p>What happens if a source node is never processed, or produces no
nodes in the result tree?</p>
<p>If that source node is the sole participant at one end of an arc (or if
all of the nodes in the participant resource have vanished), then that link
does not occur in the result tree.</p>
</item>
<item><p>What happens if the source node is processed several times, producing
disjoint nodes in the result tree?</p>
<p>We observe that heuristics have been described for this case in
<bibref ref="HookerMaden2000"/>. Since heuristics are known to be imperfect,
we suggest a new boolean attribute, <att>xsl:link-target</att>, described
below.</p>
</item>
<item><p>How do you add new links to the Link Set model?</p>
<p>Modelling the links as &infoset; augmentation has the appealing property
that it allows all of the links to be processed in the same way. But what
if the stylesheet wants to add new links that should also be processed
in the same way?</p>
<p>We propose new XSLT elements for this purpose, see
<specref ref="style-elements"/>.</p>
</item>

</olist>

<p>The serializer for the result tree could
instantiate the link relationships that it knows about using XLink,
making this a nicely self-contained system: an XLink-aware XSLT processor
produces a result tree that contains XLinks.</p>

<p>The problem of styling these links remains.</p>

<div3>
<head>Controlling Link Selection</head>

<p>In some cases, stylesheet authors may wish to control the selection
of links. We suggest two new top-level elements to do this:
<el>xsl:strip-links</el> and <el>xsl:preserve-links</el>. As their names
suggest, these work in a way roughly analagous to the way that
<el>xsl:strip-space</el> and <el>xsl:preserve-space</el> work.</p>

<p>Each of these elements has a <att>select</att> attribute. The set
of arcs selected by <el>xsl:strip-links</el> are not represented in the
transformed document. The set selected by <el>xsl:preserve-links</el>
are represented. Initially, all links are preserved.</p>

<p>If the select expression in either of these elements selects nodes
other than Arc and Link elements in the Link Set, they are ignored.</p>

</div3>

<div3>
<head>Identifying Link Targets Explicitly</head>

<p>Presented with a complex transformation that produces several disjoint
nodes (perhaps from different modes), it may be impossible for the XSLT
processor to accurately identify the link targets automatically.</p>

<p>Although we expect heuristics to be used for most cases, we propose
a new boolean attribute to make the selection explicit:
<att>link-target</att>.</p>

<p>The <att>link-target</att> attribute can appear on <el>xsl:element</el>,
and <el>xsl:text</el> elements and (as <att>xsl:link-target</att>)
on literal result tree elements.
When <code>true()</code>,
the element on which it occurs is the link target for all links associated
with the current context node. The use of <att>link-target</att> overrides
any heuristic for the links which are associated with the context node.</p>

<ednote><name>Link Target Granularity</name>
<edtext>Is this definition of <att>link-target</att> too coarse? It makes
<emph>all</emph> links to the context node point to the nodes in the result
tree identified as the link target. Might it be necessary to change this
on a per-link basis?</edtext>
</ednote>

<p>To better understand how this works, let's consider a concrete example.
Suppose that you have a link to a chapter title and that title appears
in three different places in your result tree: in the Table
of Contents, at the top of the page where the chapter begins, and in
the running header on the pages of that chapter.</p>

<p>Imagine that the heuristics would select the inline at the top of
the page where the chapter begins, but you wish to make a link to the
entry in the table of contents. Conceptually, the heuristic algorithm
must consider all of the possible link targets and select the "best
one".</p>

<p>By adding a <att>xsl:link-target</att> to the literal result element
that instantiates the chapter title in the Table of Contents, we give the
the stylesheet author a way to inform the heuristic which element should
explicitly be used, even if it is not the "best one" according to its
algorithm.</p>

</div3>

<div3><head>Adding Style Properties</head>

<p>Automatic link identification is only half the battle. We still
need to provide mechanisms for applying style to the transformed
links.</p>

<p>There are two different types of styling that can be applied to
links: property styling and structural styling. Property styling
consists of those style changes that can be achieved by changing
property values (or attributes) in the result tree. Structural styling
consists of those style changes that require a restructured result
tree.</p>

<p>Changes to fonts, foreground, and background
colors are all things that can be achieved with property styling. Adding
a horizontal rule above and below a resource, or putting a resource in
a table, can only be achieved by structural styling.</p>

<p>We propose a new XSL element to provide style properties.</p>

<eg><![CDATA[
<!-- Category: instruction -->
<xsl:link-style
  select = expression
  xsl:use-attribute-sets = qnames>
  <!-- Content: xsl:attribute* -->
</xsl:link-style>
]]></eg>

<p>The select expression of <el>xsl:link-style</el> should always select
&linkii;s. The attributes provided are associated with the links selected.</p>

<div4>
<head>Style Properties Example</head>

<p>The following templates show how one might make starting resources
with the "HTML" role appear blue and underlined in the result tree.</p>

<eg>&lt;xsl:link-style select="link::*/@role='http://www.w3.org/1999/xhtml'">
  &lt;xsl:attribute name="color">blue&lt;/xsl:attribute>
  &lt;xsl:attribute name="text-decoration">underlined&lt;/xsl:attribute></eg>
</div4>
</div3>

<div3><head>Style-based Structural Changes</head>

<p>In order to support structural styling, it is essentially necessary
for a stylesheet to apply more than one template to a given source
node. At the moment, this can be accomplised with <el>xsl:import</el>
and <el>xsl:apply-imports</el>. It has already been suggested that a
general facility be provided for this feature.</p>

<p>For example, <el>xsl:next-match</el> could be added to XSLT. It
would apply the next-highest-priority template to the current context
node. Using next match, we could put links in HTML tables as follows:</p>

<eg><![CDATA[
<xsl:template match="*[count(arc-start::*) > 0]" priority="100">
  <table>
    <tr>
      <td>
        <xsl:next-match/>
      </td>
    </tr>
  </table>
</xsl:template>]]></eg>

<p>By assigning this template a very high priority, we can assure that
it will always match first. The <el>xsl:next-match</el> inside will
apply the next highest priority template so that the formatting for
each individual element is correct.</p>

<p>Consider our earlier example of a styling a phrase that
participated in a link. While we previously had to add conditional
logic to all of our phrase-level elements, using
<el>xsl:next-match</el>, we can handle all of them simultaneously.</p>

<div4>
<head>Next Match Example</head>

<p>The following templates show how one might format elements in the
source document differently depending on whether or not they are
identified as the starting resource of a link:</p>

<eg>&lt;xsl:template match="*[arc-start::*]" priority="100">
  &lt;-- If the element is part of a link, make it a link to the target
         of the first arc. This does not adequately handle the case where
         the phrase participates as the starting resource in more than
         one link. -->
  &lt;fo:basic-link
      external-destination="{arc-start::*[1]/endParticipant/@resource}">
    &lt;xsl:next-match/>
  &lt;/fo:basic-link>
&lt;/xsl:template>

&lt;xsl:template match="phrase">
  &lt;xsl:apply-templates/>
&lt;/xsl:template>

&lt;xsl:template match="emphasis">
  &lt;em>&lt;xsl:apply-templates/>&lt;/em>
&lt;/xsl:template>

&lt;!-- etc. --></eg>
</div4>
</div3>
</div2>

<div2 id="style-elements"><head>Style Elements</head>

<p>Our original goal in writing this note was to explore how linking
and style effect each other and how a processing system might
reasonably deal with these issues. Several early reviewers suggested
that this work could be taken further to provide a mechanism not only
for providing uniform treatment of source document links, but also
uniform treatment of links created by the stylesheet. In this section,
we explore some of those ideas.</p>

<p>Consider this simple document:</p>

<eg role="linkex">&ex-style01.eg;</eg>

<p>Imagine for the moment that our goal is to link the persons name
with some online address book. One way to do that would be to construct
the link natively in the result tree vocabulary with a template like
this (assuming our target is HTML):</p>

<eg role="linkex"><![CDATA[<xsl:template match="name">
  <a href="http://example.com/address?{.}">
    <xsl:apply-templates/>
  </a>
</xsl:template>]]></eg>

<p>But that has the unsatisfactory result that the link is unknown to the
"link aware" processor we've been describing. That processor has already
constructed a link set for the source document:</p>

<eg role="linkex"><![CDATA[<linkset xmlns="&namespaceName;">
  <link>
    <arc>
      <startParticipant resource="/doc/p/course[1]"/>
      <endParticipant resource="courses/CS101.xml"/>
    </arc>
  </link>
</linkset>]]></eg>

<p>What would seem more appropriate would be to insert the resulting link
into the "result document link set". The result document link set is
conceptually analagous to the source document link set: it describes the
linking relationships in the result document.</p>

<p>Up to now, the result document link set has been discussed only
implicitly because it was derived solely from the source document link
set.</p>

<p>We introduce four new XSL elements for constructing links in the
result tree link set: <el>xsl:link</el>, <el>xsl:arc</el>,
<el>xsl:start-participant</el>, and <el>xsl:end-participant</el>.</p>

<div3><head>xsl:link</head>

<e:element-syntax name="link">
  <e:attribute name="id">
    <e:data-type name="id"/>
  </e:attribute>
  <e:sequence>
    <e:element repeat="one-or-more" name="arc"/>
    <e:model name="other-namespace-elements"/>
  </e:sequence>
</e:element-syntax>

<p>An <el>xsl:link</el> element selects or constructs a link in the
result tree link set. If an ID is given, it is logically an ID in the
result tree link set.  By using the same ID value, it is possible for
different templates to add arcs to the same <el>xsl:link</el>.</p>

<p>Additional elements in other namespaces can be provided, the effect
that they have on rendering the link is undefined.</p>

</div3>
<div3><head>xsl:arc</head>

<e:element-syntax name="arc">
  <e:attribute name="role">
    <e:data-type name="uri-reference"/>
  </e:attribute>
  <e:attribute name="title">
    <e:data-type name="string"/>
  </e:attribute>
  <e:attribute name="show">
    <e:constant value="new"/>
    <e:constant value="replace"/>
    <e:constant value="embed"/>
    <e:constant value="other"/>
    <e:constant value="none"/>
  </e:attribute>
  <e:attribute name="actuate">
    <e:constant value="onLoad"/>
    <e:constant value="onRequest"/>
    <e:constant value="other"/>
    <e:constant value="none"/>
  </e:attribute>
  <e:sequence>
    <e:element name="start-participant"/>
    <e:element name="end-participant"/>
    <e:model repeat="zero-or-more" name="other-namespace-elements"/>
  </e:sequence>
</e:element-syntax>

<p>An <el>xsl:arc</el> adds an arc to the result tree link set.</p>

<p>Additional elements in other namespaces can be provided, the effect
that they have on rendering the link is undefined.</p>

</div3>
<div3><head>xsl:start- and xsl:end-participant</head>

<e:element-syntax name="start-participant">
  <e:attribute name="select">
    <e:data-type name="node-set-expression"/>
  </e:attribute>
  <e:attribute name="resource">
    <e:data-type name="uri-reference"/>
  </e:attribute>
  <e:sequence>
    <e:model repeat="zero-or-more" name="other-namespace-elements"/>
  </e:sequence>
</e:element-syntax>

<e:element-syntax name="end-participant">
  <e:attribute name="select">
    <e:data-type name="node-set-expression"/>
  </e:attribute>
  <e:attribute name="resource">
    <e:data-type name="uri-reference"/>
  </e:attribute>
  <e:sequence>
    <e:model repeat="zero-or-more" name="other-namespace-elements"/>
  </e:sequence>
</e:element-syntax>

<p>The <el>xsl:start-participant</el> and <el>xsl:end-participant</el>
elements identify the beginning and ending resources of the arc. Each
resource can be identified by <emph>either</emph> a <att>select</att>
or a <att>resource</att> attribute.
</p>
</div3>

<div3><head>Using the Link Elements</head>

<p>With these elements, we can recast our earlier template as follows:</p>

<eg role="linkex"><![CDATA[<xsl:template match="name">
  <xsl:link>
    <xsl:arc>
      <xsl:start-participant select="."/>
      <xsl:end-participant resource="http://example.com/address?{.}"/>
    </xsl:arc>
  </xsl:link>
</xsl:template>]]></eg>
</div3>

<div3><head>Merging Link Sets</head>

<p>The links created by <el>xsl:link</el> are placed in the result tree
link set. They are explicitly not placed in the source tree link set and
are not available for querying by the stylesheet.</p>

<p>If an explicit result tree link set is desired, when the styling
process completes, it must be constructed by merging the relevant
links from the source document link set (with appropriate translation
into the result tree) with the links explicitly created in the result
document link set.</p>

<p>If this is our result tree:</p>

<eg role="linkex"><![CDATA[<div>
  <p><em>Pat Jones</em> is taking <span>CS 101<span></p>
</div>]]></eg>

<p>Then the source document link set would contribute the following links
to the result document link set:</p>

<eg role="linkex"><![CDATA[<linkset xmlns="&namespaceName;">
  <link>
    <arc>
      <start-participant resource="result-tree:/div/p/span[1]"/>
      <end-participant resource="courses/cs101.xml"/>
    </arc>
  <link>
]]></eg>

<note><p>We've introduced the "scheme" <code>result-tree:</code> to
express pointers into the result tree. This is just a convention for
presentation here. In a real implementation, pointers or some other
mechanism would more likely be used and if the link set were serialized,
a proper base URI would be known.</p></note>

<p>The template that constructed an explicit link would contribute:</p>

<eg role="linkex"><![CDATA[<linkset xmlns="&namespaceName;">
  <link>
    <arc>
      <start-participant resource="result-tree:/div/p/em[1]"/>
      <end-participant resource="http://example.com/address?Pam Jones"/>
    </arc>
  <link>
]]></eg>

<p>So the resulting link set is <el>linkset</el> that contains these two
<el>link</el>s.</p>

</div3>

<div3><head>What's Missing</head>

<p>These elements allow the stylesheet author to construct links that
become part of the unified processing model. One obvious weakness that
remains is that it is not possible for these elements to link to generated
text. Suppose that I have a cross reference element that is processed
as follows:</p>

<eg role="linkex"><![CDATA[<xsl:template match="xref">
  <xsl:text>See also: </xsl:text>
  <xsl:apply-templates/>
</xsl:template>]]></eg>

<p>There's no way to use the <el>xsl:link</el> elements to construct a
link from the generated text "See also: ", because there's no source tree
select expression that can identify it.</p>

<p>One possible way to move forward would be to add a new attribute,
<att>result-tree-id</att> which would allow the generated text to be
addressed:</p>

<eg role="linkex"><![CDATA[<xsl:template match="xref">
  <xsl:text result-tree-id="xref{generate-id(.)}">See also: </xsl:text>
  <xsl:apply-templates/>
  <xsl:link>
    <xsl:arc>
      <xsl:start-participant select="result-tree:/id(xref{generate-id(.)}"/>
      <xsl:end-participant resource="whatever-is-appropriate"/>
    </xsl:arc>
  </xsl:link>
</xsl:template>]]></eg>

<p>But this seems contrived and unsatisfactory. We invite suggestions.</p>
</div3>

</div2>
</div1>

<div1 id="sec-link-traversal">
<head>Styling Link Traversal</head>

<p>After much consideration, we arrived at the conceptual model which
follows. This model exposes a significant issue in the interaction between
the current technologies for linking and styling: <bibref ref="xpointer-cr"/>
can address documents at the character level whereas
<bibref ref="xslt-rec"/> can only address documents at the text-node level.</p>

<p>We show that by selecting specific defaults within the model, we
can provide expected functionality with current technology. As the
technology of linking and styling matures, we'll be able to exploit
more of the model with standard technologies. (Implementations will
be able to exploit the entire model immediately by employing extensions
to standard functionality.)</p>

<div2 id="sec-link-traversal-concepts">
<head>A Conceptual Model for Styling Link Traversal</head>

<p>From a styling perspective, link traversal requires the styling
application to retrieve the document which contains the ending
resource, style it, and present it. In addition, the ending resource
may get special treatment. It might, for example, be shown in reverse
video
or the document view might be adjusted so that the ending resource
appears at the top of the viewing context.</p>

<p>Displaying the styled result is a complex problem because links are
between <emph>source documents</emph>, not between their styled results.
Consider, for example, an XLink cross-reference:</p>

<eg role="linkex"><![CDATA[See <xref xlink:type="simple" xlink:href="#ch5">Chapter 5</xref>]]></eg>

<p>This link expresses a relationship between the text "Chapter 5" and
the element with an ID of "ch5" elsewhere in the document. It provides
no specific information about the formatted result that might be
presented to the reader. Online, this might become a hypertext link to
some other location whereas in print it might be rendered simply as a
page number in parenthesis (or not at all).</p>

<p>The arbitrary nature of styling transformations can make this
problem even more complex, as when the target in the source document
is rendered in multiple locations in the presented result
(See <specref ref="sec-discon-results"/>).</p>

<p>We may also want to consider how much of the document that contains
the ending resource we wish to display. HTML browsers traditionally
retrieve the entire resource and display it, moving the viewing
context to the point where the ending resource occurs. In the case of
XML documents, we may wish to have more control.  We add one additional
generalization to the conceptual model for this purpose.</p>

<p>Rather than presenting the entire resource, we might want to
display a subresource within the document <emph>that is
different</emph> from the subresource that is the ending resource of
the link. For example, to style a link to a figure within a book, we
might want to display the whole chapter that contains the figure:
</p>

<eg role="linkex">&ex03.eg;</eg>

<p>In other words, we might wish to style a link by processing a whole
document (in order to get chapter numbering correct, for
example), present the third chapter in the user agent, and highlight
the figure.</p>

<p>We describe this in terms of three distinct contexts, each identified
by a URI reference (probably including an <bibref ref="xpointer-cr"/>
fragment identifier in most cases):</p>

<olist>
<item><p><termdef id="dt-processing-context" term="Processing Context">The
<term>Processing Context</term> of a link traversal is the resource (or
portion of a resource) that is available to the style engine.</termdef>
</p>
<p>Informally, this is the tree that is available to the styling
application. Usually this is the whole document.</p>
</item>

<item><p><termdef id="dt-presentation-context" term="Presentation Context">The
<term>Presentation Context</term> of a link traversal is the resource (or
portion of a resource) that is effectively the source resource to be
styled.</termdef></p>
<p>In other words, the results of styling the [Presentation Context] is
the content that is presented in the user agent. Often this is the whole
document.</p>
</item>

<item><p><termdef id="dt-target" term="Target">The
<term>Target</term> of a link traversal is the ending resource of the link.
</termdef></p>
</item>
</olist>

<p>These components, plus the stylesheet to be used,
are present in the &infoset; contributions
described in <specref ref="xlink-infoset"/>. However, the current XLink
specification does not provide standard ways to provide all of these
components. Rather than request possibly contentious additions to XLink
at this late date, we recommend using default values for several
components.</p>

<!--
<table border="1" width="80%" summary="Defaults">
<caption>Standard Defaults for XML Linking Styling Components</caption>
<thead>
  <tr>
    <th>&#160;</th>
    <th>Processing Context</th>
    <th>Presentation Context</th>
    <th>Target</th>
    <th>Stylesheet</th>
  </tr>
</thead>
<tbody>
  <tr>
    <th><code>show="new"</code> or <code>show="replace"</code></th>
    <td>(Document)</td>
    <td>(Document)</td>
    <td>Target</td>
    <td>(same or Stylesheet PI)</td>
  </tr>
  <tr>
    <th><code>show="embed"</code></th>
    <td>(Document) or Target</td>
    <td>Target</td>
    <td>Target</td>
    <td>(same or Stylesheet PI)</td>
  </tr>
  <tr>
    <td colspan="5">Defaults shown in parenthesis.</td>
  </tr>
</tbody>
</table>
-->

<p>For embedded resources, we recommend that the default processing
and presentation contexts be the same as the target (see <specref ref="spec-range-embed"/>). For resources displayed with "new" or
"replace" semantics, we recommend that the default processing and
presentation contexts be the whole document that contains the ending
resource.</p>

<p>In any case, the application
has considerable freedom in selecting the appropriate stylesheet. In some
applications it may make sense to use the same stylesheet as the source
document (particularly, perhaps, in the "embed" case); in others it may
make sense to use the XML Stylesheet PI (<bibref ref="style-pi"/>)
from the target document or some other application-specific selection.</p>

<p>Application-specific behavior can be modeled with extension metadata
in the XLink linking elements. If useful subsets of this behavior become
common, a future version of XLink may promote them to standard elements.</p>

<div3 id="sec-embed-complication">
<head>Special Considerations for Embedded Resources</head>

<p>The model articulated here is the most consistent and
rational model that we could imagine. It does not,
however, produce exactly the results that might be expected in all
cases. In particular, embedding resources requires special
consideration. (Embedding resources identified by XPointer ranges
is even worse; see <specref ref="spec-range-embed"/>.)</p>

<p>Consider the following documents, <code>doc1.xml</code>:</p>

<eg>&lt;doc>
&lt;?xml-stylesheet href="style1.xsl" type="text/xsl"?>
&lt;list>
&lt;item>x xxxx&lt;/item>
&lt;item>xxx xx xxxx&lt;/item>
&lt;embed xlink:type="simple"
       xlink:show="embed" xlink:actuate="onLoad"
       xlink:href="doc2.xml#xpointer(//list[1]/item[2])"/>
&lt;item>xxxxx&lt;/item>
&lt;/list>
&lt;/doc></eg>

<p>and <code>doc2.xml</code>:</p>

<eg>&lt;doc>
&lt;?xml-stylesheet href="style2.xsl" type="text/xsl"?>
&lt;list>
&lt;item>y yyyy&lt;/item>
&lt;item>yyy yy yyy&lt;/item>
&lt;item>yyyy&lt;/item>
&lt;/list>
&lt;/doc>
</eg>

<p>Suppose that <code>style1.xsl</code> styles lists with Arabic
numerals and <code>style2.xsl</code> styles them with Roman numerals
(and no other significant transformations are performed). What will
the results be?</p>

<p>If the embedded fragment is processed with <code>style1.xsl</code>,
the result will be something like this:</p>

<eg>1. x xxxx
2. xxx xx xxxx
2. yyy yy yyy
4. xxxxx</eg>

<p>(In fact, it is even possible that the last item will be numbered "3"
if the stylesheet is only counting <code>&lt;item&gt;</code>s, but that
can be avoided in the stylesheet.)</p>

<p>If the embedded fragment is processed with <code>style2.xsl</code>,
the result will be something like this:</p>

<eg>1. x xxxx
2. xxx xx xxxx
ii. yyy yy yyy
4. xxxxx</eg>

<p>In neither case will the result that the author probably had in mind
(namely 1, 2, 3, 4) be the result.</p>

<p>In fact, the desired result can be achieved, but only by constructing
the <emph>source</emph> document in an appropriate way:</p>

<eg>&lt;doc>
&lt;?xml-stylesheet href="style1.xsl" type="text/xsl"?>
&lt;list>
&lt;item>x xxxx&lt;/item>
&lt;item>xxx xx xxxx&lt;/item>
&lt;item>&lt;embed xlink:type="simple"
       xlink:show="embed" xlink:actuate="onLoad"
       xlink:href="doc2.xml#xpointer(//list[1]/item[2]/node())"/>
&lt;/item>
&lt;item>xxxxx&lt;/item>
&lt;/list>
&lt;/doc></eg>

<p>By selecting only the content of the target list item, we allow the
stylesheet for the source document to number all of the items in a logical
way.</p>

<p>This is hardly the best possible situation, but no superior alternative
seems evident.</p>

<p>Since both of these documents seem to use the same tag set,
it may have been closer to the author's original intention to style a
document that contained <emph>a merged source document</emph> (as
might be achieved with <bibref ref="xinclude-wd"/>)
rather than <emph>merging the
styled results</emph>
(as is achieved with <bibref ref="xlink-cr"/>).
See <specref ref="xinclude-vs-xlink"/>.</p>
</div3>

<div3><head>Result Tree Numbering</head>

<p>To compound the situation further, the two most popular
presentation formats for XML documents, HTML and XSL Formatting
Objects, perform numbering in completely different ways.
</p>

<p>In the HTML, list item numbering is actually done by the formatter,
whereas it is done by the transformation that produces FOs in
XSL. This means that the first example described above will
actually work for HTML but not for XSL FOs.</p>

<p>Conversely, if the desired result was a mixture of numbering systems
(as might be the case in a legal document, perhaps), the former result
could not be achieved in HTML without considerable effort.</p>

<p>Consider how the stylesheets would likely produce formatting objects
for the <code>doc1.xml</code>:</p>

<eg>&fo.eg;</eg>

<p>As you can see, the list item numbers are textually part of the
result tree. This is not so in the HTML case:</p>

<eg>&html.eg;</eg>

<p>The list items are enumerated by the browser in the HTML case,
so the numbering will be sequential.</p>

</div3>

<div3 id="xinclude-vs-xlink"><head>XInclude vs. XLink Embedding</head>

<p>The distinction between <bibref ref="xinclude-wd"/> and
<bibref ref="xlink-cr"/> deserves special consideration.</p>

<p>At a high level, <bibref ref="xinclude-wd"/> is similar to
external entity references in <bibref ref="xml-rec"/>. That is,
the inclusion is done at or shortly after parsing, before style
is applied. As you can see in the following figure, the element
"E" is identified as an XInclude element and the content
<emph>of the source tree</emph> is modified <emph>prior</emph>
to styling:</p>

<graphic source="include-style.gif" alt="xinclude styling"/>

<p>Embedded XLinks, as we've described them, are handled during the
styling process. When an embedded XLink is processed, the
<emph>result of styling the ending resource</emph>
of the link <emph>is merged</emph> into the
<emph>result of styling the document into which it is embedded</emph>.</p>

<graphic source="embed-style.gif" alt="xlink embed styling"/>

<p>The decision about whether to use an <bibref ref="xinclude-wd"/> or
an embedded <bibref ref="xlink-cr"/> is very dependent on the
application.  As a general rule, if the resource being embedded is
from the same schema as the embedding document, and it will be styled
with the same stylesheet, <bibref ref="xinclude-wd"/> is probably a
good choice. If the embedded document is from a different schema, or
requires a different stylesheet, <bibref ref="xlink-cr"/> is probably
the right choice.</p>

</div3>

</div2>

<div2><head>The Semantics of Nested Linking</head>

<p>The actuate axis of an XLink linking element has two standard, defined values,
<code>onRequest</code> and <code>onLoad</code>. For links which have
the <code>onRequest</code> semantics, style processing is straightforward:
processing continues (possibly to completion) until a user event
initiates the link.</p>

<p>For links which have the <code>onLoad</code> semantic, however,
things are slightly more complicated. The styling application is
expected to process these links during the styling process
(effectively, "when the document is loaded").</p>

<p>There are several cases to consider:</p>

<glist>
<gitem>
<label>An "onLoad" link with an <att>xlink:show</att> of "new"</label>
<def><p>The styling application should create a
new viewing context (window, frame, pane, etc.) and display the ending
resource of the link in that context.</p></def>
</gitem>

<gitem>
<label>An "onLoad" link with an <att>xlink:show</att> of "replace"</label>
<def><p>The styling application should replace the document currently
being styled with the ending resource of the link.</p>
<p>The <bibref ref="xlink-cr"/> specification says that the first such
link in document order is the one that should be processed. However, because
a styling application has the freedom to process the nodes of a document
in any order, this definition seems restrictive. We recommend instead that
it simply state that the first such link encountered should be
processed. (Subsequent nodes will clearly not be processed since the
original document is abandoned.) By extension, if the first link encountered
has multiple arcs, the first arc should be processed.
</p>

<note><p>The fact that this behavior can lead to infinite loops through
one or more documents is a problem outside the scope of this note.</p>
</note>
</def>
</gitem>

<gitem>
<label>An "onLoad" link with an <att>xlink:show</att> of "embed"</label>
<def><p>The styling application should embed the result of styling
the ending resource of the link in the current document.</p></def>
</gitem>
</glist>

<p>The possibility of a resource that is <emph>being embedded</emph>
containing an "onLoad" link must also be considered:</p>

<glist>
<gitem>
<label>An "onLoad" link with an <att>xlink:show</att> of "new" encountered
in a resource being embedded</label>
<def><p>The styling application should create a
new viewing context (window, frame, pane, etc.) and display the ending
resource of the link in that context.</p>
<p>In other words, if A embeds B which contains an onLoad/new link
to C, the result will be B embedded in A in one viewing context and
C in another viewing context.</p></def>
</gitem>

<gitem>
<label>An "onLoad" link with an <att>xlink:show</att> of "replace" encountered
in a resource being embedded</label>
<def><p>The style processor should replace the <emph>resource being
embedded</emph> with the result of styling the ending resource of the
link.</p>
<p>In other words, if A embeds B which contains an onLoad/replace link
to C, the result will be C embedded in A, with no trace of B.</p></def>
</gitem>

<gitem>
<label>An "onLoad" link with an <att>xlink:show</att> of "embed" encountered
in a resource being embedded</label>
<def><p>The styling application should embed the result of styling
the ending resource of the link in the current document.</p>
<p>In other words, if A embeds B which contains an onLoad/embed link
to C, the result will be C embedded in B embedded in A.</p></def>
</gitem>
</glist>
</div2>
</div1>

<div1 id="sec-discon-results">
<head>Discontiguous Resources</head>

<p>Styling discontiguous resources presents a special set of problems.
One set of problems arises because we may wish to offer behavior in the
presentation engine that is independent of whether or not the resource
is discontiguous. A more significant issue involves the way in which
style transformations may create discontiguous resources from a single
resource in the source document.</p>

<div2 id="sec-discon-functions">
<head>Implementing Consistent Behavior</head>

<p>Some presentation systems implement special behaviors with respect
to linking resources. For example, browsers may present links in a
different color or speak them in a different tone of voice.</p>

<p>Often, discontiguous resources can be viewed as distinct.  That is,
a single resource consisting of three phrases can generally be treated
like three resources, each consisting of a single phrase.</p>

<p>When this is not sufficient, for example, when the stylesheet
author wishes to implement "mouse-over" highlighting of links and she
wants discontiguous parts of the same link to be highlighted together,
additional effort may be required.</p>

<p>The enhanced &infoset; constructed by XLink identification, provides
the raw materials from which such a feature could be implemented.</p>

<p>The XSL Formatting Objects include properties for selecting alternate
presentations based on conditions. These properties, in conjunction with
a presentation system that has access to the enhanced &infoset; would
allow an application to support this behavior.</p>

<p>Likewise for other presentation systems, access to the enhanced
&infoset; provides enough information to implement the required
functionality.</p>

</div2>
<div2 id="sec-style-discon">
<head>Discontinuity Introduced by Styling</head>

<p>Transforming source documents for presentation may introduce
discontinuities. For example, consider a link to a chapter title. In
the document that contains the ending resource, that title is a
single, unambiguous element. But when that document is styled, the
chapter title may occur in several places (in the table of contents,
on the chapter title page, and in a dozen cross references). Which one
of these represents the ending resource?
</p>

<p>No perfect algorithm for finding the target is readily apparent,
but reasonable heuristics have been described
<bibref ref="HookerMaden2000"/>.</p>

<p>To the extent that it is practical, we think applications should
provide users with access to all of the possible targets.</p>
</div2>
</div1>

<div1 id="sec-ranges">
<head>Ranges are Challenging</head>

<p>XPointer ranges present a number of exceptional challenges to the
styling process. In the simplest case, they may be used to style
components that are smaller than the components exposed by the
data model of a particular styling language. Consider this link:</p>

<eg role="linkex">&ex04.eg;</eg>

<p>The link is composed only of characters in the middle of a text node.</p>

<p>Ranges can also span normal element boundaries, producing ranges
of text that are not well-formed in the XML sense:</p>

<eg role="linkex">&ex05.eg;</eg>

<div2 id="spec-range-display">
<head>Styling Ranges in a Larger Presentation Context</head>

<p>Styling ranges (starting or ending resources expressed with XPointer ranges)
in a larger context is problematic when the data model of the style language
has a coarser granularity than the XML character. In particular, the
XSLT 1.0 data model exposes text nodes, but not individual characters.</p>

<p>We propose that a reasonable processing model in this case is simply
to style the smallest available node in the data model. For example,
we expect <function>ext:arc-start()</function> to return a non-empty
node set on every text node that contains one or more characters
that are starting resources.</p>

<p>This will generally result in the "sloppy" application of style. For
example,</p>

<eg role="linkex">&ex04.eg;</eg>

<p>will be styled as if the link were:</p>

<eg role="linkex">&ex04b.eg;</eg>

<p>and</p>

<eg role="linkex">&ex05.eg;</eg>

<p>will be styled as if the link were:</p>

<eg role="linkex">&ex05b.eg;</eg>

<p>If styling markup of this sort is a requirement for XSLT 2.0, as we
think it is, then the data model of XSLT will have to be extended to
include characters.</p>

<p>A few additional extension functions could be added
which would offer a laborious solution to a subset of the range
problems that can occur inside a text node through extensive use of
the <function>substring</function> function. But it is not clear that any
rational substring-based approach will handle all of the possible
cases (e.g. discontiguous character ranges within a single text node
that taken together form a linking resource).</p>

</div2>
<div2 id="spec-range-embed">
<head>Ranges that are Presentation Context</head>

<p>The problem of ranges in the &presctxt; is much more serious. When
the &presctxt; is a range, a "sloppy" approach is unsuitable. If the
link author requests that a specific range of the target document is
to be presented, displaying more or or less than that range may be
disastrous. Consider the case where a warning is accidentally lost or
an adjacent range that has security implications is accidentally
displayed.</p>

<p>The problem is especially troublesome when we consider embedded
links. In the embedded case, we have suggested that
the &presctxt; be the same as the &target;. If an embedded link uses ranges
to point to a portion of a text node, it would be entirely unacceptable
to embed the entire text node.</p>

<note><p>Because the "sloppy" approach is unsuitable in this
case, it follows that ranges cannot be implemented using tools that have
a data model that does not address individual characters.</p></note>

<p>To tackle the difficult case introduced by ranges, we suggest that
a subset of XPointer that did not include ranges would be a useful product.
Such a subset could then be used as the data type for
&presctxt; and <code>show="embed"</code> ending resources.</p>

<p>However, we suggest the following approach of "pruning" as a possible
work-around for applications which must support &presctxt;s that are
defined in terms of ranges:</p>

<olist>
<item><p>Identify the smallest contiguous set of whole information
items which completely
contains the resource in question:</p>

<eg role="linkex">&prune1.eg;</eg>
</item>

<item><p>Within this set, it is possible to identify three
classes of information items:</p>
  <olist>
    <item><p>Those that are wholly within the range: e.g. all the character
information items that occurs between the two <code>emph</code> elements.</p>
    </item>
    <item><p>Those that are wholly outside the range: e.g. the character
information items that comprise the string "-formed".</p></item>
    <item><p>Those that are partially within the range: e.g. the
<code>emph</code> &elemii;s.</p></item>
  </olist>

</item>
<item><p>Remove all information items that are wholly
<emph>outside</emph> the range:</p>

<eg role="linkex">&prune2.eg;</eg>

<p>In this example, only text was removed, but if additional
elements had been included by the initial set of information items,
they would have been removed as well.</p>

</item>
</olist>

<p>The node set that remains after this process becomes <emph>both</emph>
the &presctxt; <emph>and</emph> the &procctxt; for the link.</p>

<p>It is necessary for the &procctxt; to be restricted as well as the
&presctxt; because there is no practical way, in the general case,
under arbitrary transformation, for an application to trim the
<emph>styled</emph> result to just the nodes that resulted from
processing the target. The tree must be pruned <emph>before</emph>
styling. We feel that this additional complication provides further
evidence in favor of a range-free subset of XPointer.</p>

<note><p>Pruning prior to styling introduces the possibility that
nodes which contributed to the style of the result may have been lost
and therefore unexpected styling may occur.</p>
</note>

</div2>

<div2 id="range-ligs"><head>Ranges and Glyph/Character Boundaries</head>

<p>Ranges can also be problematic if they have boundaries that occur
at certain glyph and character locations.</p>

<p>Consider the following range:</p>

<eg role="linkex">&ex07.eg;</eg>

<p>In a visual presentation system, what is the extent of that link if
the word "flying" begins with the "fl" ligature?</p>

<p>This problem is not limited to subtle issues of appropriate glyph
selection for aesthetic purposes. In some Indic languages, for
example, the actual order of the displayed glyphs may be different
from the order of characters in the source. Similar problems occur
in Thai, Arabic, and Hebrew, where the order and position of displayed
glyphs depends on linguistic factors, not simply on the order of the
characters in the source document.</p>

<p>It's unclear if there are any specific recommendations that can be
made about this issue globally, except that avoiding character ranges,
especially ranges that occur inside words, is probably best.</p>

</div2>
</div1>
</body>
<back>
<div1 id="sec-bibliography">
<head>References</head>

<p>The distinction between normative and non-normative references is
made only to emphasize the distinction between references to stable
documents (W3C Recommendations, IETF RFCs, etc.) and documents that
are in some sense unstable (W3C Working Drafts, etc.). W3C Notes have
no normative status whatsoever.</p>

<div2><head>Normative References</head>

<blist>
<bibl id="xml-rec" href="http://www.w3.org/TR/REC-xml" key="XML">Tim Bray, Jean Paoli, and C. M. Sperberg-McQueen, editors.
  <titleref>Extensible Markup Language (XML) 1.0</titleref>.
  World Wide Web Consortium, 1998.
</bibl>
<bibl id="xml-names" href="http://www.w3.org/TR/REC-xml-names/" key="XML Names">Tim Bray, Dave Hollander, and Andrew Layman, editors.
  <titleref>Namespaces in XML</titleref>.
  World Wide Web Consortium, 1999.
</bibl>
<bibl id="xpath-rec" href="http://www.w3.org/TR/xpath" key="XPath">James Clark, Steve DeRose, editors.
  <titleref>XML Path Language (XPath) Version 1.0</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xslt-rec" href="http://www.w3.org/TR/xslt" key="XSLT">James Clark, editor.
  <titleref>XSL Transformations (XSLT) Version 1.0</titleref>.
  World Wide Web Consortium, 1999.
</bibl>
<bibl id="style-pi" href="http://www.w3.org/TR/xml-stylesheet/" key="XML Stylesheet PI">James Clark, editor.
  <titleref>Associating Style Sheets with XML Documents Version 1.0</titleref>
  World Wide Web Consortium, 1999.
</bibl>
<bibl id="rfc2396" href="http://www.ics.uci.edu/pub/ietf/uri/rfc2396.txt" key="IETF RFC 2396">IETF (Internet Engineering Task Force).
  <titleref>RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax</titleref>.
  T. Berners-Lee, R. Fielding, L. Masinter. 1998.
</bibl>
</blist>
</div2>
<div2><head>Other References</head>
<blist>
<bibl id="HookerMaden2000" href="http://www.oreilly.com/%7Ecrism/xtech2k/" key="HookerMaden2000">Hooker, Deborah,
      and Christopher Maden.
  <titleref>&AElig;sop: A Browser for XML Documents and Open eBook
  Publication Structures</titleref>.
  In XTech 2000, San Jos&eacute;, February 2000.
</bibl>
<bibl id="xsl-wd" href="http://www.w3.org/TR/xsl/" key="XSL">Sharon Adler, Anders Berglund, Jeff Caruso, et. al., editors.
  <titleref>Extensible Stylesheet Language (XSL) Version 1.0</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xmlbase-wd" href="http://www.w3.org/TR/xmlbase/" key="XML Base">Jonathan Marsh, editor.
  <titleref>XML Base</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xinclude-wd" href="http://www.w3.org/TR/xinclude/" key="XInclude">Jonathan Marsh, David Orchard, editors.
  <titleref>XML Inclusions (XInclude) Version 1.0</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xml-infoset-wd" href="http://www.w3.org/TR/xml-infoset/" key="XML Infoset">John Cowan, editor.
  <titleref>XML Information Set</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xlink-cr" href="http://www.w3.org/TR/xlink/" key="XLink">Steve DeRose, Eve Maler, David Orchard, Ben Trafford, editors.
  <titleref>XML Linking Language (XLink) Version 1.0</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xpointer-cr" href="http://www.w3.org/TR/xpath" key="XPointer">Ron Daniel Jr., Steve DeRose, Eve Maler, editors.
  <titleref>XML Pointer Language (XPointer) Version 1.0</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
<bibl id="xmlschema-cr" href="http://www.w3.org/TR/xmlschema-1/" key="XML Schema (Structures)">Henry S. Thompson,
      David Beech, Murray Maloney, et. al. editors.
  <titleref>XML Schema Part 1: Structures</titleref>.
  World Wide Web Consortium, 2000.
</bibl>
</blist>
</div2>
</div1>
<inform-div1>
<head>Summary of Proposed Changes to XSLT</head>

<p>This appendix summarizes the proposed changes to XSLT/XSL to provide
better support for linking.</p>

<!--
<div2>
<head>New Axis</head>

<p>We propose the addition of three new axis in a future version of
XSLT:</p>

<glist>
<gitem><label>link::</label>
<def>
<p>The link:: axis selects &linkii;s associated with the document.</p>
</def>
</gitem>
<gitem><label>arc-start::</label>
<def>
<p>The arc-start:: axis selects the &arcii;s in the &startpa; property
of the context node.</p>
</def>
</gitem>
<gitem><label>arc-end::</label>
<def>
<p>The arc-end:: axis selects the &arcii;s in the &endpa; property
of the context node.</p>
</def>
</gitem>
</glist>

</div2>
-->

<div2>
<head>link-target</head>

<p>The <att>link-target</att> attribute can appear on <el>xsl:element</el>
elements and on literal result tree elements. When <code>true()</code>,
the element on which it occurs is the link target for any links associated
with the current context node. The use of <att>link-target</att> overrides
any heuristic for the links which are associated with the context node.</p>

</div2>

<div2>
<head>xsl:link-style</head>

<p>We propose a new XSL element to provide style properties.</p>

<eg><![CDATA[
<!-- Category: instruction -->
<xsl:link-style
  select = expression
  xsl:use-attribute-sets = qnames>
  <!-- Content: xsl:attribute* -->
</xsl:link-style>
]]></eg>

<p>The select expression of <el>xsl:link-style</el> should always select
&linkii;s. The attributes provided are associated with the links selected.</p>

</div2>

<div2>
<head>XSL Linking Elements</head>

<p>The <el>xsl:link</el>, <el>xsl:arc</el>, <el>xsl:start-participant</el>,
and <el>xsl:end-participant</el> elements allow a stylesheet author to
construct links that can be treated uniformly with links that are manifest
in the source or in a link base.</p>
</div2>

<div2>
<head>xsl:next-match</head>

<p>The <el>xsl:next-match</el> element selects the next highest priority
template for the current context node and applies it.</p>

</div2>
</inform-div1>
<inform-div1 id="sec-xml-wg">
<head>W3C XLink/XSL Joint Task Force</head>
<p>This note was prepared and approved for publication by the W3C
XLink/XSL Joint Task Force (TF). TF approval of this note
does not necessarily imply that all TF members agreed with all aspects of the
note. The members of the XLink/XSL Joint TF are:</p>
<orglist>
<member><name>Sharon Adler</name>
<affiliation>IBM</affiliation>
</member>
<member><name>Anders Berglund</name>
<affiliation>IBM</affiliation>
</member>
<member><name>Paul Grosso</name>
<affiliation>Arbortext</affiliation>
</member>
<member><name>Eduardo Gutentag</name>
<affiliation>Sun</affiliation>
</member>
<member><name>Chris Maden</name>
</member>
<member><name>Eve Maler</name>
<affiliation>Sun</affiliation>
<role>Chair</role>
</member>
<member><name>Norman Walsh</name>
<affiliation>Sun</affiliation>
<role>Editor</role>
</member>
</orglist>
</inform-div1>

</back>
</spec>
