15.4 Purposes

     

The purpose of a related resource indicates what the resource will be used for. Purposes distinguish between resources with the same natures used for different things. For example, DocBook has multiple XSLT stylesheets for transforming DocBook documents into HTML, XHTML, chunked HTML, and XSL-FO. These are all related resources with the same nature but different purposes. Unlike natures, purposes are optional. You don't have to use them if you don't need to distinguish between resources with the same nature, but you can if you'd like.

Purpose names are URLs. These URLs are placed in xlink:arcrole attributes of a rddl:resource element. The RDDL specification defines 21 different well-known purpose URLs, mostly in the form http://www.rddl.org/purposes#purpose. In addition, you are welcome to define your own, but you should use the standard URLs for the standard purposes so that automated software can understand your documents and locate the necessary related resources. These are the well-known purposes:

Validation

http://www.rddl.org/purposes#validation

Schema-validation

http://www.rddl.org/purposes#schema-validation

DTD module

http://www.rddl.org/purposes#module

Schema module

http://www.rddl.org/purposes#schema-module

DTD notations module

http://www.rddl.org/purposes#notations

DTD entities module

http://www.rddl.org/purposes#entities

Software module

http://www.rddl.org/purposes#software-module

Software package

http://www.rddl.org/purposes#software-package

Software project

http://www.rddl.org/purposes#software-project

JAR

http://www.rddl.org/purposes#JAR

XSLT extension

http://www.rddl.org/purposes/software#xslt-extension

Reference

http://www.rddl.org/purposes#reference

Normative reference

http://www.rddl.org/purposes#normative-reference

Non-normative reference

http://www.rddl.org/purposes#non-normative-reference

Prior-version

http://www.rddl.org/purposes#prior-version

Definition

http://www.rddl.org/purposes#definition

Icon

http://www.rddl.org/purposes#icon

Alternate

http://www.rddl.org/purposes#alternate

Canonicalization

http://www.rddl.org/purposes#canonicalization

RDDL Directory

http://www.rddl.org/purposes#directory

RDDL Target

http://www.rddl.org/purposes#target


Furthermore, the purpose of an XSLT stylesheet is often the URI for the nature of the resource that is produced by the transformation. For instance, the purpose of a stylesheet that converted documents into strict XHTML would probably be http://www.w3.org/TR/xhtml1/DTD/xhtml1- strict .



XML in a Nutshell
XML in a Nutshell, Third Edition
ISBN: 0596007647
EAN: 2147483647
Year: 2003
Pages: 232

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net