W3C home > Mailing lists > Public > www-xml-linking-comments@w3.org > January to March 2006

Re: XLink 1.1: xlink:href requirements

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Tue, 24 Jan 2006 10:11:35 -0500
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: www-xml-linking-comments@w3.org
Message-ID: <87zmllek48.fsf@nwalsh.com>
/ Bjoern Hoehrmann <derhoermi@gmx.net> was heard to say:
| * Norman Walsh wrote:
|>|>|   http://www.w3.org/TR/2005/WD-xlink11-20050707/ section 5.4 notes
|>|>| "The value of the href attribute must be an IRI reference as defined in
|>|>| [IETF RFC 3987] or must result in an IRI reference after the escaping
|>|>| procedure described below is applied." Except for the space character,
|>|>| applying the algorithm would just render illegal IRIs XLink-compliant;
|>|>| I do not really see how this would make sense, please replace this
|>|>| part of the draft with something more reasonable.
|>|>I'm sorry, could you please explain your comment in more detail, I don't
|>|>understand your comment.
|>| The requirement is that the value must be a IRI reference after applying
|>| the IRI reference -> URI reference conversion algorithm. Since all URI
|>| references are said to be IRI references, applying the algorithm makes a
|>| difference iff a string that is not an IRI reference is converted to a
|>| URI reference. What's the point?
|>The point is to allow xlink:href="http://example.org/path/file with spaces"
|>to be treated as if the author had written the "correct" value:
|>Experience with HTML suggests that authors will frequently make this
|>mistake and that most deployed software "does the right thing". XLink
|>explicitly defines what the right thing is in this case.
| You have isValidIRI(convertIRItoURI(escapeSpace(x))) while you seem to
| desire isValidIRI(escapeSpace(x)), so keeping things as is does not
| address my concern.

The text in this area has been updated as part of a plan to harmonize across
the entire suite of Core specs. Perhaps the new wording is satisfactory?
Please let me know:

5.4 Locator Attribute (href)

The attribute that supplies the data that allows an XLink application
to find a remote resource (or resource fragment) is href. It may be
used on simple-type elements, and must be used on locator-type

The value of the href attribute is an _XML resource identifer_, which

  (this is a text transcription; in the HTML, "XML resource identifier"
  is a link to section 5.4.1 below)

must be an IRI reference as defined in [RFC 3987] or must result in an
IRI reference after the escaping procedure described in 5.4.1 XML
Resource Identifiers is applied. If necessary for the implementation,
the value may be further converted to a URI reference as described in
5.4.1 XML Resource Identifiers.

Because it is impractical for any application to check that a value is
a URI reference, this specification follows the lead of [RFC 3986] in
this matter and imposes no such conformance testing requirement on
XLink applications.

If the value of the href attribute is a relative URI, or results in a
relative URI after escaping, its absolute version must be computed by
the method of [XML Base] before use.

If a locator includes a fragment identifer, the syntax of the fragment
identifier is defined by the media type of the representation returned
when the locator is dereferenced. For locators into XML resources
(that is, resources with the media type "application/xml" or media
types that defer to the fragment identifier syntax of
"application/xml" media), the syntax of the fragment identifier is
expected to be defined by the successor to [RFC 3023]. Technically,
there is no fragment identifier syntax for XML resources at the time
of this writing, though the [XPointer Framework] and [XPointer
element() Scheme] are explicitly supported by several XML
vocabularies. Example: Sample href Attribute Declarations

Following is a non-normative attribute-list declaration for href on an
element intended to be simple-type.

<!ATTLIST simplelink
  xlink:href      CDATA           #REQUIRED

5.4.1 XML Resource Identifiers

An [Definition: XML resource identifier is an XML string meant to be
used as an IRI reference or URI reference.] An XML resource identifier
may contain characters that, according to [RFC 3987] and [RFC 3986],
must be escaped before the string can be used to retrieve the
referenced resource. To convert an XML resource identifier to an IRI
reference, the following characters must be escaped:

    * the control characters #x0 to #x1F and #x7F
    * space #x20


      Authors are advised to avoid unescaped spaces, as XML Schema has
      identified them as an interoperability risk.

    * the delimiters "<" #x3C, ">" #x3E and """ #x22

    * the unwise characters "{" #x7B, "}" #x7D, "|" #x7C, "\" 
      #x5C, "^" #x5E and "`" #x60

These characters are escaped by applying steps 2.1 to 2.3 of Section
3.1 of [RFC 3987] to them.

If required, an IRI reference can be converted to a URI reference by
following the prescriptions of Section 3.1 of [RFC 3987]. This
conversion must be performed only when absolutely necessary and as
late as possible in a processing chain. In particular, neither the
process of converting a relative IRI to an absolute one nor the
process of passing a IRI reference to a process or software component
responsible for dereferencing it should trigger escaping.

                                        Be seeing you,

Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Tuesday, 24 January 2006 15:12:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:25 UTC