WD-Content-in-RDF-20080327
60.9 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
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
<?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 lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta content="application/xhtml+xml; charset=UTF-8" http-equiv="Content-Type" />
<title>Representing Content in RDF</title>
<style type="text/css">
.schema {
color: black;
background-color: #ccddcc;
}
.example {
margin: 1em 2em 1em 2em;
color: #000;
background-color: #fff;
padding: 0.5em;
border: 1px dotted #e63232;
}
.note {
background-color: #adff2f;
}
.keyword {
font-weight: bold;
font-style: italic;
}
pre {
border: 1px dotted #000;
color: #000;
background-color: #f4f3e7;
font-size: 110%;
}
table {
margin: 1ex 2%;
width: 90%;
border: solid 1px #000;
border-collapse: collapse;
}
thead,tfoot,tbody,tr {
margin: 0;
padding: 0;
}
th,td {
margin: 0;
padding: 0.2em 1em;
border: solid 1px #000;
}
abbr,acronym {
font-weight: inherit;
font-style: normal;
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: inherit;
}
span.type {
font-family: monospace;
}
</style>
<link href="http://www.w3.org/StyleSheets/TR/base" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="head" id="head"><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72" /></a>
<h1><a id="title" name="title">Representing Content in <acronym title="Resource Description Framework">RDF</acronym></a></h1>
<h2><a id="w3c-doctype" name="w3c-doctype"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft 27 March 2008</a></h2>
<dl>
<dt>This version:</dt>
<dd><a href="http://www.w3.org/WAI/ER/Content/WD-Content-in-RDF-20080327">http://www.w3.org/WAI/ER/Content/WD-Content-in-RDF-20080327</a></dd>
<dt>Latest published version:</dt>
<dd><acronym title="Not Available">N/A</acronym></dd>
<dt>Latest internal version:</dt>
<dd><a href="http://www.w3.org/WAI/ER/Content-in-RDF/">http://www.w3.org/WAI/ER/Content-in-RDF/</a></dd>
<dt>Editors:</dt>
<dd>Johannes Koch, Fraunhofer Institute for Applied Information Technology (<acronym title="Fraunhofer Institute for Applied Information Technology">FIT</acronym>)</dd>
<dd>Carlos A Velasco, Fraunhofer Institute for Applied Information Technology (<acronym title="Fraunhofer Institute for Applied Information Technology">FIT</acronym>)</dd>
</dl>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2008 <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. <acronym title="World Wide Web Consortium">W3C</acronym> <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 />
<h2><a id="abstract" name="abstract">Abstract</a></h2>
<p>This document is the specification for a vocabulary to represent Content in <acronym title="Resource Description Framework">RDF</acronym>. It contains as well introductory information on its usage and some examples. This framework is designed to express in a flexible manner any type of content available on the Web or in local storage media.</p>
<h2><a id="status" name="status">Status of this document</a></h2>
<p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p><p>Please send comments about this document to the <a href="mailto:public-wai-ert@w3.org">mailing list</a> of the <acronym title="Evaluation and Repair Tools">ERT</acronym> <acronym title="Working Group">WG</acronym>. The <a href="http://lists.w3.org/Archives/Public/public-wai-ert/">archives for this list</a> are publicly available.</p><p>This is a <acronym title="World Wide Web Consortium">W3C</acronym> Working Draft for Representing Content in RDF vocabulary. Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>
<p>This document was produced under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. The Working Group maintains a <a href="http://www.w3.org/WAI/ER/disclosures" rel="disclosure">public list of patent disclosures</a> relevant to this document; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) with respect to this specification should disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p><p>This document has been produced as part of the <acronym title="World Wide Web Consortium">W3C</acronym> <a href="http://www.w3.org/WAI/">Web Accessibility Initiative</a> (<acronym title="Web Accessibility Initiative">WAI</acronym>). The goals of the <a href="http://www.w3.org/WAI/ER/">Evaluation and Repair Tools Working Group</a> (<acronym title="Evaluation and Repair Tools">ERT</acronym> <acronym title="Working Group">WG</acronym>) are discussed in the <a href="http://www.w3.org/WAI/ER/charter3">Working Group charter</a>. The <acronym title="Evaluation and Repair Tools">ERT</acronym> <acronym title="Working Group">WG</acronym> is part of the <a href="http://www.w3.org/WAI/Technical/Activity"><acronym title="Web Accessibility Initiative">WAI</acronym> Technical Activity</a>.</p>
<hr />
<h2><a accesskey="c" id="contents" name="contents">Table of Contents</a></h2>
<ol>
<li><a href="#introduction">Introduction</a> <ul>
<li><a href="#namespaces">1.1. Namespaces</a></li>
<li><a href="#conventions">1.2. Document conventions</a></li>
<li><a href="#use-cases">1.3. Use Cases</a></li>
<li><a href="#pre-requisites">1.4. Pre-requisites</a></li>
</ul></li>
<li><a href="#classesProperties">Vocabulary usage: classes and properties</a> <ul>
<li><a href="#contentClass">2.1. Content class</a></li>
<li><a href="#base64ContentClass">2.2. Base64Content class</a></li>
<li><a href="#textContentClass">2.3. TextContent class</a></li>
<li><a href="#xmlContentClass">2.4. XMLContent class</a></li>
<li><a href="#xmlDeclClass">2.5. XMLDecl class</a></li>
<li><a href="#doctypeDeclClass">2.6. DoctypeDecl class</a></li>
<li><a href="#example">2.7. A practical example</a></li>
</ul></li>
<li><a href="#situations">When to create which resources?</a></li>
<li><a href="#issues">Open issues and extensions</a></li>
</ol>
<h3><a id="appendices" name="appendices"></a>Appendices</h3>
<ol type="A">
<li><a href="#schema">Schema in <acronym title="Resource Description Framework">RDF</acronym>/<acronym title="Extensible Markup Language">XML</acronym></a></li>
<li><a href="#limitations">Schema Limitations</a></li>
<li><a href="#terms-Content">Vocabulary Terms</a></li>
<li><a href="#dom-mapping">Mapping between DOM and the Content-in-RDF vocabulary</a></li>
<li><a href="#history">Document Changes</a></li>
<li><a href="#references">References</a></li>
</ol> <!-- end toc -->
<hr />
<h2><a id="introduction" name="introduction">1. Introduction</a></h2>
<p>This document is the specification for a vocabulary to represent Content in <acronym title="Resource Description Framework">RDF</acronym>. It also contains introductory information on its usage and illustrative examples. This framework is designed to express in a flexible manner any type of content available on the Web or in local storage media.</p><p>In this section we will present the namespaces of the vocabulary, the document conventions and some typical use cases.</p>
<h3><a id="namespaces" name="namespaces">1.1. Namespaces</a></h3>
<p><a href="#tab-namespaces">Table 1</a> presents the namespaces typically used by this vocabulary (<code>rdfs</code> and <code>owl</code> namespaces are normally only used in the schema). The core namespace has the URI <code>http://www.w3.org/2007/content#</code> and the prefix <code>cnt</code>. The prefix notation presents the typical conventions used in the Web and in this document to denote a given namespace, and can be freely modified.</p>
<table border="1" id="tab-namespaces">
<caption>Table 1: Representing Content in RDF namespaces.</caption>
<thead>
<tr>
<th>Namespace prefix</th>
<th>Namespace URI</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row"><code>cnt</code></td>
<td><code>http://www.w3.org/2007/content#</code></td>
<td>The default namespace for Representing Content in RDF.</td>
</tr>
<tr>
<td scope="row"><code>rdf</code></td>
<td><code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code></td>
<td>Default <acronym title="Resource Description Framework">RDF</acronym> namespace [<a href="#ref-rdf">RDF</a>].</td>
</tr>
<tr>
<td scope="row"><code>rdfs</code></td>
<td><code>http://www.w3.org/2000/01/rdf-schema#</code></td>
<td>Default <acronym title="Resource Description Framework">RDF</acronym> schema namespace [<a href="#ref-rdfs">RDFS</a>].</td>
</tr>
<tr>
<td scope="row"><code>owl</code></td>
<td><code>http://www.w3.org/2002/07/owl#</code></td>
<td>Default <acronym title="Web Ontology Language">OWL</acronym> namespace [<a href="#ref-owl">OWL</a>].</td>
</tr>
</tbody>
</table>
<h3><a id="conventions" name="conventions">1.2. Document conventions</a></h3>
<p>The keywords <strong>must</strong>, <strong>required</strong>, <strong>recommended</strong>, <strong>should</strong>, <strong>may</strong>, and <strong>optional</strong> are used in accordance with <a href="#ref-rfc2119">[RFC2119]</a>.</p>
<h3><a id="use-cases" name="use-cases">1.3. Use cases</a></h3>
<p>As stated earlier, this framework is designed in an open way to facilitate different implementation scenarios. The origin of the application comes from vocabularies describing testing scenarios like <acronym>EARL</acronym> <a href="#ref-earl">[EARL]</a>. Typical applications could be:</p>
<ul>
<li>Applications dealing with retrieval, manipulation and storage of content.</li>
<li>Applications dealing with the exchange of documents and other types of media, like, e.g., Web Services.</li>
<li>Applications dealing with the testing and/or repair of content.</li>
</ul>
<p>This list is not exclusive.</p>
<h3><a id="pre-requisites" name="pre-requisites">1.4. Pre-requisites</a></h3>
<p>This document assumes the following background knowledge:</p>
<ul>
<li>Basic knowledge of <acronym>XML</acronym> <a href="#ref-xml">[XML]</a> and its associated technologies.</li>
<li>Basic knowledge about the Semantic Web and <acronym>RDF</acronym>. For references, consult <a href="#ref-rdf">[RDF]</a>, <a href="#ref-rdf-primer">[RDF-PRIMER]</a> and <a href="#ref-rdfs">[RDFS]</a>.</li>
</ul>
<p>Although the concepts of the Semantic Web are simple, their abstraction with <acronym>RDF</acronym> is known to bring difficulties to beginners. It is recommended to read carefully the aforementioned references and other tutorials found on the Web. It must be also borne in mind that <acronym>RDF</acronym> is primarily targeted to be machine processable, and therefore, some of its expressions are not very intuitive for developers used to work with <acronym>XML</acronym> only. The examples will be serialized using the abbreviated <acronym title="Resource Description Framework">RDF</acronym>/<acronym title="Extensible Markup Language">XML</acronym> notation.</p>
<!-- end intro -->
<h2><a id="classesProperties" name="classesProperties">2. Vocabulary usage: classes and properties</a></h2>
<p>This section presents a description of the classes and properties of this <acronym>RDF</acronym> vocabulary. We present every class together with its properties and subclasses. We also include whenever relevant short snippets and examples.</p>
<h3><a id="contentClass" name="contentClass">2.1. Content class</a></h3>
<p>The <span class="type">Content</span> class is an overarching class with no properties. It is recommended always to use one of its subclasses. A resource of type <span class="type">Content</span> represents any content that could be found on the Web, in an Intranet or in local storage media, for example. There is no restriction within the vocabulary scope on what can be represented with this class: textual content, binary files (e.g., images or movies), XML files, etc.</p> <p>There are three subclasses from the <span class="type">Content</span> class: <a href="#base64ContentClass"><span class="type">Base64Content</span></a>, <a href="#textContentClass"><span class="type">TextContent</span></a> and <a href="#xmlContentClass"><span class="type">XMLContent</span></a>.</p>
<h3><a id="base64ContentClass" name="base64ContentClass">2.2. Base64Content class</a></h3>
<p>The <span class="type">Base64Content</span> class is a subclass of the <a href="#contentClass"><span class="type">Content</span></a> class. A resource of type <span class="type">Base64Content</span> represents Base64 encoded binary content (as defined by <a href="#ref-rfc2045">[RFC2045]</a>) and can be used for any type of content, although its more typical use case is for binary files.</p>
<p>The following property <strong>may</strong> appear in resources of type <span class="type">Base64Content</span> (with a maximum cardinality of 1):</p>
<dl>
<dt><var>characterEncoding</var></dt>
<dd>If the byte sequence was created from a given character sequence this property can be used to store the character encoding that was applied to create the byte sequence.</dd>
</dl>
<p>The following property <strong>must</strong> appear in resources of type <span class="type">Base64Content</span>:</p>
<dl>
<dt><var>bytes</var></dt>
<dd>Character string representing the Base64 encoded byte sequence of the given content.</dd>
</dl>
<div class="example">
<p><strong>Example 2.1:</strong> This example displays the representation of the <a href="http://www.w3.org/Icons/w3c_home">W3C logo</a> as a <span class="type">Base64Content</span> resource. (Note: due to its length, the encoded string has been chunked until <code>{...}</code>.)</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#">
<cnt:Base64Content rdf:about="http://www.w3.org/Icons/w3c_home.png">
<cnt:bytes>77+9UE5HDQoaCgAAAA1JSERSAAAASAAAADAIAwAAAO+{...}</cnt:bytes>
</cnt:Base64Content>
</rdf:RDF></pre>
</div>
<h3><a id="textContentClass" name="textContentClass">2.3. TextContent class</a></h3>
<p>The <span class="type">TextContent</span> class is a subclass of the <a href="#contentClass"><span class="type">Content</span></a> class. A resource of type <span class="type">TextContent</span> represents any type of textual content.</p>
<p>The following property <strong>may</strong> appear in resources of type <span class="type">TextContent</span> (with a maximum cardinality of 1):</p>
<dl>
<dt><var>characterEncoding</var></dt>
<dd>If the character sequence was created from a given byte sequence this property can be used to store the character encoding that was applied to create the character sequence.</dd>
</dl>
<p>The following property <strong>must</strong> appear in resources of type <span class="type">TextContent</span>:</p>
<dl>
<dt><var>chars</var></dt>
<dd>Character string representing the character sequence of the given content.</dd>
</dl>
<div class="example">
<p><strong>Example 2.2:</strong> The following example represents a <acronym>CSS</acronym> file as a <span class="type">TextContent</span> resource.</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#">
<cnt:TextContent rdf:about="http://example.org/example.css">
<cnt:characterEncoding>UTF-8</cnt:characterEncoding>
<cnt:chars>body {
color: #000;
background: #fff
}
h1 {
font-size: 1.6em
}
h2 {
font-size: 1.3em
}</cnt:chars>
</cnt:TextContent>
</rdf:RDF></pre>
</div>
<h3><a id="xmlContentClass" name="xmlContentClass">2.4. XMLContent class</a></h3>
<p>The <span class="type">XMLContent</span> class is a subclass of the <a href="#contentClass"><span class="type">Content</span></a> class. A resource of type <span class="type">XMLContent</span> represents <acronym>XML</acronym> content.</p>
<p>The following properties <strong>may</strong> appear in resources of type <span class="type">XMLContent</span> (with a maximum cardinality of 1):</p>
<dl>
<dt><var>characterEncoding</var></dt>
<dd>If the parser's input character stream was created from a given byte stream this property can be used to store the character encoding that was applied to create the character stream. <strong>Note:</strong> This is the <strong>used</strong> character encoding, not the one declared in an <acronym>XML</acronym> declaration.</dd>
<dt><var>xmlDecl</var></dt>
<dd>Property pointing to an <a href="#xmlDeclClass">XMLDecl</a> resource representing the <acronym>XML</acronym> declaration.</dd>
<dt><var>xmlLeadingMisc</var></dt>
<dd>Property representing as an <acronym>XML</acronym> Literal the part of the <acronym>XML</acronym> (comments and processing instructions) following the <acronym>XML</acronym> declaration and preceding the document type declaration if there is one.</dd>
<dt><var>doctypeDecl</var></dt>
<dd>Property pointing to a <a href="#doctypeDeclClass">DoctypeDecl</a> resource representing the document type declaration.</dd>
</dl>
<p>The following property <strong>must</strong> appear in resources of type <span class="type">XMLContent</span>:</p>
<dl>
<dt><var>xmlRest</var></dt>
<dd>Property representing as an <acronym>XML</acronym> Literal <ul>
<li>the part of the <acronym>XML</acronym> following the document type declaration if there is a document type declaration, or</li>
<li>the part following the <acronym>XML</acronym> declaration if there is no document type declaration, or</li>
<li>the whole <acronym>XML</acronym> if there is neither <acronym>XML</acronym> declaration nor document type declaration.</li></ul>
It contains comments, processing instructions and the root element.</dd>
</dl>
<div class="example">
<p><strong>Example 2.3:</strong> The <acronym>XHTML</acronym> page with the following source code:</p>
<pre><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>The title</title>
</head>
<body>
<p>Some paragraph.</p>
</body>
</html></pre>
<p>could be represented as this <span class="type">XMLContent</span> resource.</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#">
<cnt:XMLContent rdf:about="http://example.org/example203.html">
<cnt:xmlRest rdf:parseType="Literal"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>The title</title>
</head>
<body>
<p>Some paragraph.</p>
</body>
</html>
</cnt:xmlRest>
</cnt:XMLContent>
</rdf:RDF></pre>
</div>
<p>For the use of <var>xmlDecl</var>, <var>xmlLeadingMisc</var> and <var>doctypeDecl</var> see <a href="#example">2.7. A practical example</a>.</p>
<h3><a id="xmlDeclClass" name="xmlDeclClass">2.5. XMLDecl class</a></h3>
<p>A resource of type <span class="type">XMLDecl</span> represents an <acronym>XML</acronym> declaration. This class is normally used in conjunction with the <a href="#xmlContentClass"><span class="type">XMLContent</span></a> class, when the corresponding <acronym>XML</acronym> file has an <acronym>XML</acronym> declaration. The resources are linked via the <var>xmlDecl</var> property.</p>
<p>The following properties <strong>may</strong> appear in resources of type <span class="type">XMLDecl</span>:</p>
<dl>
<dt><var>xmlEncoding</var></dt>
<dd>Property representing the character encoding specified in the <acronym>XML</acronym> declaration.</dd>
<dt><var>xmlStandalone</var></dt>
<dd>Property representing the standalone document declaration.</dd>
</dl>
<p>The following property <strong>must</strong> appear in resources of type <span class="type">XMLDecl</span>:</p>
<dl>
<dt><var>xmlVersion</var></dt>
<dd>Property representing the <acronym>XML</acronym> version specified in the <acronym>XML</acronym> declaration.</dd>
</dl>
<div class="example">
<p><strong>Example 2.4:</strong> A typical <acronym>XML</acronym> declaration:</p>
<pre><?xml version="1.0" encoding="UTF-8" standalone="no" ?></pre>
<p>Can be expressed as the following <code>XMLDecl</code> resource:</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#">
<cnt:XMLDecl rdf:ID="xmld0">
<cnt:xmlStandalone>no</cnt:xmlStandalone>
<cnt:xmlEncoding>UTF-8</cnt:xmlEncoding>
<cnt:xmlVersion>1.0</cnt:xmlVersion>
</cnt:XMLDecl>
</rdf:RDF></pre>
</div>
<h3><a id="doctypeDeclClass" name="doctypeDeclClass">2.6. DoctypeDecl class</a></h3>
<p>A resource of type <span class="type">DoctypeDecl</span> represents a document type declaration. Likewise <a href="#xmlDeclClass"><span class="type">XMLDecl</span></a>, this class is normally used in conjunction with the <a href="#xmlContentClass"><span class="type">XMLContent</span></a> class, when the corresponding <acronym>XML</acronym> file has a document type declaration. The resources are linked via the <var>doctypeDecl</var> property.</p>
<p>The following properties <strong>may</strong> appear in resources of type <span class="type">DoctypeDecl</span>:</p>
<dl>
<dt><var>publicId</var></dt>
<dd>Property representing the formal public identifier.</dd>
<dt><var>systemId</var></dt>
<dd>Property representing the system identifier.</dd>
<dt><var>internalSubset</var></dt>
<dd>Property representing the internal subset.</dd>
</dl>
<p>The following property <strong>must</strong> appear in resources of type <span class="type">DoctypeDecl</span>:</p>
<dl>
<dt><var>doctypeName</var></dt>
<dd>Property representing the document type name.</dd>
</dl>
<div class="example">
<p><strong>Example 2.5:</strong> A typical <acronym>XHTML</acronym> 1.0 Strict document type declaration:</p>
<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></pre>
<p>could be represented as the following <code>DoctypeDecl</code> resource:</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#">
<cnt:DoctypeDecl rdf:ID="dtd0">
<cnt:systemId>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</cnt:systemId>
<cnt:publicId>-//W3C//DTD XHTML 1.0 Strict//EN</cnt:publicId>
<cnt:doctypeName>html</cnt:doctypeName>
</cnt:DoctypeDecl>
</rdf:RDF></pre>
</div>
<h3><a id="example" name="example">2.7. A practical example</a></h3>
<p>To understand the versatility of the vocabulary, let us assume we have a given <acronym>XHTML</acronym> page containing an <acronym>XML</acronym> declaration, a comment preceding a document type declaration and some <acronym>XHTML</acronym> elements.</p>
<div class="example">
<p><strong>Example 2.6:</strong> A typical <acronym>XHTML</acronym> page.</p>
<pre><?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- this is a comment -->
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>The title</title>
</head>
<body>
<p>Some paragraph.</p>
</body>
</html></pre>
<p>This page could be represented as simple <a href="#textContentClass"><span class="type">TextContent</span></a>:</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#">
<cnt:TextContent rdf:about="http://example.org/example207.html">
<cnt:chars>&lt;?xml version="1.0" encoding="UTF-8" standalone="no" ?&gt;
&lt;!-- this is a comment --&gt;
&lt;!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
&lt;head&gt;
&lt;title&gt;The title&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Some paragraph.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</cnt:chars>
</cnt:TextContent>
</rdf:RDF></pre>
<p>or likewise as <a href="#xmlContentClass"><span class="type">XMLContent</span></a>. The information from the XML declaration is modelled as an <span class="type">XMLDecl</span> resource and refered to from the <span class="type">XMLContent</span> resource by the <var>xmlDecl</var> property. As the comment <code><!-- this is a comment --></code> precedes the document type declaration a <var>xmlLeadingMisc</var> property is created with its object literal containing the comment. The document type declaration is modelled as a <span class="type">DoctypeDecl</span> resource and refered to from the <span class="type">XMLContent</span> resource by the <var>doctypeDecl</var> property.</p>
<pre><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cnt="http://www.w3.org/2007/content#"
xml:base="http://example.org/example208.html">
<cnt:DoctypeDecl rdf:ID="dtd0">
<cnt:systemId>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</cnt:systemId>
<cnt:publicId>-//W3C//DTD XHTML 1.0 Strict//EN</cnt:publicId>
<cnt:doctypeName>html</cnt:doctypeName>
</cnt:DoctypeDecl>
<cnt:XMLDecl rdf:ID="xmld0">
<cnt:xmlStandalone>no</cnt:xmlStandalone>
<cnt:xmlEncoding>UTF-8</cnt:xmlEncoding>
<cnt:xmlVersion>1.0</cnt:xmlVersion>
</cnt:XMLDecl>
<cnt:XMLContent rdf:about="#">
<cnt:xmlLeadingMisc rdf:parseType="Literal"><!-- this is a comment --></cnt:xmlLeadingMisc>
<cnt:doctypeDecl rdf:resource="#dtd0" />
<cnt:xmlDecl rdf:resource="#xmld0" />
<cnt:xmlRest rdf:parseType="Literal"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>The title</title>
</head>
<body>
<p>Some paragraph.</p>
</body>
</html></cnt:xmlRest>
</cnt:XMLContent>
</rdf:RDF></pre>
</div>
<!-- end Classes and Properties -->
<h2><a id="situations" name="situations">3. When to create which resources?</a></h2>
<p>We have identified some situations to make clear when to create which type of content resources.</p>
<p>Situation A: Given the byte sequence of non-text content (<var>byteSeq</var>) read from a file system. A <span class="type">cnt:Base64Content</span> resource may be created with a <var>cnt:bytes</var> property with an object literal created from <var>byteSeq</var>. But no <span class="type">cnt:TextContent</span> resource must be created, although in some cases it's technically possible to create a character sequence from the byte sequence <var>byteSeq</var> using some character encoding.</p>
<p>Situation B: Given the byte sequence of text content (<var>byteSeq</var>) received from a web server and an appropriate character encoding (<var>ce</var>). A <span class="type">cnt:Base64Content</span> resource may be created with a <var>cnt:bytes</var> property with an object literal created from <var>byteSeq</var>. After transforming <var>byteSeq</var> to character sequence <var>charSeq</var> using character encoding <var>ce</var>, a <span class="type">cnt:TextContent</span> resource may be created with <var>cnt:chars</var> property with an object literal <var>charSeq</var> and <var>cnt:characterEncoding</var> property with an object literal <var>ce</var>.</p>
<p>Situation C: Given the byte sequence of text content (<var>byteSeq</var>) received from a web server and an inappropriate character encoding (<var>ce</var>). A <span class="type">cnt:Base64Content</span> resource may be created with a <var>cnt:bytes</var> property with an object literal created from <var>byteSeq</var>. Because transforming <var>byteSeq</var> to a character sequence <var>charSeq</var> using character encoding <var>ce</var> fails, no <span class="type">cnt:TextContent</span> resource can be created.</p>
<p>Situation D: Given the character sequence of text content (<var>charSeq</var>) created in memory and an appropriate character encoding (<var>ce</var>). A <span class="type">cnt:TextContent</span> resource may be created with a <var>cnt:chars</var> property with an object literal created from <var>charSeq</var>. After transforming <var>charSeq</var> to byte sequence <var>byteSeq</var> using character encoding <var>ce</var>, a <span class="type">cnt:Base64Content</span> resource may be created with <var>cnt:bytes</var> property with an object literal <var>byteSeq</var> and <var>cnt:characterEncoding</var> property with an object literal <var>ce</var>.</p>
<p>Situation E: Given the byte sequence of wellformed <acronym>XML</acronym> content (<var>byteSeq</var>) received from a web server and an appropriate character encoding (<var>ce</var>). <span class="type">cnt:Base64Content</span> and <span class="type">cnt:TextContent</span> resources may be created as in situation B. Additionally, an <span class="type">cnt:XMLContent</span> resource may be created.</p>
<p>Situation F: Given a <acronym title="Document Object Model">DOM</acronym> Document in memory, originally created by parsing some <acronym>XML</acronym> source, but afterwards changed by <acronym>DOM</acronym> operations. A <span class="type">cnt:XMLDecl</span> resource may be created from the information in the Document node itself, and a <span class="type">cnt:DoctypeDecl</span> resource from the information in the DocumentType node. A <span class="type">cnt:XMLContent</span> resource may be created after serializing the relevant child nodes of the Document node (1. Comment and ProcessingInstruction nodes preceding a DocumentType node, and 2. nodes following a DocumentType node) to create object literals for <var>cnt:xmlLeadingMisc</var> and <var>cnt:xmlRest</var>. See the <a href="#dom-mapping">Mapping between DOM and the Content-in-RDF vocabulary</a>.</p>
<h2><a id="issues" name="issues">4. Open issues and extensions</a></h2>
<p>The vocabulary provides a framework that allows the representation of any type of content. Of course, there are many possibilities for extensions that will allow the inclusion of additional metadata, like, e.g., that included in some multimedia formats. Typical scenarios for extensions could be:</p>
<ul>
<li>Classes to specify the <a href="http://www.w3.org/DOM/DOMTR">Document Object Model (<acronym>DOM</acronym>)</a> of <acronym>XML</acronym> or HTML documents.</li>
<li>Classes to specify the metadata of multimedia content like audio or image files.</li>
<li>Properties to ensure the integrity of data by providing some kind of checksum algorithm.</li>
</ul>
<p>However, at the point of writing this specification, the Working Group has decided to provide the basic framework that will support the immediate needs of vocabularies using this specification like <acronym>EARL</acronym> <a href="#ref-earl">[EARL]</a>, leaving the room open for further extensions as new use cases are presented to us.</p>
<h2><a id="schema" name="schema">Appendix A: Schema in <acronym title="Resource Description Framework">RDF</acronym>/<acronym title="Extensible Markup Language">XML</acronym></a></h2>
<pre class="schema"><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns="http://www.w3.org/2007/content#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.w3.org/2007/content">
<owl:Ontology rdf:about="">
<owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Copyright © 2008 World Wide Web Consortium</owl:versionInfo>
</owl:Ontology>
<!-- Classes -->
<rdfs:Class rdf:ID="Base64Content">
<rdfs:subClassOf>
<owl:Restriction>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:cardinality>
<owl:onProperty>
<rdf:Property rdf:about="#bytes"/>
</owl:onProperty>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#characterEncoding"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:label xml:lang="en">Base64 content</rdfs:label>
<rdfs:comment xml:lang="en">The base64 encoded content (can be used for all types of content)</rdfs:comment>
<rdfs:subClassOf rdf:resource="#Content"/>
</rdfs:Class>
<rdfs:Class rdf:about="#Content">
<rdfs:label xml:lang="en">Content</rdfs:label>
<rdfs:comment xml:lang="en">The message body content</rdfs:comment>
</rdfs:Class>
<rdfs:Class rdf:ID="DoctypeDecl">
<rdfs:label xml:lang="en">Document type declaration</rdfs:label>
<rdfs:comment xml:lang="en">The document type declaration</rdfs:comment>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#doctypeName"/>
</owl:onProperty>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:cardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#internalSubset"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#publicId"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#systemId"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</rdfs:Class>
<rdfs:Class rdf:ID="TextContent">
<rdfs:subClassOf>
<owl:Restriction>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:cardinality>
<owl:onProperty>
<rdf:Property rdf:about="#chars"/>
</owl:onProperty>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#characterEncoding"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:label xml:lang="en">Text content</rdfs:label>
<rdfs:comment xml:lang="en">The text content (can be used for non-XML-wellformed text resources)</rdfs:comment>
<rdfs:subClassOf rdf:resource="#Content"/>
</rdfs:Class>
<rdfs:Class rdf:ID="XMLContent">
<rdfs:label xml:lang="en">XML content</rdfs:label>
<rdfs:comment xml:lang="en">The XML content (can be used for XML-wellformed resource)</rdfs:comment>
<rdfs:subClassOf rdf:resource="#Content"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#characterEncoding"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#xmlDecl"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#doctypeDecl"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#xmlLeadingMisc"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#xmlRest"/>
</owl:onProperty>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:cardinality>
</owl:Restriction>
</rdfs:subClassOf>
</rdfs:Class>
<rdfs:Class rdf:ID="XMLDecl">
<rdfs:subClassOf>
<owl:Restriction>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:cardinality>
<owl:onProperty>
<rdf:Property rdf:about="#xmlVersion"/>
</owl:onProperty>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:comment xml:lang="en">The XML declaration</rdfs:comment>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#xmlEncoding"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty>
<rdf:Property rdf:about="#xmlStandalone"/>
</owl:onProperty>
<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:maxCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:label xml:lang="en">XML declaration</rdfs:label>
</rdfs:Class>
<!-- Properties -->
<rdf:Property rdf:about="#bytes">
<rdfs:label xml:lang="en">Base64 encoded byte sequence</rdfs:label>
<rdfs:comment xml:lang="en">The Base64 encoded byte sequence of the content</rdfs:comment>
<rdfs:domain rdf:resource="#Base64Content"/>
</rdf:Property>
<rdf:Property rdf:about="#characterEncoding">
<rdfs:label xml:lang="en">Character encoding</rdfs:label>
<rdfs:comment xml:lang="en">The character encoding used create a character sequence from a byte
sequence or vice versa</rdfs:comment>
</rdf:Property>
<rdf:Property rdf:about="#chars">
<rdfs:comment xml:lang="en">The character sequence of the content</rdfs:comment>
<rdfs:domain rdf:resource="#TextContent"/>
<rdfs:label xml:lang="en">Character sequence</rdfs:label>
</rdf:Property>
<rdf:Property rdf:about="#doctypeDecl">
<rdfs:label xml:lang="en">Document type declaration</rdfs:label>
<rdfs:comment xml:lang="en">The document type declaration</rdfs:comment>
<rdfs:domain rdf:resource="#XMLContent"/>
<rdfs:range rdf:resource="#DoctypeDecl"/>
</rdf:Property>
<rdf:Property rdf:about="#doctypeName">
<rdfs:label xml:lang="en">Document type name</rdfs:label>
<rdfs:comment xml:lang="en">The document type name</rdfs:comment>
<rdfs:domain rdf:resource="#DoctypeDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
<rdf:Property rdf:about="#internalSubset">
<rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>The internal subset of the DTD</rdfs:comment>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Internal DTD subset</rdfs:label>
<rdfs:domain rdf:resource="#DoctypeDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
<rdf:Property rdf:about="#publicId">
<rdfs:label xml:lang="en">Public ID</rdfs:label>
<rdfs:comment xml:lang="en">The document type declarations's public identifier</rdfs:comment>
<rdfs:domain rdf:resource="#DoctypeDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
<rdf:Property rdf:about="#systemId">
<rdfs:label xml:lang="en">System ID</rdfs:label>
<rdfs:comment xml:lang="en">The document type declarations's system identifier (typed: xsd:anyURI)</rdfs:comment>
<rdfs:domain rdf:resource="#DoctypeDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
<rdf:Property rdf:about="#xmlDecl">
<rdfs:label xml:lang="en">XML declaration</rdfs:label>
<rdfs:comment xml:lang="en">The XML declaration</rdfs:comment>
<rdfs:domain rdf:resource="#XMLContent"/>
<rdfs:range rdf:resource="#XMLDecl"/>
</rdf:Property>
<rdf:Property rdf:about="#xmlEncoding">
<rdfs:label xml:lang="en">XML character encoding</rdfs:label>
<rdfs:comment xml:lang="en">The XML character encoding</rdfs:comment>
<rdfs:domain rdf:resource="#XMLDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
<rdf:Property rdf:about="#xmlLeadingMisc">
<rdfs:label xml:lang="en">XML leading misc</rdfs:label>
<rdfs:comment xml:lang="en">The XML content preceding the document type declaration</rdfs:comment>
<rdfs:domain rdf:resource="#XMLContent"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#XMLLiteral"/>
</rdf:Property>
<rdf:Property rdf:about="#xmlRest">
<rdfs:label xml:lang="en">XML rest</rdfs:label>
<rdfs:comment xml:lang="en">The XML content following the document type declaration</rdfs:comment>
<rdfs:domain rdf:resource="#XMLContent"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#XMLLiteral"/>
</rdf:Property>
<rdf:Property rdf:about="#xmlStandalone">
<rdfs:label xml:lang="en">XML standalone document declaration</rdfs:label>
<rdfs:comment xml:lang="en">The XML standalone document declaration</rdfs:comment>
<rdfs:domain rdf:resource="#XMLDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
<rdf:Property rdf:about="#xmlVersion">
<rdfs:label xml:lang="en">XML version</rdfs:label>
<rdfs:comment xml:lang="en">The XML version</rdfs:comment>
<rdfs:domain rdf:resource="#XMLDecl"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
</rdf:RDF></pre>
<h2><a id="limitations" name="limitations">Appendix B: Schema Limitations</a></h2>
<p>There are no limitations known at the time of writing this specification.</p>
<h2><a id="terms-Content" name="terms-Content">Appendix C: Vocabulary Terms</a></h2>
<p>The following terms are defined by this specification:</p>
<h3><a id="terms-classes" name="terms-classes">Classes</a></h3>
<table>
<caption>Classes in the Representing Content in <acronym>RDF</acronym> namespace.</caption>
<thead>
<tr>
<th scope="col">Class name</th>
<th scope="col">Label</th>
<th scope="col">Allowable types</th>
<th scope="col">Required properties</th>
<th scope="col">Optional properties</th>
</tr>
</thead>
<tbody>
<tr id="terms-classes-Base64Content">
<td scope="row"><span class="type">cnt:Base64Content</span></td>
<td>Base64 encoded binary content</td>
<td></td>
<td><a href="#terms-properties-bytes"><var>cnt:bytes</var></a></td>
<td><a href="#terms-properties-characterEncoding"><var>cnt:characterEncoding</var></a></td>
</tr>
<tr id="terms-classes-Content">
<td scope="row"><span class="type">cnt:Content</span></td>
<td>Content</td>
<td><a href="#terms-classes-Base64Content"><span class="type">cnt:Base64Content</span></a>, <a href="#terms-classes-TextContent"><span class="type">cnt:TextContent</span></a>, <a href="#terms-classes-XMLContent"><span class="type">cnt:XMLContent</span></a></td>
<td></td>
<td></td>
</tr>
<tr id="terms-classes-DoctypeDecl">
<td scope="row"><span class="type">cnt:DoctypeDecl</span></td>
<td>Document type declaration</td>
<td></td>
<td><a href="#terms-properties-doctypeName"><var>cnt:doctypeName</var></a></td>
<td><a href="#terms-properties-publicId"><var>cnt:publicId</var></a>, <a href="#terms-properties-systemId"><var>cnt:systemId</var></a>, <a href="#terms-properties-internalSubset"><var>cnt:internalSubset</var></a></td>
</tr>
<tr id="terms-classes-TextContent">
<td scope="row"><span class="type">cnt:TextContent</span></td>
<td>Textual content</td>
<td></td>
<td><a href="#terms-properties-chars"><var>cnt:chars</var></a></td>
<td><a href="#terms-properties-characterEncoding"><var>cnt:characterEncoding</var></a></td>
</tr>
<tr id="terms-classes-XMLContent">
<td scope="row"><span class="type">cnt:XMLContent</span></td>
<td>XML content</td>
<td></td>
<td><a href="#terms-properties-xmlRest"><var>cnt:xmlRest</var></a></td>
<td><a href="#terms-properties-characterEncoding"><var>cnt:characterEncoding</var></a>, <a href="#terms-properties-xmlLeadingMisc"><var>cnt:xmlLeadingMisc</var></a>, <a href="#terms-properties-doctypeDecl"><var>cnt:doctypeDecl</var></a></td>
</tr>
<tr id="terms-classes-XMLDecl">
<td scope="row"><span class="type">cnt:XMLDecl</span></td>
<td>XML declaration</td>
<td></td>
<td><a href="#terms-properties-xmlVersion"><var>cnt:xmlVersion</var></a></td>
<td><a href="#terms-properties-xmlEncoding"><var>cnt:xmlEncoding</var></a>, <a href="#terms-properties-xmlStandalone"><var>cnt:xmlStandalone</var></a></td>
</tr>
</tbody>
</table>
<h3><a id="terms-properties" name="terms-properties">Properties</a></h3>
<table>
<caption>Properties in the Representing Content in <acronym>RDF</acronym> namespace.</caption>
<thead>
<tr>
<th scope="col">Property name</th>
<th scope="col">Label</th>
<th scope="col">Domain</th>
<th scope="col">Range</th>
<th>Restriction</th>
</tr>
</thead>
<tbody>
<tr id="terms-properties-bytes">
<td scope="row"><var>cnt:bytes</var></td>
<td>Bytes</td>
<td><a href="#terms-classes-Base64Content"><span class="type">cnt:Base64Content</span></a></td>
<td>Literal</td>
<td>Exactly one per <span class="type">cnt:Base64Content</span></td>
</tr>
<tr id="terms-properties-characterEncoding">
<td scope="row"><var>cnt:characterEncoding</var></td>
<td>Character encoding</td>
<td></td>
<td>Literal</td>
<td>At most one per <span class="type">cnt:Base64Content</span>, <span class="type">cnt:TextContent</span> or <span class="type">cnt:XMLContent</span></td>
</tr>
<tr id="terms-properties-chars">
<td scope="row"><var>cnt:chars</var></td>
<td>Characters</td>
<td><a href="#terms-classes-TextContent"><span class="type">cnt:TextContent</span></a></td>
<td>Literal</td>
<td>Exactly one per <span class="type">cnt:TextContent</span></td>
</tr>
<tr id="terms-properties-doctypeDecl">
<td scope="row"><var>cnt:doctypeDecl</var></td>
<td>Document type declaration</td>
<td><a href="#terms-classes-XMLContent"><span class="type">cnt:XMLContent</span></a></td>
<td><a href="#terms-classes-DoctypeDecl"><span class="type">cnt:DoctypeDecl</span></a></td>
<td>At most one per <span class="type">cnt:XMLContent</span></td>
</tr>
<tr id="terms-properties-doctypeName">
<td scope="row"><var>cnt:doctypeName</var></td>
<td>Document type name</td>
<td><a href="#terms-classes-DoctypeDecl"><span class="type">cnt:DoctypeDecl</span></a></td>
<td>Literal</td>
<td>Exactly one per <span class="type">cnt:DoctypeDecl</span></td>
</tr>
<tr id="terms-properties-internalSubset">
<td scope="row"><var>cnt:internalSubset</var></td>
<td>Internal subset</td>
<td><a href="#terms-classes-DoctypeDecl"><span class="type">cnt:DoctypeDecl</span></a></td>
<td>Literal</td>
<td>At most one per <span class="type">cnt:DoctypeDecl</span></td>
</tr>
<tr id="terms-properties-publicId">
<td scope="row"><var>cnt:publicId</var></td>
<td>Formal public identifier</td>
<td><a href="#terms-classes-DoctypeDecl"><span class="type">cnt:DoctypeDecl</span></a></td>
<td>Literal</td>
<td>At most one per <span class="type">cnt:DoctypeDecl</span></td>
</tr>
<tr id="terms-properties-systemId">
<td scope="row"><var>cnt:systemId</var></td>
<td>System identifier</td>
<td><a href="#terms-classes-DoctypeDecl"><span class="type">cnt:DoctypeDecl</span></a></td>
<td>Literal</td>
<td>At most one per <span class="type">cnt:DoctypeDecl</span></td>
</tr>
<tr id="terms-properties-xmlDecl">
<td scope="row"><var>cnt:xmlDecl</var></td>
<td>XML declaration</td>
<td><a href="#terms-classes-XMLContent"><span class="type">cnt:XMLContent</span></a></td>
<td><a href="#terms-classes-XMLDecl"><span class="type">cnt:XMLDecl</span></a></td>
<td>At most one per <span class="type">cnt:XMLContent</span></td>
</tr>
<tr id="terms-properties-xmlEncoding">
<td scope="row"><var>cnt:xmlEncoding</var></td>
<td>XML character encoding</td>
<td><a href="#terms-classes-XMLDecl"><span class="type">cnt:XMLDecl</span></a></td>
<td>Literal</td>
<td>At most one per <span class="type">cnt:XMLDecl</span></td>
</tr>
<tr id="terms-properties-xmlLeadingMisc">
<td scope="row"><var>cnt:xmlLeadingMisc</var></td>
<td>XML preceding the document type declaration</td>
<td><a href="#terms-classes-XMLContent"><span class="type">cnt:XMLContent</span></a></td>
<td>XML Literal</td>
<td>At most one per <span class="type">cnt:XMLContent</span></td>
</tr>
<tr id="terms-properties-xmlRest">
<td scope="row"><var>cnt:xmlRest</var></td>
<td>XML following the document type declaration</td>
<td><a href="#terms-classes-XMLContent"><span class="type">cnt:XMLContent</span></a></td>
<td>XML Literal</td>
<td>Exactly one per <span class="type">cnt:XMLContent</span></td>
</tr>
<tr id="terms-properties-xmlStandalone">
<td scope="row"><var>cnt:xmlStandalone</var></td>
<td>XML standalone document declaration</td>
<td><a href="#terms-classes-XMLDecl"><span class="type">cnt:XMLDecl</span></a></td>
<td>Literal</td>
<td>At most one per <span class="type">cnt:XMLDecl</span></td>
</tr>
<tr id="terms-properties-xmlVersion">
<td scope="row"><var>cnt:xmlVersion</var></td>
<td>XML version</td>
<td><a href="#terms-classes-XMLDecl"><span class="type">cnt:XMLDecl</span></a></td>
<td>Literal</td>
<td>Exactly one per <span class="type">cnt:XMLDecl</span></td>
</tr>
</tbody>
</table>
<h2><a id="dom-mapping" name="dom-mapping">Appendix D: Mapping between DOM and the Content-in-RDF vocabulary</a></h2>
<table>
<thead>
<tr>
<th>DOM property</th>
<th>Content-in-RDF property</th>
</tr>
</thead>
<tbody>
<tr>
<td><var>Document.xmlVersion</var></td>
<td><var>xmlVersion</var></td>
</tr>
<tr>
<td><var>Document.xmlEncoding</var></td>
<td><var>xmlEncoding</var></td>
</tr>
<tr>
<td><var>Document.xmlStandalone</var></td>
<td><var>xmlStandalone</var></td>
</tr>
<tr>
<td><var>Document.doctype</var></td>
<td><var>doctypeDecl</var></td>
</tr>
<tr>
<td><var>DocumentType.name</var></td>
<td><var>doctypeName</var></td>
</tr>
<tr>
<td><var>DocumentType.publicId</var></td>
<td><var>publicId</var></td>
</tr>
<tr>
<td><var>DocumentType.systemId</var></td>
<td><var>systemId</var></td>
</tr>
<tr>
<td><var>DocumentType.internalSubset</var></td>
<td><var>internalSubset</var></td>
</tr>
</tbody>
</table>
<h2><a id="history" name="history">Appendix E: Document Changes</a></h2>
<p>Since the 20 February 2008 editorial draft, this document has changed as follows:</p>
<ul>
<li>Added <var>characterEncoding</var> property to <span class="type">Base64Content</span>, <span class="type">TextContent</span>, <span class="type">XMLContent</span>.</li>
<li>Clarified definition text for <var>xmlLeadingMisc</var> and <var>xmlRest</var> properties.</li>
<li>Changed <var>docTypeDecl</var> to <var>doctypeDecl</var>, and <span class="type">DocTypeDecl</span> to <span class="type">DoctypeDecl</span>.</li>
<li>Changed <var>dtdName</var> to <var>doctypename</var>.</li>
<li>Changed examples 2.6, 2.7, 2.8 into one (2.6).</li>
<li>Added section "When to create which resources?".</li>
<li>Added appendix "Mapping between DOM and the Content-in-RDF vocabulary"</li>
<li>Some minor editorial changes.</li>
</ul>
<h2><a id="references" name="references">Appendix E: References</a></h2>
<dl>
<dt><a id="ref-earl" name="ref-earl">[<acronym title="Evaluation and Report Language">EARL</acronym>]</a></dt>
<dd><a href="http://www.w3.org/TR/EARL10/">Evaluation and Report Language (EARL) 1.0 Schema</a>. W3C Working Draft 23 March 2007.<br />
<code>http://www.w3.org/TR/EARL10/</code></dd>
<dt><a id="ref-rdf" name="ref-rdf">[<acronym title="Resource Description Framework">RDF</acronym>]</a></dt>
<dd><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">Resource Description Framework (RDF) Model and Syntax Specification</a>. W3C Recommendation, 22 February 1999.<br />
<code>http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/</code></dd>
<dt><a id="ref-rdf-primer" name="ref-rdf-primer">[<acronym title="Resource Description Framework">RDF</acronym>-PRIMER]</a></dt>
<dd><a href="http://www.w3.org/TR/rdf-primer/"><acronym title="Resource Description Framework">RDF</acronym> Primer</a>. W3C Recommendation, 10 February 2004.<br />
<code>http://www.w3.org/TR/rdf-primer/</code></dd>
<dt><a id="ref-rdfs" name="ref-rdfs">[<acronym title="Resource Description Framework Schema">RDFS</acronym>]</a></dt>
<dd><a href="http://www.w3.org/TR/rdf-schema/"><acronym title="Resource Description Framework">RDF</acronym> Vocabulary Description Language 1.0: <acronym title="Resource Description Framework">RDF</acronym> Schema</a>. W3C Recommendation 10 February 2004.<br />
<code>http://www.w3.org/TR/rdf-schema/</code></dd>
<dt><a id="ref-rdf-xml" name="ref-rdf-xml">[<acronym title="Resource Description Framework">RDF</acronym>-XML]</a></dt>
<dd><a href="http://www.w3.org/TR/rdf-syntax-grammar/"><acronym title="Resource Description Framework">RDF</acronym>/XML Syntax Specification (Revised)</a>. W3C Recommendation 10 February 2004.<br />
<code>http://www.w3.org/TR/rdf-syntax-grammar/</code></dd>
<dt><a id="ref-rfc2119" name="ref-rfc2119">[<acronym title="Request For Comments">RFC</acronym>2119]</a></dt>
<dd>Request for Comments: 2119. <a href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>, March 1997 (<acronym title="Internet Engineering Task Force">IETF</acronym>).<br />
<code>http://www.ietf.org/rfc/rfc2119.txt</code></dd>
<dt><a id="ref-rfc2045" name="ref-rfc2045">[<acronym title="Request For Comments">RFC</acronym>2045]</a></dt>
<dd>Request for Comments: 2045. <a href="http://www.ietf.org/rfc/rfc2045.txt">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>, November 1996 (<acronym title="Internet Engineering Task Force">IETF</acronym>).<br />
<code>http://www.ietf.org/rfc/rfc2045.txt</code></dd>
<dt><a id="ref-owl" name="ref-owl">[<acronym title="Ontology Web Language">OWL</acronym>]</a></dt>
<dd><a href="http://www.w3.org/TR/owl-features/"><acronym title="Ontology Web Language">OWL</acronym> Web Ontology Language Overview</a>. W3C Recommendation 10 February 2004 .<br />
<code>http://www.w3.org/TR/owl-features/</code></dd>
<dt><a id="ref-xml" name="ref-xml">[<acronym title="Extensible Markup Language">XML</acronym>]</a></dt>
<dd><a href="http://www.w3.org/TR/xml/">Extensible Markup Language (XML) 1.0 (Fourth Edition)</a>. W3C Recommendation 16 August 2006, edited in place 29 September 2006.<br /> <code>http://www.w3.org/TR/xml/</code></dd>
</dl>
</body>
</html>