jdk/test/javax/xml/crypto/dsig/data/xml-stylesheet
author xuelei
Thu, 18 Oct 2012 01:14:00 -0700
changeset 14194 971f46db533d
parent 2 90ce3da70b43
permissions -rw-r--r--
7068321: Support TLS Server Name Indication (SNI) Extension in JSSE Server Reviewed-by: mullan, weijun, wetmore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
<html>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
<head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
<title>Associating Style Sheets with XML documents</title>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC">
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
<style type="text/css">code { font-family: monospace }</style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
</head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
<body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
<div class="head">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
<a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" height="48" width="72"></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
<h1>Associating Style Sheets with XML documents<br>Version 1.0</h1>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
<h2>W3C Recommendation 29 June 1999</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
<dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
<dt>This version:</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
<dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
<a href="http://www.w3.org/1999/06/REC-xml-stylesheet-19990629">http://www.w3.org/1999/06/REC-xml-stylesheet-19990629</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
<dt>Latest version:</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
<dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
<a href="http://www.w3.org/TR/xml-stylesheet">http://www.w3.org/TR/xml-stylesheet</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
<dt>Previous version:</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
<dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
<a href="http://www.w3.org/TR/1999/xml-stylesheet-19990428">http://www.w3.org/TR/1999/xml-stylesheet-19990428</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
<dt>Editor:</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
<dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
James Clark
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
<a href="mailto:jjc@jclark.com">&lt;jjc@jclark.com&gt;</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
</dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
<p class="copyright">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
		Copyright</a> &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
		(<a href="http://www.lcs.mit.edu">MIT</a>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
		<a href="http://www.inria.fr/">INRIA</a>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
		<a href="http://www.keio.ac.jp/">Keio</a> ), All Rights Reserved. W3C
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
		<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal Disclaimer">liability,</a><a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C Trademarks">trademark</a>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
		<a href="http://www.w3.org/Consortium/Legal/copyright-documents.html">document use </a>and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
		<a href="http://www.w3.org/Consortium/Legal/copyright-software.html">software licensing </a>rules apply.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
	</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
<hr title="Separator for header">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
<h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
<a name="abstract">Abstract</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
<p>This document allows a style sheet to be associated with an XML
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
document by including one or more processing instructions with a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
target of <code>xml-stylesheet</code> in the document's prolog.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
<h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
<a name="status">Status of this document</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
<p>This document has been reviewed by W3C Members and other interested
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
parties and has been endorsed by the Director as a W3C <a href="http://www.w3.org/Consortium/Process/#RecsW3C">Recommendation</a>. It
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
is a stable document and may be used as reference material or cited as
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
a normative reference from other documents. W3C's role in making the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
Recommendation is to draw attention to the specification and to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
promote its widespread deployment. This enhances the functionality and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
interoperability of the Web.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
<p>The list of known errors in this specifications is available at
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
<a href="http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/errata">http://www.w3.org/TR/1999/xml-stylesheet-19990629/errata</a>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
<p>Comments on this specification may be sent to &lt;<a href="mailto:www-xml-stylesheet-comments@w3.org">www-xml-stylesheet-comments@w3.org</a>&gt;. The archive of public
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
comments is available at <a href="http://www.w3.org/Archives/Public/www-xml-stylesheet-comments">http://w3.org/Archives/Public/www-xml-stylesheet-comments</a>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
<p>A list of current W3C Recommendations and other technical documents
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
can be found at <a href="http://www.w3.org/TR">http://www.w3.org/TR</a>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
<p>The Working Group expects additional mechanisms for linking style
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
sheets to XML document to be defined in a future specification.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
<p>The use of XML processing instructions in this specification should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
not be taken as a precedent.  The W3C does not anticipate recommending
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
the use of processing instructions in any future specification.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
<a href="#rationale">Rationale</a> explains why they were used in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
this specification.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
<p>This document was produced as part of the <a href="http://www.w3.org/XML/Activity">W3C XML Activity</a>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
<h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
<a name="contents">Table of contents</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
</h2>1 <a href="#The xml-stylesheet processing instruction">The xml-stylesheet processing instruction</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
<h3>Appendices</h3>A <a href="#References">References</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
<br>B <a href="#rationale">Rationale</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
<hr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
<h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
<a name="The xml-stylesheet processing instruction"></a>1 The <code>xml-stylesheet</code> processing instruction</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
<p>Style Sheets can be associated with an XML<a href="#XML">[XML10]</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
document by using a processing instruction whose target is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
<code>xml-stylesheet</code>.  This processing instruction follows the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
behaviour of the HTML 4.0 <code>&lt;LINK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
REL="stylesheet"&gt;</code><a href="#HTML">[HTML40]</a>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
<p>The <code>xml-stylesheet</code> processing instruction is parsed in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
the same way as a start-tag, with the exception that entities other
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
than predefined entities must not be referenced.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
<p>The following grammar is given using the same notation as the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
grammar in the XML Recommendation<a href="#XML">[XML10]</a>.  Symbols in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
grammar that are not defined here are defined in the XML
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
Recommendation.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
<h5>xml-stylesheet processing instruction</h5>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
<table class="scrap">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
<tbody>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
<tr valign="baseline">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
<a name="NT-StyleSheetPI"></a>[1]&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
<td>StyleSheetPI</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
<td>'&lt;?xml-stylesheet' (<a href="http://www.w3.org/TR/REC-xml#NT-S">S</a> <a href="#NT-PseudoAtt">PseudoAtt</a>)* <a href="http://www.w3.org/TR/REC-xml#NT-S">S</a>? '?&gt;'</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
</tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
<tr valign="baseline">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
<a name="NT-PseudoAtt"></a>[2]&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
<td>PseudoAtt</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
<a href="http://www.w3.org/TR/REC-xml#NT-Name">Name</a> <a href="http://www.w3.org/TR/REC-xml#NT-S">S</a>? '=' <a href="http://www.w3.org/TR/REC-xml#NT-S">S</a>? <a href="#NT-PseudoAttValue">PseudoAttValue</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
</tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
<tr valign="baseline">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
<a name="NT-PseudoAttValue"></a>[3]&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
<td>PseudoAttValue</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
<td>('"' ([^"&lt;&amp;] | <a href="http://www.w3.org/TR/REC-xml#NT-CharRef">CharRef</a> | <a href="#NT-PredefEntityRef">PredefEntityRef</a>)* '"'</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
</tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
<tr valign="baseline">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
<td>| "'" ([^'&lt;&amp;] | <a href="http://www.w3.org/TR/REC-xml#NT-CharRef">CharRef</a> | <a href="#NT-PredefEntityRef">PredefEntityRef</a>)* "'")</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
</tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
<tr valign="baseline">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
<td>- (<a href="http://www.w3.org/TR/REC-xml#NT-Char">Char</a>* '?&gt;' <a href="http://www.w3.org/TR/REC-xml#NT-Char">Char</a>*)</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
</tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
<tr valign="baseline">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
<a name="NT-PredefEntityRef"></a>[4]&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
<td>PredefEntityRef</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
<td>'&amp;amp;' | '&amp;lt;' | '&amp;gt;' | '&amp;quot;' | '&amp;apos;'</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
<td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
</tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
</tbody>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
</table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
<p>In <a href="#NT-PseudoAttValue">PseudoAttValue</a>, a <a href="http://www.w3.org/TR/REC-xml#NT-CharRef">CharRef</a> or a <a href="#NT-PredefEntityRef">PredefEntityRef</a> is interpreted in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
same manner as in a normal XML attribute value.  The actual value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
the pseudo-attribute is the value after each reference is replaced by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
the character it references.  This replacement is not performed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
automatically by an XML processor.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
<p>The <code>xml-stylesheet</code> processing instruction is allowed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
only in the prolog of an XML document. The syntax of XML constrains
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
where processing instructions are allowed in the prolog; the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
<code>xml-stylesheet</code> processing instruction is allowed anywhere
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
in the prolog that meets these constraints.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
<blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
<b>NOTE: </b>If the <code>xml-stylesheet</code> processing instruction
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
occurs in the external DTD subset or in a parameter entity, it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
possible that it may not be processed by a non-validating XML
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
processor (see <a href="#XML">[XML10]</a>).</blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
<p>The following pseudo attributes are defined</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
<pre>href CDATA #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
type CDATA #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
title CDATA #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
media CDATA #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
charset CDATA #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
alternate (yes|no) "no"</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
<p>The semantics of the pseudo-attributes are exactly as with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
<code>&lt;LINK REL="stylesheet"&gt;</code> in HTML 4.0, with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
exception of the <code>alternate</code> pseudo-attribute.  If
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
<code>alternate="yes"</code> is specified, then the processing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
instruction has the semantics of <code>&lt;LINK REL="alternate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
stylesheet"&gt;</code> instead of <code>&lt;LINK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
REL="stylesheet"&gt;</code>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
<blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
<b>NOTE: </b>Since the value of the <code>href</code> attribute is a URI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
reference, it may be a relative URI and it may contain a fragment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
identifier. In particular the URI reference may contain only a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
fragment identifier.  Such a URI reference is a reference to a part of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
the document containing the <code>xml-stylesheet</code> processing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
instruction (see <a href="#RFC2396">[RFC2396]</a>). The consequence is that the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
<code>xml-stylesheet</code> processing instruction allows style sheets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
to be embedded in the same document as the <code>xml-stylesheet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
processing instruction.</blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
<p>In some cases, style sheets may be linked with an XML document by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
means external to the document. For example, earlier versions of HTTP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
<a href="#RFC2068">[RFC2068]</a> (section 19.6.2.4) allowed style sheets to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
associated with XML documents by means of the <code>Link</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
header.  Any links to style sheets that are specified externally to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
document are considered to occur before the links specified by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
<code>xml-stylesheet</code> processing instructions.  This is the same
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
as in HTML 4.0 (see <a href="http://www.w3.org/TR/REC-html40/present/styles.html#h-14.6">section
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
14.6</a>).</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
<p>Here are some examples from HTML 4.0 with the corresponding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
processing instruction:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
<pre>&lt;LINK href="mystyle.css" rel="style sheet" type="text/css"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
&lt;?xml-stylesheet href="mystyle.css" type="text/css"?&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
&lt;LINK href="mystyle.css" title="Compact" rel="stylesheet"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
type="text/css"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
&lt;?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
&lt;LINK href="mystyle.css" title="Medium" rel="alternate stylesheet"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
type="text/css"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
&lt;?xml-stylesheet alternate="yes" href="mystyle.css" title="Medium"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
type="text/css"?&gt;</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
<p>Multiple <code>xml-stylesheet</code> processing instructions are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
also allowed with exactly the same semantics as with <code>LINK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
REL="stylesheet"</code>. For example,</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
<pre>&lt;LINK rel="alternate stylesheet" title="compact" href="small-base.css"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
type="text/css"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
&lt;LINK rel="alternate stylesheet" title="compact" href="small-extras.css"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
type="text/css"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
&lt;LINK rel="alternate stylesheet" title="big print" href="bigprint.css"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
type="text/css"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
&lt;LINK rel="stylesheet" href="common.css" type="text/css"&gt;</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
<p>would be equivalent to:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
<pre>&lt;?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
type="text/css"?&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
&lt;?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
type="text/css"?&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
&lt;?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
type="text/css"?&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
&lt;?xml-stylesheet href="common.css" type="text/css"?&gt;</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
<hr title="Separator from footer">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
<h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
<a name="References"></a>A References</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
<dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
<dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
<a name="HTML">HTML40</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
<dd>World Wide Web
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
Consortium. <i>HTML 4.0 Specification.</i> W3C Recommendation. See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
<a href="http://www.w3.org/TR/REC-html40">http://www.w3.org/TR/REC-html40</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
<dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
<a name="RFC2068">RFC2068</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
<dd>R. Fielding, J. Gettys, J. Mogul,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
H. Frystyk Nielsen, and T. Berners-Lee.  <i>Hypertext Transfer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
Protocol -- HTTP/1.1.</i>. IETF RFC 2068. See <a href="http://www.ietf.org/rfc/rfc2068.txt">http://www.ietf.org/rfc/rfc2068.txt</a>.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
<dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
<a name="RFC2396">RFC2396</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
<dd>T. Berners-Lee, R. Fielding, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
L. Masinter.  <i>Uniform Resource Identifiers (URI): Generic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
Syntax</i>. IETF RFC 2396. See <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a>.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
<dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
<a name="XML">XML10</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
</dt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
<dd>World Wide Web Consortium. <i>Extensible
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
Markup Language (XML) 1.0.</i> W3C Recommendation. See <a href="http://www.w3.org/TR/1998/REC-xml-19980210">http://www.w3.org/TR/1998/REC-xml-19980210</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
</dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
<h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
<a name="rationale"></a>B Rationale</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
<p>There was an urgent requirement for a specification for style sheet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
linking that could be completed in time for the next release from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
major browser vendors.  Only by choosing a simple mechanism closely
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
based on a proven existing mechanism could the specification be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
completed in time to meet this requirement.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
<p>Use of a processing instruction avoids polluting the main document
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
structure with application specific processing information.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
<p>The mechanism chosen for this version of the specification is not a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
constraint on the additional mechanisms planned for future versions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
There is no expectation that these will use processing instructions;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
indeed they may not include the linking information in the source
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
document.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
</body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
</html>