-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwxr.xsd
746 lines (722 loc) · 26.9 KB
/
wxr.xsd
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
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xs:schema PUBLIC "-//WordPress//DTD WXR 1.3//EN" "wxr.dtd">
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:wxr='&WXR_NamespaceURI;'
xmlns:wp='&WXR_NamespaceURI;1.2/'
xmlns:fn='http://www.w3.org/2005/xpath-functions'
elementFormDefault='qualified'
targetNamespace='&WXR_NamespaceURI;'
version='&WXR_Version;'>
<xs:annotation>
<xs:documentation>
This is a proof-of-concept XML Schema 1.1 schema for WordPress Export RSS (WXR) proposed version &WXR_Version;.
</xs:documentation>
<xs:documentation>
Author: Paul V. Biron/Sparrow Hawk Computing
Email: paul@SparrowHawkComputing.com
Web: http://sparrowhawkcomputing.com
WordPress: pbiron
Slack: pbiron
</xs:documentation>
<xs:documentation>
This schema is available at http://github.com/pbiron/wxr/1.3-proposed. If you find any errors in it
or have suggestions for improvements, please open an issue there.
</xs:documentation>
<xs:documentation>
This schema is intended to serve primarily as documentation of WXR.
There are 2 primary audiences for this schema: 1) WP Core contributors involved in maintaining
the export/import code (i.e., to serve as a check for keeping the exporter/importer in sync
when making modifications); and 2) plugin authors who want to write their own export/import code.
The primary purpose of documentation has informed how I have structured this schema (e.g.,
the use of the 'rss_item_elements' and 'wxr:post_elements' model groups make generated
documentation more explanatory).
</xs:documentation>
<xs:documentation>
This schema is NOT intended to be used for run-time validation. The primary reason for this is
that the XML parsers that are included in PHP do NOT support XML Schema 1.1 (because they are
all based on libxml, which only supports XML Schema 1.0) :-)
I could write an XML Schema 1.0 schema if folks want to do run-time validation, but I don't think
it would be worth doing so: 1) the importer doesn't really need it; and 2) the expressivity of
XML Schema 1.0 is not rich enough to write a very accurate schema for WXR (e.g., the schema
would have to too tight in some respects and too 'loose' in others, and would report instances
as valid even they weren't).
For that matter, even this XML Schema 1.1 schema is a little 'loose' in some respects.
</xs:documentation>
<xs:documentation>
As I dug deeper into the Core export/import code (starting with my patch for
https://core.trac.wordpress.org/ticket/27896 and continuing in my attempts to make
https://github.com/humanmade/WordPress-Importer be namespace-aware) I've started to come up with
a list of changes that I think should be made to WXR. Some of those are documented in
@todo's throughout this schema (search for 'trac ticket'). Others are documented at
https://github.com/pbiron/wxr/issues?q=is%3Aissue+label%3A%22core+trac+ticket%22 and
https://github.com/pbiron/wxr/issues?q=is%3Aissue+label%3A%22meta+trac+ticket%22
</xs:documentation>
<xs:documentation>
In addition to the change in namespace URI, the proposed version of WXR represented by this
schema also makes a number of changes to WXR element names from what they were in past versions.
Some of the most prominent changes are: 1) <wp:tag/> and <wp:category/> both use <wxr:term/>;
2) <wp:author/> has been changed to <wxr:user/>; and 3) <wp:post_id/> has been changed to <wxr:id/>.
At first blush these changes might seem to be breaking backwards compatibility, which would
be a bad thing. However, there is a simple transform from WXR 1.0, 1.1 and 1.2
to this proposed WXR version. This transform can be hooked into 'wp_handle_upload' by the
importer, so that the importer only has to deal with this proposed version of WXR.
I've written 5 different versions of that transform: 1) "simple" XSLT 1.0; 2) XSLT 1.0;
3) XSLT 2.0; 3) XSLT 3.0; and 4) a PHP class. The XSLT transforms are much easier to understand
and maintain (XSLT being a declaritive programming language that is specifically designed to
transform XML), and the XSLT 3.0 transform is the "preferred" transform because compliant
XSLT 3.0 processors can use it in streaming manner, i.e., they do not have to load the
entire WXR instance into a DOM object before transforming it.
Unfortunately, a standard PHP install only includes an XSLT 1.0 compliant XSLT processor :-(
Hence, the PHP class I wrote.
These tranforms are available at http://github.com/pbiron/wxr/1.3-proposed/xslt.
</xs:documentation>
<xs:documentation>
@todo further study the RSS Board's best practices (@link http://www.rssboard.org/rss-profile) and TRY to
conform to it...and document the differences, including WHY a recommendation is not followed.
</xs:documentation>
</xs:annotation>
<xs:import schemaLocation='rss-20.xsd'>
<xs:annotation>
<xs:documentation>
This import of the RSS schema document is not technically necessary. However, it makes generating
documentation from this schema document easier.
</xs:documentation>
</xs:annotation>
</xs:import>
<xs:simpleType name='email'>
<xs:restriction base='xs:string'>
<xs:annotation>
<xs:documentation>
@todo check whether WP does any kind of sanitation on email addresses, and if
so, define this as a non-trivial restriction of xs:string with
a regex pattern that matches the range of that sanitiation function.
</xs:documentation>
</xs:annotation>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='date_time'>
<xs:annotation>
<xs:documentation>
Represents the lexical space of the date/time 'fields' of a WP_Post.
</xs:documentation>
<xs:documentation>
@todo consider doing this as a trivial restriction of xs:string, because
it might not be worth the trouble of maintaining the regex in the <xs:pattern />.
</xs:documentation>
</xs:annotation>
<xs:union>
<xs:simpleType>
<xs:annotation>
<xs:documentation>
@todo I borrowed this regex from https://stackoverflow.com/a/15967451/7751811.
While I've tested this with several exports from multiple WP sites and
it appears to be correct, I haven't done a detailed analysis of the regex
to prove it to myself that it is actually correct.
</xs:documentation>
<xs:documentation>
Actually, upon further testing it regex was wrong: it had incorrect
months which can have 31 vs only 30 days. I have corrected that.
</xs:documentation>
</xs:annotation>
<xs:restriction base='xs:string'>
<xs:pattern value='((((19|20)([2468][048]|[13579][26]|0[48])|2000)-02-29|((19|20)[0-9]{2}-(0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(19|20)[0-9]{2}-(0[2469]|11)-(0[1-9]|[12][0-9]|30)|(19|20)[0-9]{2}-02-(0[1-9]|1[0-9]|2[0-8])))\s([01][0-9]|2[0-3]):([012345][0-9]):([012345][0-9]))' />
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='0000-00-00 00:00:00'>
<xs:annotation>
<xs:documentation>
@todo I'm not sure why, but I've seen exports that have this value for one
or another of the date/time fields.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name='boolean_as_int_string'>
<xs:annotation>
<xs:documentation>
Represents a boolean value as a string ('0' for false, '1' for true).
</xs:documentation>
</xs:annotation>
<xs:restriction base='xs:boolean'>
<xs:pattern value='0|1' />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='comment_ping_status'>
<xs:annotation>
<xs:documentation>
Represents the (comment|ping)_status of a post.
</xs:documentation>
</xs:annotation>
<xs:restriction base='xs:string'>
<xs:annotation>
<xs:documentation>
@todo check whether this enumerated lexical space covers all possible values,
i.e., this may be too restrictive as it might be possible for plugins
to use some other status.
</xs:documentation>
<xs:documentation>
@todo I've seen exports where <wxr:comment_status/> and <wxr:comment_status/>
were 'close' and other times they were 'closed' (within the same WXR document).
I would think it should be limited to one or the other of those values but not both.
</xs:documentation>
</xs:annotation>
<xs:enumeration value='open' />
<xs:enumeration value='closed' />
<xs:enumeration value='close' />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='key'>
<xs:annotation>
<xs:documentation>
Represents the lexical space of a WP 'key'.
</xs:documentation>
</xs:annotation>
<xs:restriction base='xs:string'>
<xs:annotation>
<xs:documentation>
@todo define this as a non-trivial restriction of xs:string whose lexical space is the
range of sanitize_key(), once I have time to figure out what that range is.
</xs:documentation>
</xs:annotation>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='post_type'>
<xs:annotation>
<xs:documentation>
Represents the lexical space of a post_type name.
</xs:documentation>
</xs:annotation>
<xs:restriction base='wxr:key'>
<xs:maxLength value='20' />
</xs:restriction>
</xs:simpleType>
<xs:attribute name='version' type='xs:decimal'>
<xs:annotation>
<xs:documentation>
Represents the version of WXR used in the instance.
</xs:documentation>
<xs:documentation>
Note: a fixed value is not specified for this attribute to enable forwards-compatible
processing (i.e., future versions of WXR).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='slug' type='wxr:key'>
<xs:annotation>
<xs:documentation>
Represents the slug of a WP_Term that is associated with a WP_Post.
</xs:documentation>
<xs:documentation>
This is a replacement for category/@nicename, which is not compliant with the RSS
spec, since attributes on standard RSS elements that are not defined in the RSS spec
MUST be in a non-empty namespace.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='wp_version' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the version of WP that generated the WXR export.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:group name='channel_elements'>
<xs:annotation>
<xs:documentation>
This model group consists of the WXR elements that are output at the rss/channel level.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element name='site_url' type='xs:anyURI' minOccurs='0'>
<xs:annotation>
<xs:documentation>
Represents the URL of the site for which a WXR file is an export.
In a non-multisite setup, element will either be absent or have the
same value as /rss/channel/link.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='user' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents an single WP_User.
</xs:documentation>
<xs:documentation>
@todo open a trac ticket to consider changing the
<wp:author/> element in WXR 1.0, 1.1 and 1.2 to <wxr:user/>. While
the standard exporter (as of WP 4.8) only outputs users who are also
authors of the posts it exports, my proposed rewrite of the exporter
provides hooks that allow plugins to export users independent of
whether they are the authors of any posts in the export.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='wxr:open_content'>
<xs:all>
<xs:element name='id' type='xs:positiveInteger'>
<xs:annotation>
<xs:documentation>
Represents the ID of the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='login' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the user_login of the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='email' type='wxr:email'>
<xs:annotation>
<xs:documentation>
Represents the user_email of the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='display_name' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the display_name of the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='first_name' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the value of the usermeta with whose meta_key is 'first_name' of the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='last_name' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the value of the usermeta with whose meta_key is 'last_name' of the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='meta' type='wxr:meta' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents a single usermeta associated with the WP_User.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name='term' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents a single WP_Term.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='wxr:open_content'>
<xs:all>
<xs:element name='id' type='xs:positiveInteger'>
<xs:annotation>
<xs:documentation>
Represents the term_id of the WP_Term.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='taxonomy' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the term_taxonomy of the WP_Term.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='slug' type='wxr:key'>
<xs:annotation>
<xs:documentation>
Represents the slug of the WP_Term.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='parent' type='wxr:key' minOccurs='0'>
<xs:annotation>
<xs:documentation>
Represents the slug of parent of the WP_Term.
</xs:documentation>
<xs:documentation>
Will be absent if the term has no parent.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='name' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the name of the WP_Term.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='description' type='xs:string' minOccurs='0'>
<xs:annotation>
<xs:documentation>
Represents the description of the WP_Term.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='meta' type='wxr:meta' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents a single term meta associated with the WP_Term.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name='link' minOccurs='0' maxOccurs='unbounded'>
<xs:complexType>
<xs:complexContent>
<xs:extension base='wxr:open_content'>
<xs:all>
<xs:element name='id' type='xs:positiveInteger'/>
<xs:element name='url' type='xs:anyURI'/>
<xs:element name='name' type='wxr:key'/>
<xs:element name='image' type='xs:anyURI'/>
<xs:element name='target'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='_blank'/>
<xs:enumeration value='_top'/>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name='description' type='xs:string'/>
<xs:element name='visible'>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:enumeration value='Y'/>
<xs:enumeration value='N'/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name='owner' type='wxr:key'/>
<xs:element name='rating' type='xs:int'/>
<xs:element name='updated' type='wxr:date_time'/>
<xs:element name='rel' type='xs:string'/>
<xs:element name='notes' type='xs:string'/>
<xs:element name='rss' type='xs:anyURI'/>
<xs:element name='category' type='wxr:key' minOccurs='0' maxOccurs='unbounded'/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:all>
</xs:group>
<xs:group name='post_elements'>
<xs:annotation>
<xs:documentation>
This model group contains of the WXR elements that represent those parts of a WP_Post for which there is no standard
RSS element.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element name='id' type='xs:positiveInteger'>
<xs:annotation>
<xs:documentation>
Represents the ID of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='date' type='wxr:date_time'>
<xs:annotation>
<xs:documentation>
Represents the post_date of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='date_gmt' type='wxr:date_time'>
<xs:annotation>
<xs:documentation>
Represents the post_date_gmt of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='comment_status' type='wxr:comment_ping_status'>
<xs:annotation>
<xs:documentation>
Represents the comment_status of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='ping_status' type='wxr:comment_ping_status'>
<xs:annotation>
<xs:documentation>
Represents the ping_status of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='name' type='wxr:key'>
<xs:annotation>
<xs:documentation>
Represents the slug of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='status' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the post_status of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='parent' type='xs:nonNegativeInteger'>
<xs:annotation>
<xs:documentation>
Represents the ID of the parent of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='menu_order' type='xs:int'>
<xs:annotation>
<xs:documentation>
Represents the menu_order of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='type' type='wxr:post_type'>
<xs:annotation>
<xs:documentation>
Represents the post_type of the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='password' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the post_password of the WP_Post. Will be the empty string when the
post is NOT password protected.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='is_sticky' type='wxr:boolean_as_int_string'>
<xs:annotation>
<xs:documentation>
Represents whether the WP_Post is sticky.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='attachment_url' type='xs:anyURI' minOccurs='0'>
<xs:annotation>
<xs:documentation>
Represents the URL for the WP_Post whose post_type is 'attachment'. Will not be present if
the post_type is not 'attachment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='meta' type='wxr:meta' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents a single post meta associated with the WP_Post.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='comment' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents a single WP_Comment associated with the WP_Post.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='wxr:open_content'>
<xs:all>
<xs:element name='id' type='xs:positiveInteger'>
<xs:annotation>
<xs:documentation>
Represents the ID of the WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='author' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the comment_author of the WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='author_email' type='wxr:email'>
<xs:annotation>
<xs:documentation>
Represents the comment_author_email of the WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='author_url' type='xs:anyURI'>
<xs:annotation>
<xs:documentation>
Represents the comment_author_url of the WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='author_IP'>
<xs:annotation>
<xs:documentation>
Represents the comment_author_IP of the WP_Comment.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base='xs:string'>
<xs:pattern value='\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|'>
<xs:annotation>
<xs:documentation>
This pattern matches an IPv4 IP address
(or the empty string, which can sometimes occur).
</xs:documentation>
</xs:annotation>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name='date' type='wxr:date_time'>
<xs:annotation>
<xs:documentation>
Represents the comment_date of a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='date_gmt' type='wxr:date_time'>
<xs:annotation>
<xs:documentation>
Represents the comment_date_gmt of a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='content' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the comment_content of a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='approved' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the comment_approved of a WP_Comment.
</xs:documentation>
<xs:documentation>
@todo Should the type of this element be a restriction
of xs:string that enumerates the possible values? At this
time I'm not sure what the values for that enumeration
would be so I'm leaving it as xs:string.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='type' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the comment_type of a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='parent' type='xs:nonNegativeInteger'>
<xs:annotation>
<xs:documentation>
Represents the comment_parent of a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='user_id' type='xs:nonNegativeInteger'>
<xs:annotation>
<xs:documentation>
Represents the user_id of a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='meta' type='wxr:meta' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>
Represents a single meta associated with a WP_Comment.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:all>
</xs:group>
<xs:complexType name='open_content' abstract='true'>
<xs:annotation>
<xs:documentation>
This type serves as the base type for all WXR elements that have complexContent.
</xs:documentation>
</xs:annotation>
<xs:openContent>
<xs:any notNamespace='##local' processContents='lax'>
<xs:annotation>
<xs:documentation>
Allow alements from any non-empty namespace (including the
WXR namespace) to make forwards-compatible processing
easier (to account for additions to WXR in future versions).
</xs:documentation>
</xs:annotation>
</xs:any>
</xs:openContent>
<xs:all>
<xs:annotation>
<xs:documentation>
This empty all model group exists only so that we can extend this
type via an all group. The need for this is a consequence of
the rules for extension in XML Schema 1.1.
</xs:documentation>
</xs:annotation>
</xs:all>
<xs:anyAttribute processContents='lax'>
<xs:annotation>
<xs:documentation>
Allow attributes from any namespace (including the empty namespace
and the WXR namespace) to make forwards-compatible processing
easier (to account for additions to WXR in future versions).
</xs:documentation>
</xs:annotation>
</xs:anyAttribute>
</xs:complexType>
<xs:complexType name='meta'>
<xs:annotation>
<xs:documentation>
Represents a single WP Meta (e.g., (post|term|comment|user)_meta).
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base='wxr:open_content'>
<xs:all>
<xs:element name='key' type='wxr:key'>
<xs:annotation>
<xs:documentation>
Represents the meta_key of the meta.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='value' type='xs:string'>
<xs:annotation>
<xs:documentation>
Represents the meta_value of the meta.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>