NOTE-CDR-20100819
48.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Compound Document by Reference Framework 1.0</title><style type="text/css">
code { font-family: monospace; }
.scrap td { background-color: #d5dee3;}
table.scrap {margin-bottom: 1em }
div.constraint,
div.issue,
div.note,
div.notice { margin-left: 2em; }
ol.enumar { list-style-type: decimal; }
ol.enumla { list-style-type: lower-alpha; }
ol.enumlr { list-style-type: lower-roman; }
ol.enumua { list-style-type: upper-alpha; }
ol.enumur { list-style-type: upper-roman; }
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
margin: 4px}
.discontinued {
background: #ff4500;
color: white;
padding: 0.5em;
}
.discontinued a {
color: yellow;
}
</style><link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE" /><link rel="alternate stylesheet" type="text/css" href="assertions.css" title="List of assertions" /></head><body><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72" /></a></p>
<h1><a name="title" id="title"></a>Compound Document by Reference Framework 1.0</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Working Group Note 19 August 2010</h2><dl><dt>This version:</dt><dd>
<a href="http://www.w3.org/TR/2010/NOTE-CDR-20100819">http://www.w3.org/TR/2010/NOTE-CDR-20100819</a>
</dd><dt>Latest version:</dt><dd>
<a href="http://www.w3.org/TR/CDR/">http://www.w3.org/TR/CDR/</a>
</dd><dt>Previous version:</dt><dd>
<a href="http://www.w3.org/TR/2007/CR-CDR-20070718">http://www.w3.org/TR/2007/CR-CDR-20070718</a>
</dd><dt>Editors:</dt><dd>Timur Mehrvarz, Vodafone Group Services Limited</dd><dd>Lasse Pajunen, Nokia</dd><dd>Julien Quint, DAISY Consortium</dd><dd>Daniel Appelquist, Vodafone Group Services Limited</dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2007 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr /><div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2><p>
This document specifies the <em>Compound Document by Reference Framework 1.0</em>.
</p><p>
When combining separate markup languages, specific problems have to
be resolved that are not addressed by their individual language
specifications, such as the propagation of events across namespaces,
the combination of rendering or the user interaction model.
</p><p>
<em>Compound Document</em> is the W3C term for a document that combines
multiple formats.
</p></div>
<div>
<h2><a name="status" id="status"></a>Status of this Document</h2>
<p class="discontinued">This document has been <strong>discontinued</strong> as part of the closure of the <a href="http://www.w3.org/2004/CDF/">Compound Document Formats Working Group</a>.</p>
</div>
<div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2><p class="toc">1 <a href="#cd-framework">Introduction to Compound Documents</a><br />
1.1 <a href="#scope">Scope</a><br />
1.2 <a href="#related-documents">Related Documents</a><br />
1.3 <a href="#cd-reference-vs-inclusion">Reference and Inclusion</a><br />
1.4 <a href="#referencing-child-objects">Referencing Child Objects</a><br />
1.5 <a href="#identification">Identification and Versioning</a><br />
2 <a href="#cdr-framework">Compound Document by Reference (CDR)</a><br />
2.1 <a href="#dom">Document Object Model</a><br />
2.2 <a href="#events">Events</a><br />
2.3 <a href="#extss">External Style Sheets</a><br />
</p>
<h3><a name="appendices" id="appendices"></a>Appendices</h3><p class="toc">A <a href="#definitions">Definitions</a><br />
B <a href="#conformance">Conformance</a><br />
C <a href="#references">References</a><br />
C.1 <a href="#refsNormative">Normative</a><br />
C.2 <a href="#refsInformative">Informative</a><br />
D <a href="#acknowledgements">Acknowledgements</a> (Non-Normative)<br />
E <a href="#changes-log">Changes Log</a> (Non-Normative)<br />
</p></div><hr /><div class="body"><div class="div1">
<h2><a name="cd-framework" id="cd-framework"></a>1 Introduction to Compound Documents</h2><div class="div2">
<h3><a name="scope" id="scope"></a>1.1 Scope</h3><p>(This section is informative)</p><p>
Combining content delivery formats can often be desirable in order to
provide a seamless experience for the user.
</p><p>
For example, XHTML-formatted content can be augmented by SVG objects,
to create a more dynamic, interactive and self adjusting presentation.
A set of standard rules is required in order to provide this
capability across a range of user agents and devices.
</p><p>
These are examples of possible Compound Document profiles:
</p><ul><li><p>XHTML + SVG + MathML</p></li><li><p>XHTML + SMIL</p></li><li><p>XHTML + XForms</p></li><li><p>XHTML + VoiceML</p></li></ul><p>
This document defines a generic <em>Compound Document by Reference Framework</em> (CDRF)
that defines a language-independent processing model for combining arbitrary
document formats.
</p><p>
NOTE: The Compound Document Framework is language-independent.
While it is clearly meant to serve as the basis for integrating
W3C's family of XML formats within its Interaction Domain (e.g.,
CSS, MathML, SMIL, SVG, VoiceXML, XForms, XHTML, XSL) with each
other, it can also be used to integrate non-W3C formats with W3C
formats or integrate non-W3C formats with other non-W3C formats.
</p></div><div class="div2">
<h3><a name="related-documents" id="related-documents"></a>1.2 Related Documents</h3><p>(This section is informative)</p><dl><dt class="label">WICD Core</dt><dd><p>
<em>WICD Core</em> <a href="#WICD">[WICDCORE]</a>
is the foundation of rich multimedia content and
describes rules for combining Hypertext Markup Language (XHTML) and
scalable child objects, such as Scalable Vector Graphics (SVG)
in a non device specific manner. WICD stands for <em>Web Integrated
Compound Document</em>.
</p><p>
<em>WICD Core</em> builds upon <em>CDRF</em>.
</p></dd></dl></div><div class="div2">
<h3><a name="cd-reference-vs-inclusion" id="cd-reference-vs-inclusion"></a>1.3 Reference and Inclusion</h3><p>(This section is informative)</p><p>
A namespace uniquely identifies a set of names so that there is no
ambiguity when objects having different origins but the same names
are mixed together. An XML namespace is a collection of element
type and attribute names. These element types and attribute names
are uniquely identified by the name of the unique XML namespace of
which they are a part. In an XML document, any element type or
attribute name can thus have a two-part name consisting of the
namespace name and the element or attribute name.
</p><p>
A Compound Document by inclusion combines XML markup from several
namespaces into a single physical document. A number of standards
exist, and continue to be developed, that are descriptions of XML
markup within a single namespace. XHTML, XForms, VoiceXML, and
MathML are some of the prominent examples of such standards, each
having its own namespace. Each of these specifications focuses on
one aspect of rich-content development. For example, XForms
focuses on data collection and submission, VoiceXML on speech, and
MathML on the display of mathematical notations.
</p><p>
To authors of content, each of these many standards is useful and
important. However, it is the combination of elements of any number
of these standards that lends true flexibility and power to rich
document creation. A document may exist to be displayed within a
web browser, to display an input form, with a scalable graphic and
a bit of mathematical notation, all on the same page. XHTML, XForms,
SVG, and MathML, respectively, serve these needs, and could therefore
be combined into a single multi-namespace document.
</p><p>
Consider this simple example, a Compound Document combining XHTML and
MathML. The namespace declarations are marked by an appended comment
to match the numbered namespaces listed below in the XML source in
Example 1.
</p><ol class="enumar"><li><p>
XHTML Namespace declaration. The namespace for XHTML 1.0 is
declared. Each XHTML element in the example below is qualified with
the xhtml: namespace prefix.</p></li><li><p>
MathML Namespace declaration. The namespace for MathML 2.0 is
declared. Each MathML element in the example below is qualified with
the mathml: prefix.</p></li></ol><p>A Compound Document example:</p><div class="exampleInner"><pre><?xml version="1.0" encoding="iso-8859-1"?>
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"> <!-- 1 -->
<xhtml:body>
<xhtml:h1>A Compound Document</xhtml:h1>
<xhtml:p>A simple formula using MathML in XHTML.</xhtml:p>
<mathml:math xmlns:mathml="http://www.w3.org/1998/Math/MathML"> <!-- 2 -->
<mathml:mrow>
<mathml:msqrt>
<mathml:mn>49</mathml:mn>
</mathml:msqrt>
<mathml:mo>=</mathml:mo>
<mathml:mn>7</mathml:mn>
</mathml:mrow>
</mathml:math>
</xhtml:body>
</xhtml:html>
</pre></div><p>
Example 1: A Simple Compound Document
</p><img src="cd-mmp-cd1.png" alt="A Compound Document" /><p>
Figure 1 (above): Rendered Simple Compound Document - This is a rendered version
of the simple Compound Document in Example 1 which combines XHTML and
MathML for rich content.
</p><p>
Compound Documents may be composed of a single document that contains
multiple namespaces, as seen in Example 1. This is a Compound Document
“by Inclusion” (CDI). However, a Compound Document may also be composed
over several documents in which one document of a particular namespace
references another separate document of a different namespace.
</p><p>
For example, a root or top-most document might contain XHTML content for
defining and formatting a page. This parent XHTML document can reference
another document, of another namespace, through the use of the XHTML
<object> tag. This can be repeated for as many documents as necessary.
The root document plus this collection of separate, referenced documents
is considered a Compound Document “by Reference” (CDR). See Figure 2 for
a simple CDR document in which an XHTML root document contains a reference
to a separate SVG child document having markup for three colored circles.
</p><img src="cd-circles.png" alt="An XHTML document referencing an SVG document with 3 overlapping colored circles" /><p>
Figure 2 (above): Compound Document by Reference - A simple Compound Document by
reference where a XHTML document references a separate SVG document.
Below you see the two markup fragments.
</p><p>
XHTML:
</p><div class="exampleInner"><pre><?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>circles</title>
</head>
<body>
<object height="350" width="600" type="image/svg+xml" data="circles.svg"/>
</body>
</html>
</pre></div><p>
SVG:
</p><div class="exampleInner"><pre><?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" baseProfile="tiny" version="1.2">
<g fill-opacity="0.7" stroke="black" stroke-width="0.2cm">
<circle fill="red" cx="6cm" cy="2cm" transform="translate(0,50)" r="100"/>
<circle fill="blue" cx="6cm" cy="2cm" transform="translate(70,150)" r="100"/>
<circle fill="green" cx="6cm" cy="2cm" transform="translate(-70,150)" r="100"/>
</g>
</svg>
</pre></div><p>
And of course, a Compound Document may be a hybrid of both compound
document by inclusion and Compound Document by reference.
</p></div><div class="div2">
<h3><a name="referencing-child-objects" id="referencing-child-objects"></a>1.4 Referencing Child Objects</h3><p>(This section is informative)</p><p>
Each hosting language has its own methods for referencing child objects.
These provide different functionality, but the following section
describes (some of) the common functionality.
</p><div class="div3">
<h4><a name="xhtml-object-element" id="xhtml-object-element"></a>1.4.1 Referencing Elements</h4><p>
In Compound Document by Reference Framework 1.0, embedding media and other objects is done by using the
existing elements in the host languages rather than by extending them
with new markup. For example, in XHTML documents, the <object> element will be used
to reference XML document types. Similarly, in SVG documents, the <foreignObject>
element is used, and in SMIL, the <ref> element should be used.
</p></div><div class="div3">
<h4><a name="xhtml-child-object-parameters" id="xhtml-child-object-parameters"></a>1.4.2 Declarative Child Object Parameters</h4><p>
It may be necessary to transfer parameters declaratively to a
referenced child object. Compound Document profiles may define
specific parameters/values for this purpose. Three examples:
</p><div class="exampleInner"><pre><object type="..." data="...">
<param name="param1" value="true" />
<param name="param2" value="123" />
</object>
</pre></div><p>This SVG example uses the <foreignObject> element:</p><div class="exampleInner"><pre><svg xmlns="http://www.w3.org/2000/svg">
<foreignObject>
<metadata>
param=value;
param=value
</metadata>
</foreignObject>
</svg>
</pre></div><p>This SMIL example uses the <ref> element:</p><div class="exampleInner"><pre><ref src="http://www.example.com/herbert.face">
<param name="mood" value="surly" valuetype="data"/>
<param name="accessories" value="baseball-cap,nose-ring" valuetype="data"/>
</ref></pre></div></div></div><div class="div2">
<h3><a name="identification" id="identification"></a>1.5 Identification and Versioning</h3><p><em>(This section is informative)</em></p><p>
A distinct identification of the supported Compound Document
capabilities
is often not possible by advertising a list of supported
content types.
Such a list is not sufficient to describe the supported
capabilities between compound languages.
A unique profile identifier is
often better suited to describe such characteristics.
CDRF profiles may define their identification and versioning criteria,
which should utilize the mechanisms readily available from the root
language. For example, if the root language is XHTML, then the content
type of "application/xhtml+xml" can be used. It can then be used with
the optional parameter of "profile", with a value of a URI that both
identifies the profile and its version.
</p></div></div><div class="div1">
<h2><a name="cdr-framework" id="cdr-framework"></a>2 Compound Document by Reference (CDR)</h2><div class="div2">
<h3><a name="dom" id="dom"></a>2.1 Document Object Model</h3><div class="cdf-assert">
<p>Compound document profiles which leverage the Compound Document
Framework and which support scripting must have scripting interfaces
that are compatible with the uDOM, or implement a superset such as the
DOM Level 3 Core Specification <a href="#DOM-Level-3-Core">[DOM3CORE]</a>.</p>
</div><p>
Compound Document profiles may subset DOM Level 3 Core <a href="#DOM-Level-3-Core">[DOM3CORE]</a>, but any
DOM Core subsetting should be coordinated with other related DOM
subsetting standards efforts. For example, mobile subset efforts
for W3C languages such as XHTML, SVG, SMIL and XForms should be
coordinated with each other because of the high probability that
Compound Document profiles will be defined that combine these
languages.
</p><p>
A Compound Document using references consists of a root
document which may have one or more child documents, which may in turn
have its own child documents. Each child document contains elements
and attributes from one or more namespaces. The consequence of this is that each
child document generates its own DOM. The interaction points
between parent and child documents of a Compound Document
are at referencing DOM nodes in a parent document. The Compound Document
framework provides a means of accessing the DOMs of the child and parent documents.
</p><p>
Each child document DOM generates its own scripting execution context.
Each child DOM scripting execution context provides access to its
corresponding global object.
The CSS <a href="#CSS21">[CSS21]</a> style-sheet cascade is applied to each DOM in isolation. CSS
property inheritance is inhibited at document boundaries.
It is possible for a content author to use child-to-parent (see <a href="#child-to-parent-dom-access"><b>2.1.2 Child to Parent DOM Access</b></a>) or parent-to-child (see <a href="#parent-to-child-dom-access"><b>2.1.3 Parent to Child DOM Access</b></a>) to propagate specific styling properties.
</p><div class="div3">
<h4><a name="specialized-dom-access" id="specialized-dom-access"></a>2.1.1 Specialized DOM access</h4><p>
Many languages define specialized DOM APIs. The W3C has defined
an HTML DOM which extends the Core DOM and provides various
convenience APIs for interacting with HTML documents. Similarly,
the SVG language defines an SVG DOM which extends Core DOM.
</p><p>
Compound Document profiles must specify whether the specialized
DOM APIs that are defined within the component languages are
supported.
</p><p>
Note: Although not required for compliance with the Compound
Document Framework, it is strongly recommended that compound
document profiles support all specialized DOM APIs that are
supported in the component languages.
</p></div><div class="div3">
<h4><a name="child-to-parent-dom-access" id="child-to-parent-dom-access"></a>2.1.2 Child to Parent DOM Access</h4><div class="cdf-assert"><p>User agents must allow
the child DOM to access the parent DOM.</p>
</div><p>
For a child document to access the parent document, this
specification relies on the Window Object's <code>frameElement</code>
attribute <a href="#WINDOW">[WINDOW]</a>.
The <code>frameElement</code> attribute can be accessed from the <code>document</code> attribute
<a href="#DOM-Level-2-Views">[DOM2VIEWS]</a> using the <code>defaultView</code> attribute
<a href="#DOM-Level-2-Views">[DOM2VIEWS]</a>. Profiles built upon
this specification must specify on which exact document objects
these interfaces must be implemented.
</p><p>
Example usage of <code>defaultView.frameElement</code> in <code>child.svg</code>
</p><div class="exampleInner"><pre><?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
height="20" version="1.1" width="20">
<title>child-svg</title>
<rect fill="blue" height="20"
onload="alert('Child has seen: ' +
document.defaultView.frameElement.ownerDocument.title)"
width="20" x="10" y="10" />
</svg>
</pre></div></div><div class="div3">
<h4><a name="parent-to-child-dom-access" id="parent-to-child-dom-access"></a>2.1.3 Parent to Child DOM Access</h4><div class="cdf-assert"><p>User agents must allow
the parent DOM to access any child DOM. The <code>contentDocument</code>
attribute must represent the child document. </p>
</div><p>
DOM Level 2 HTML defines a way for several elements to access the
child document using the <code>contentDocument</code> attribute
<a href="#DOM-Level-2-HTML">[DOM2HTML]</a>.
The <code>contentDocument</code> only applies to objects implementing
the <code>Element</code> interface defined in DOM Level 3 Core.
<a href="#DOM-Level-3-Core">[DOM3CORE]</a>. Profiles built upon
this specification must specify on which
exact element objects the interface must be implemented.
</p><p>
Example usage of <code>contentDocument</code> in <code>parent.xhtml</code>:
</p><div class="exampleInner"><pre><?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>parent-xhtml</title>
</head>
<body>
<object data="child.svg"
onload="alert('Parent has seen: ' +
this.contentDocument.getElementsByTagNameNS(
'http://www.w3.org/2000/svg',
'title') [0].textContent)" />
</body>
</html>
</pre></div></div></div><div class="div2">
<h3><a name="events" id="events"></a>2.2 Events</h3><div class="cdf-assert"><p>
Compound Document profiles which leverage the Compound Document
Framework and which support events and interactivity must have
event interfaces and an event processing model that are compatible
with the DOM Level 3 Events Specification <a href="#DOM-Level-3-Events">[DOM3EVENTS]</a>.
</p></div><p>
Compound Document profiles may subset DOM Level 3 Events <a href="#DOM-Level-3-Events">[DOM3EVENTS]</a>, but any
DOM Events subsetting should be coordinated with other related DOM
subsetting standards efforts. For example, mobile subset efforts
for W3C languages such as XHTML, SVG, SMIL and XForms should be
coordinated with each other because of the high probability that
Compound Document profiles will be defined that combine these
languages.
</p><div class="div3">
<h4><a name="event-propagation" id="event-propagation"></a>2.2.1 Event Propagation</h4><p>
Using the various methods and attributes described in the Window API
<a href="#WINDOW">[WINDOW]</a>,
in DOM Level 3 Events <a href="#DOM-Level-3-Events">[DOM3EVENTS]</a>
and DOM Level 3 Core <a href="#DOM-Level-3-Core">[DOM3CORE]</a>
it is possible for web authors to attach an
event listener to a child document; and then upon catching it,
dispatch it to the parent document on the referencing element. The
following piece of script would create an event and dispatch it upon
the referencing element:
</p><div class="exampleInner"><pre>var x = document.createEvent("CustomEvent");
x.initCustomEventNS("http://example.org/test", "test", true, false, null);
window.frameElement.dispatchEvent(x);
</pre></div></div><div class="div3">
<h4><a name="event-related-markup" id="event-related-markup"></a>2.2.2 Event-Related Markup</h4><p>
In order to claim conformance to this Compound Documents
Framework, a Compound Document profile must define how all
of its event-related language constructs and scripting
constructs map to corresponding DOM Level 3 Event facilities <a href="#DOM-Level-3-Events">[DOM3EVENTS]</a>,
unless DOM Level 3 Events has already defined the mapping.
In particular:
</p><div class="cdf-assert">
<p>For each event construct within supported languages,
the profile must define the event's namespace and local name,
whether it supports the bubble phase,
and whether it is cancellable,
as well as the name of the DOM interface for its event structure
(e.g., events.dom.w3c.org::UIEvent).</p>
</div><div class="cdf-assert">
<p>Any events that are defined to be equivalent to a
corresponding event from DOM Level 3 Events <a href="#DOM-Level-3-Events">[DOM3EVENTS]</a> must have compatible
behavior, such as the phases supported, cancellability
and propagation across parent/child Compound Document
boundaries. For example, for a "click" event from
language A to be equivalent to the DOM3 "click" event,
it also must be cancellable since DOM3 "click" is cancellable.</p>
</div><div class="cdf-assert">
<p>The profile must define how to map language features for
event listeners, event handlers, and event targets into
corresponding DOM Level 3 Events facilities <a href="#DOM-Level-3-Events">[DOM3EVENTS]</a>.
</p></div></div></div><div class="div2">
<h3><a name="extss" id="extss"></a>2.3 External Style Sheets</h3><div class="cdf-assert">
<p>For formats which use xml, the processing instruction
'Associating Style Sheets with XML documents'
<a href="#Associating-Stylesheets">[XMLSS]</a> must be supported,
for all supported style sheet languages.</p>
</div></div></div></div><div class="back"><div class="div1">
<h2><a name="definitions" id="definitions"></a>A Definitions</h2><p>The following terms and definitions are used within this document.</p><dl><dt class="label">Child Document</dt><dd><p>In the case of combining by reference, one compound
document may be a collection of several separate
documents.</p><p>The document that is referenced is called a child document.
If a child document itself references other documents, then it
is also a parent document.</p></dd><dt class="label">Compound Document</dt><dd><p>
A Compound Document is a
document that combines mutliple document formats either
by reference, by inclusion or both.</p></dd><dt class="label">Compound Document by Inclusion (CDI)</dt><dd><p>
A document which directly includes other documents and or namespace markup within the same physical document.
</p><p>
For example: A single XML document making use of XML grammars defined
independently, normally making use of multiple namespaces.
</p></dd><dt class="label">Compound Document by Reference (CDR)</dt><dd><p>
A document which logically includes other documents via a hypertext
reference.
</p></dd><dt class="label">Focus traversal</dt><dd><p>
Focus traversal defines the elements that get focus and the order, in which they are traversed.
</p></dd><dt class="label">Parent Document</dt><dd><p>In the case of combining by reference, one compound
document may be a collection of several separate
documents.</p><p>A <em>parent document</em> represents a document that
has a DOM as defined by DOM Level 3 Core
and references another document.
The DOM that is formed must be tree-based.</p></dd><dt class="label">Root Document</dt><dd><p>In the case of combining by reference, one compound
document may be a collection of several separate
documents.</p><p>The outermost parent document is called the <em>root document</em>.
</p></dd><dt class="label">Scalable Child Document</dt><dd><p>
A Scalable Child Document is a Child Document for which rendering is possible at a range of output sizes.
Scalable means not being limited to a single, fixed, pixel size.
</p></dd><dt class="label">Subset profile</dt><dd><p>
A reduced set of capabilities from the original specification. Meaning,
that the subset doesn't add any new features, but only removes them. Content
that conforms to the profiled subset must be rendered successfully
by a compliant user agent of the full/superset specification. In other words, the full
user agent doesn't need to know it is content from a subset profile.</p></dd><dt class="label">User Agent</dt><dd><p>
See <a href="http://www.w3.org/TR/di-gloss/#def-user-agent">definition</a> in Device Independence Glossary document.</p></dd></dl></div><div class="div1">
<h2><a name="conformance" id="conformance"></a>B Conformance</h2><p>
This specification defines conformance for several classes of products:
</p><ul><li><p>User agents</p></li><li><p>Profiles</p></li></ul><p>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" in this document are to be interpreted as
described in RFC 2119 (see ). However, for readability,
these words do not appear in all uppercase letters in this
specification.
</p><p>
At times, this specification recommends good practice for
authors and user agents. These recommendations are not
normative and conformance with this specification does
not depend on their realization. These recommendations
contain the expression "We recommend ...", "This
specification recommends ...", or some similar wording.
</p><p>
User Agent Conformance
</p><ol class="enumar"><li><p>User agents must allow the child DOM to access the parent DOM.</p></li><li><p>User agents must allow
the parent DOM to access any child DOM. The contentDocument
attribute must represent the child document.</p></li><li><p>A conformant user agent of a superset profile specification must
process subset profile content as if it were the superset profile content.</p></li></ol><p>
Profile Conformance
</p><ol class="enumar"><li><p>
Compound Document profiles which support scripting must have scripting
interfaces that are compatible with the DOM Level 3 Core
Specification.
</p></li><li><p>
Compound Document profiles which support events and interactivity must have
event interfaces and an event processing model that are compatible
with the DOM Level 3 Events Specification.
</p></li><li><p>
For each event construct within supported languages,
the profile must define the event's namespace and local name,
whether it supports the bubble phase,
and whether it is cancellable,
as well as the name of the DOM interface for its event structure
(e.g., events.dom.w3c.org::UIEvent).
</p></li><li><p>
Any events that are defined to be equivalent to a
corresponding event from DOM3 Events must have compatible
behavior, such as the phases supported, cancellability
and propagation across parent/child Compound Document
boundaries. For example, for a "click" event from
language A to be equivalent to the DOM3 "click" event,
it also must be cancellable since DOM3 "click" is cancellable.
</p></li><li><p>
The profile must define how to map language features for
event listeners, event handlers, and event targets into
corresponding DOM3 Events facilities.
</p></li><li><p>A conformant subset profile must not add new features from their
corresponding superset specification.</p></li><li><p>A conformant profile must define any dependent subset profiles.</p></li></ol></div><div class="div1">
<h2><a name="references" id="references"></a>C References</h2><div class="div2">
<h3><a name="refsNormative" id="refsNormative"></a>C.1 Normative</h3><dl><dt class="label"><a name="CSS21" id="CSS21"></a>[CSS21]</dt><dd>
<a href="http://www.w3.org/TR/CSS21"><cite>
Cascading Style Sheets, level 2 revision 1 CSS 2.1
Specification
</cite></a>
, Håkon Wium Lie, Tantek Çelik, Bert Bos, and Ian Hickson,
Editors. World Wide Web Consortium, 06 Nov 2006. This version is
http://www.w3.org/TR/2006/WD-CSS21-20061106. The
<a href="http://www.w3.org/TR/CSS21">latest version</a>
is available at http://www.w3.org/TR/CSS21.
</dd><dt class="label"><a name="DOM-Level-2-HTML" id="DOM-Level-2-HTML"></a>[DOM2HTML]</dt><dd>
<a href="http://www.w3.org/TR/DOM-Level-2-HTML/"><cite>
Document Object Model (DOM) Level 2 HTML Specification
</cite></a>
, Johnny Stenback, Philippe Le Hégaret, and Arnaud Le Hors,
Editors. World Wide Web Consortium, 09 Jan 2003. This version is
http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030107. The
<a href="http://www.w3.org/TR/DOM-Level-2-HTML/">
latest version
</a>
is available at http://www.w3.org/TR/DOM-Level-2-HTML/.
</dd><dt class="label"><a name="DOM-Level-2-Views" id="DOM-Level-2-Views"></a>[DOM2VIEWS]</dt><dd>
<a href="http://www.w3.org/TR/DOM-Level-2-Views"><cite>
Document Object Model (DOM) Level 2 Views Specification
</cite></a>
, Laurence Cable and Arnaud Le Hors, Editors. World Wide Web
Consortium, 13 Nov 2000. This version is
http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113. The
<a href="http://www.w3.org/TR/DOM-Level-2-Views">
latest version
</a>
is available at http://www.w3.org/TR/DOM-Level-2-Views.
</dd><dt class="label"><a name="DOM-Level-3-Core" id="DOM-Level-3-Core"></a>[DOM3CORE]</dt><dd>
<a href="http://www.w3.org/TR/DOM-Level-3-Core/"><cite>
Document Object Model (DOM) Level 3 Core Specification
</cite></a>
, Jonathan Robie, Steve Byrne, Philippe Le Hégaret,
<em>et al.</em>
, Editors. World Wide Web Consortium, 07 Apr 2004. This version
is http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407. The
<a href="http://www.w3.org/TR/DOM-Level-3-Core/">
latest version
</a>
is available at http://www.w3.org/TR/DOM-Level-3-Core/.
</dd><dt class="label"><a name="DOM-Level-3-Events" id="DOM-Level-3-Events"></a>[DOM3EVENTS]</dt><dd>
<a href="http://www.w3.org/TR/DOM-Level-3-Events/"><cite>
Document Object Model (DOM) Level 3 Events Specification
</cite></a>
, Tom Pixley and Philippe Le Hégaret, Editors. World Wide Web
Consortium, 13 Apr 2006. This version is
http://www.w3.org/TR/2006/WD-DOM-Level-3-Events-20060413. The
<a href="http://www.w3.org/TR/DOM-Level-3-Events/">
latest version
</a>
is available at http://www.w3.org/TR/DOM-Level-3-Events/.
</dd><dt class="label"><a name="WINDOW" id="WINDOW"></a>[WINDOW]</dt><dd>
<a href="http://www.w3.org/TR/2006/WD-Window-20060407/"><cite>
Window Object 1.0
</cite></a>, Ian Davis and Maciej Stachowiak, Editors.
World Wide Web Consortium, 07 April 2006. This version is
http://www.w3.org/TR/2006/WD-Window-20060407/. The
<a href="http://www.w3.org/TR/Window">latest version</a>
is available at http://www.w3.org/TR/Window.
</dd><dt class="label"><a name="Associating-Stylesheets" id="Associating-Stylesheets"></a>[XMLSS]</dt><dd>
<a href="http://www.w3.org/TR/xml-stylesheet/"><cite>Associating Style Sheets with XML documents
</cite></a>
, James Clark,
Editor. World Wide Web Consortium, 29 June 1999. This version is
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629 . The
<a href="http://www.w3.org/TR/xml-stylesheet">latest version</a>
is available at http://www.w3.org/TR/xml-stylesheet .
</dd></dl></div><div class="div2">
<h3><a name="refsInformative" id="refsInformative"></a>C.2 Informative</h3><dl><dt class="label"><a name="WICD" id="WICD"></a>[WICDCORE]</dt><dd>
<a href="http://www.w3.org/TR/WICD/"><cite>
WICD Core 1.0
</cite></a>
, Timur Mehrvarz, Daniel Appelquist, Lasse Pajunen, and Julien Quint,
Editors.
World Wide Web Consortium, 22 Nov 2006. This version is
http://www.w3.org/TR/2006/WD-WICD-20061122/. The
<a href="http://www.w3.org/TR/WICD/">latest version</a>
is available at http://www.w3.org/TR/WICD/.
</dd><dt class="label"><a name="MathML2" id="MathML2"></a>[MATHML2]</dt><dd>
<a href="http://www.w3.org/TR/MathML2/"><cite>
Mathematical Markup Language (MathML) Version 2.0 (Second
Edition)
</cite></a>
, David Carlisle, Patrick Ion, Robert Miner, and Nico Poppelier,
Editors. World Wide Web Consortium, 21 Oct 2003. This version is
http://www.w3.org/TR/2003/REC-MathML2-20031021/. The
<a href="http://www.w3.org/TR/MathML2/">latest version</a>
is available at http://www.w3.org/TR/MathML2/.
</dd><dt class="label"><a name="REC-xml" id="REC-xml"></a>[XML]</dt><dd>
<a href="http://www.w3.org/TR/xml"><cite>
Extensible Markup Language (XML) 1.0 (Fourth Edition)
</cite></a>
, C. M. Sperberg-McQueen, Eve Maler, Tim Bray,
<em>et al.</em>
, Editors. World Wide Web Consortium, 16 August 2006. This version
is http://www.w3.org/TR/2006/REC-xml-20060816. The
<a href="http://www.w3.org/TR/xml">latest version</a>
is available at http://www.w3.org/TR/xml.
</dd><dt class="label"><a name="REC-xml-names" id="REC-xml-names"></a>[XML-NAMES]</dt><dd>
<a href="http://www.w3.org/TR/xml-names"><cite>
Namespaces in XML 1.0 (Second Edition)
</cite></a>
, Tim Bray, Dave Hollander, Andrew Layman, and Richard Tobin,
Editors. World Wide Web Consortium, 16 Aug 2006. This version is
http://www.w3.org/TR/2006/REC-xml-names-20060816. The
<a href="http://www.w3.org/TR/xml-names">latest version</a>
is available at http://www.w3.org/TR/xml-names.
</dd><dt class="label"><a name="voicexml20" id="voicexml20"></a>[VOICEXML2]</dt><dd>
<a href="http://www.w3.org/TR/voicexml20"><cite>
Voice Extensible Markup Language (VoiceXML) Version 2.0
</cite></a>
, Jim Ferrans, Bruce Lucas, Ken Rehor,
<em>et al.</em>
, Editors. World Wide Web Consortium, 16 Mar 2004. This version
is http://www.w3.org/TR/2004/REC-voicexml20-20040316/. The
<a href="http://www.w3.org/TR/voicexml20">latest version</a>
is available at http://www.w3.org/TR/voicexml20.
</dd><dt class="label"><a name="SMIL2" id="SMIL2"></a>[SMIL2]</dt><dd>
<a href="http://www.w3.org/TR/SMIL2/"><cite>
Synchronized Multimedia Integration Language (SMIL 2.1)
</cite></a>
, Dick Bulterman <em>et al.</em>, Editors.
World Wide Web Consortium, 13 Dec 2005. This version is
http://www.w3.org/TR/2005/REC-SMIL2-20051213/. The
<a href="http://www.w3.org/TR/SMIL2/">latest version</a>
is available at http://www.w3.org/TR/SMIL2/.
</dd><dt class="label"><a name="SVGMobile12" id="SVGMobile12"></a>[SVGMOBILE12]</dt><dd>
<a href="http://www.w3.org/TR/SVGMobile12/"><cite>
Scalable Vector Graphics (SVG) Tiny 1.2 Specification
</cite></a>
Ola Andersson, Robin Berjon, Erik Dahlström, Andrew Emmons, Jon Ferraiolo,
Vincent Hardy, Scott Hayman, Dean Jackson, Chris Lilley, Andreas Neumann,
Craig Northway, Antoine Quint, Nandini Ramani, Doug Schepers, and
Andrew Shellshear, Editors. World Wide Web Consortium, 10 Aug 2006.
This version is http://www.w3.org/TR/2006/CR-SVGMobile12-20060810/.
The <a href="http://www.w3.org/TR/SVGMobile12/">latest version</a>
is available at http://www.w3.org/TR/SVGMobile12/.
</dd><dt class="label"><a name="XFORMS" id="XFORMS"></a>[XFORMS]</dt><dd>
<a href="http://www.w3.org/TR/2006/REC-xforms-20060314/"><cite>XForms 1.0 (Second Edition)</cite></a>
, D. Landwehr, J. Boyer, T. V. Raman, M. Dubinko, R. Merrick, L. L. Klotz,
Editors, W3C Recommendation, 14 March 2006, http://www.w3.org/TR/2006/REC-xforms-20060314/ .
The <a href="http://www.w3.org/TR/xforms/">
latest version</a> is available at http://www.w3.org/TR/xforms/ .
</dd><dt class="label"><a name="xhtml11" id="xhtml11"></a>[XHTML11]</dt><dd>
<a href="http://www.w3.org/TR/xhtml11/"><cite>
XHTML™ 1.1 - Module-based XHTML
</cite></a>
, Murray Altheim and Shane McCarron, Editors. World Wide Web
Consortium, 31 May 2001. This version is
http://www.w3.org/TR/2001/REC-xhtml11-20010531. The
<a href="http://www.w3.org/TR/xhtml11/">latest version</a>
is available at http://www.w3.org/TR/xhtml11/.
</dd><dt class="label"><a name="html401" id="html401"></a>[HTML4]</dt><dd>
<a href="http://www.w3.org/TR/html401"><cite>
HTML 4.01 Specification
</cite></a>
, David Raggett, Arnaud Le Hors, and Ian Jacobs, Editors. World
Wide Web Consortium, 24 Dec 1999. This version is
http://www.w3.org/TR/1999/REC-html401-19991224. The
<a href="http://www.w3.org/TR/html401">latest version</a>
is available at http://www.w3.org/TR/html401.
</dd></dl></div></div><div class="div1">
<h2><a name="acknowledgements" id="acknowledgements"></a>D Acknowledgements (Non-Normative)</h2><p>The editors would like to thank the contributors:</p><ul><li><p>Ola Andersson, Ikivo</p></li><li><p>Daniel Appelquist, Vodafone</p></li><li><p>Mark Baker, Research in Motion, Limited, (formerly) Justsystem</p></li><li><p>L. David Baron, The Mozilla Foundation</p></li><li><p>Robin Berjon, Expway</p></li><li><p>Kurt Cagle, Mercurial Communications Inc.</p></li><li><p>Cyril Concolato, Groupe des Écoles des Télécommunications (GET)</p></li><li><p>Erik Dahlström, Opera Software</p></li><li><p>Alex Danilo, W3C Invited Experts</p></li><li><p>Jean-Claude Dufourd, Streamezzo</p></li><li><p>Andrew Emmons, Bitflash Division of Open Text</p></li><li><p>Hae Seok Lee, Infraware</p></li><li><p>Torkel Hambraeus, Ikivo</p></li><li><p>Vincent Hardy (Previous Working Group Chair), Sun Microsystems, Inc.</p></li><li><p>Takanari Hayama, Vodafone</p></li><li><p>Scott Hayman, Research In Motion Limited</p></li><li><p>Ian Hickson, (formerly) Opera Software</p></li><li><p>Masayasu Ishikawa, (Working Group Team Contact) W3C</p></li><li><p>Dean Jackson (previous Working Group Team Contact), W3C</p></li><li><p>Kevin Kelly (Working Group Chair), IBM</p></li><li><p>Anne van Kesteren, Opera Software</p></li><li><p>Rhys Lewis, Volantis</p></li><li><p>Chris Lilley, W3C</p></li><li><p>Lars-Gunnar Lundgren, Obigo</p></li><li><p>Vincent Mahe, France Telecom</p></li><li><p>Charles McCathieNevile, Opera Software</p></li><li><p>Timur Mehrvarz, Vodafone</p></li><li><p>Kunio Ohno, Justsystems Corporation</p></li><li><p>Lasse Pajunen, Nokia</p></li><li><p>Lars Piepel, Vodafone</p></li><li><p>Antoine Quint, Fuchsia Design</p></li><li><p>Julien Quint, DAISY Consortium</p></li><li><p>Nandini Ramani, Sun Microsystems, Inc.</p></li><li><p>Seung Chul Yeh, Infraware</p></li><li><p>Svante Schubert, Sun Microsystems, Inc.</p></li><li><p>Bradley Sipes, Ikivo</p></li><li><p>Steve Speicher, IBM</p></li><li><p>Peter Stark, Sony Ericsson</p></li><li><p>Petri Vuorimaa, Helsinki University of Technology</p></li><li><p>Daniel Zucker, ACCESS Co., Ltd.</p></li></ul></div><div class="div1">
<h2><a name="changes-log" id="changes-log"></a>E Changes Log (Non-Normative)</h2><dl><dt class="label">2007-07-09</dt><dd><ul><li><p>
Added XML stylesheet PI
as a testable assertion (CL).
</p></li></ul></dd><dt class="label">2007-07-01</dt><dd><ul><li><p>
Prepared CR state. (TM)
</p></li></ul></dd><dt class="label">2007-04-16</dt><dd><ul><li><p>Updated status of the document to CR. (TM)</p></li><li><p>
Outcommented changelog entries before 22. December 2006. (TM)
</p></li></ul></dd><dt class="label">2007-03-31</dt><dd><ul><li><p>Using author list, sorted by last name. (TM)</p></li></ul></dd><dt class="label">2007-03-26</dt><dd><ul><li><p>Split <a href="#references"><b>C References</b></a> into Normative and Informative, made global linking updates. (SKS)</p></li></ul></dd><dt class="label">2007-03-14</dt><dd><ul><li><p>Changed "inclusion boundaries" to "document boundaries" in <a href="#dom"><b>2.1 Document Object Model</b></a>. (JQ)</p></li><li><p>Added the sentence "It is possible for a content author to use child-to-parent (see 2.1.2 Child to Parent DOM Access) or parent-to-child (see 2.1.3 Parent to Child DOM Access) to propagate specific styling properties." right after (JQ)</p></li></ul></dd><dt class="label">2007-02-11</dt><dd><ul><li><p>Defined WICD when first used <a href="#related-documents"><b>1.2 Related Documents</b></a>. (SS)</p></li></ul></dd><dt class="label">2007-03-13</dt><dd><ul><li><p>Sorted the definitions in <a href="#definitions"><b>A Definitions</b></a>. (JQ)</p></li></ul></dd><dt class="label">2007-02-11</dt><dd><ul><li><p>Defined WICD when first used <a href="#related-documents"><b>1.2 Related Documents</b></a>. (SS)</p></li></ul></dd><dt class="label">2007-02-02</dt><dd><ul><li><p>Removed outdated Document Conformance heading and security statement from <a href="#conformance"><b>B Conformance</b></a>. (SS)</p></li></ul></dd></dl></div></div></body></html>