OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-tc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: [docbook-tc] XHTML and XSL FO on nested links


> Action: Paul to report what the XHTML and XSL FO specs actually say
> about nested links.

Okay, here's my report, though I forget how exactly this addresses
the original issue of wanting to allow xref within link/ulink/olink.

The XHTML spec [1] says "The semantics of the elements and their 
attributes are defined in the W3C Recommendation for HTML 4."

The HTML 4.1 spec [2] excludes A elements from the content
model of the A element, so it defines no semantics for nested
"a" elements.  In fact, more specifically [3] it says clearly
that nested links are illegal.

Back to XHTML, the DTD allows nesting since it cannot use
exclusions, but even has a comment in it proscribing nesting [4]:

  <!--================== The Anchor Element =====================-->

  <!-- content is %Inline; except that anchors shouldn't be nested -->

  <!ELEMENT a %a.content;>

I note that the Conformance section of the XHTML spec [5] says that
a document conforms if it validates to one of the DTDs, so a document
with nested anchors does technically conform per this section.

However in section 4.9 [6], it does say:

  For example, the HTML 4 Strict DTD forbids the nesting of an 'a'
  element within another 'a' element to any descendant depth. It is not
  possible to spell out such prohibitions in XML. Even though these
  prohibitions cannot be defined in the DTD, certain elements should not
  be nested. A summary of such elements and the elements that should not
  be nested in them is found in the normative Appendix B.

[note "should", not "must"] but then appendix B [7] says:

  This appendix is normative.

  The following elements have prohibitions on which elements they
  can contain (see Section 4.9). This prohibition applies to all depths of
  nesting, i.e. it contains all the descendant elements.

         a 
              cannot contain other a elements. 

and there between "normative" and "cannot" it makes it clear the spec writers
(despite not including it in the conformance section and saying "should"
earlier) probably wanted to make nesting of <a> elements invalid in XHTML.

----

In XSL FO, the discussion of fo:basic-link [8] doesn't say anything specifically
about nesting.  The content model at [8] allows %inline; which at [9] clearly
includes basic-link, so there is no reason to believe links cannot be nested.
The description of the various properties of fo:basic-link provide no further
information.

Xlink [10] clearly allows nesting of link elements, but it doesn't seem to
specify a particular semantic for this.  It says:

  The simple-type element may have any content. The simple-type element
  itself, together with all of its content, is the local resource of
  the link, as if the element were a resource-type element. If a
  simple-type element contains nested XLink elements, such contained
  elements have no XLink-specified relationship to the parent link. 

But between "the simple-type element itself, together with all of its
content, is the local resource of the link" and the discussion in XLink
of resources, locators, and one-to-many links, I would think that two
reasonable semantics of a nested link are:

1.  for any point in a document, always link to the resource referenced
    by the closest ancestral link element;

2.  for any point in a document, if the application supports one-to-many
    links, treat links from the given point as a one-to-many link linking
    to all resources referenced by any ancestral link element.

paul

[1] http://www.w3.org/TR/xhtml1/
[2] http://www.w3.org/TR/html401/struct/links.html#h-12.2
[3] http://www.w3.org/TR/html401/struct/links.html#h-12.2.2
[4] http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
[5] http://www.w3.org/TR/xhtml1/#normative
[6] http://www.w3.org/TR/xhtml1/#h-4.9
[7] http://www.w3.org/TR/xhtml1/#prohibitions
[8] http://www.w3.org/TR/xsl/slice6.html#fo_basic-link
[9] http://www.w3.org/TR/xsl/slice6.html#inline.fo.list
[10] http://www.w3.org/TR/xlink/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC