Skip to content

Instantly share code, notes, and snippets.

@gortok
Created September 8, 2012 01:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gortok/3671220 to your computer and use it in GitHub Desktop.
Save gortok/3671220 to your computer and use it in GitHub Desktop.
XSDs generated from Wordpress WXR Format
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://wordpress.org/export/1.0/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://wordpress.org/export/1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="wxr_version" type="xs:decimal" />
<xs:element name="base_site_url" type="xs:string" />
<xs:element name="base_blog_url" type="xs:string" />
<xs:element name="category">
<xs:complexType>
<xs:sequence>
<xs:element name="category_nicename" type="xs:string" />
<xs:element name="category_parent" type="xs:string" />
<xs:element name="cat_name" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="tag">
<xs:complexType>
<xs:sequence>
<xs:element name="tag_slug" type="xs:string" />
<xs:element name="tag_name" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="encoded" type="xs:string" />
<xs:element name="post_id" type="xs:unsignedByte" />
<xs:element name="post_date" type="xs:string" />
<xs:element name="post_date_gmt" type="xs:string" />
<xs:element name="comment_status" type="xs:string" />
<xs:element name="ping_status" type="xs:string" />
<xs:element name="post_name" type="xs:string" />
<xs:element name="status" type="xs:string" />
<xs:element name="post_parent" type="xs:unsignedByte" />
<xs:element name="menu_order" type="xs:unsignedByte" />
<xs:element name="post_type" type="xs:string" />
<xs:element name="post_password" />
<xs:element name="postmeta">
<xs:complexType>
<xs:sequence>
<xs:element name="meta_key" type="xs:string" />
<xs:element name="meta_value" type="xs:unsignedInt" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="comment">
<xs:complexType>
<xs:sequence>
<xs:element name="comment_id" type="xs:unsignedByte" />
<xs:element name="comment_author" type="xs:string" />
<xs:element name="comment_author_email" type="xs:string" />
<xs:element name="comment_author_url" type="xs:string" />
<xs:element name="comment_author_IP" type="xs:string" />
<xs:element name="comment_date" type="xs:string" />
<xs:element name="comment_date_gmt" type="xs:string" />
<xs:element name="comment_content" type="xs:string" />
<xs:element name="comment_approved" type="xs:unsignedByte" />
<xs:element name="comment_type" />
<xs:element name="comment_parent" type="xs:unsignedByte" />
<xs:element name="comment_user_id" type="xs:unsignedByte" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:wp="http://wordpress.org/export/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:excerpt="http://wordpress.org/export/1.0/" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://wordpress.org/export/1.0/" />
<xs:import namespace="http://purl.org/dc/elements/1.1/" />
<xs:import namespace="http://purl.org/rss/1.0/modules/content/" />
<xs:element name="rss">
<xs:complexType>
<xs:sequence>
<xs:element name="channel">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
<xs:element name="link" type="xs:string" />
<xs:element name="description" type="xs:string" />
<xs:element name="pubDate" type="xs:string" />
<xs:element name="generator" type="xs:string" />
<xs:element name="language" type="xs:string" />
<xs:element ref="excerpt:wxr_version" />
<xs:element ref="excerpt:base_site_url" />
<xs:element ref="excerpt:base_blog_url" />
<xs:element maxOccurs="unbounded" ref="excerpt:category" />
<xs:element maxOccurs="unbounded" ref="excerpt:tag" />
<xs:element maxOccurs="unbounded" name="item">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
<xs:element name="link" type="xs:string" />
<xs:element name="pubDate" type="xs:string" />
<xs:element ref="dc:creator" />
<xs:element minOccurs="0" maxOccurs="unbounded" name="category">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="domain" type="xs:string" use="optional" />
<xs:attribute name="nicename" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="guid">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="isPermaLink" type="xs:boolean" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="description" />
<xs:element ref="content:encoded" />
<xs:element ref="excerpt:encoded" />
<xs:element ref="excerpt:post_id" />
<xs:element ref="excerpt:post_date" />
<xs:element ref="excerpt:post_date_gmt" />
<xs:element ref="excerpt:comment_status" />
<xs:element ref="excerpt:ping_status" />
<xs:element ref="excerpt:post_name" />
<xs:element ref="excerpt:status" />
<xs:element ref="excerpt:post_parent" />
<xs:element ref="excerpt:menu_order" />
<xs:element ref="excerpt:post_type" />
<xs:element ref="excerpt:post_password" />
<xs:element minOccurs="0" maxOccurs="unbounded" ref="excerpt:postmeta" />
<xs:element minOccurs="0" maxOccurs="unbounded" ref="excerpt:comment" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:decimal" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://purl.org/dc/elements/1.1/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://purl.org/dc/elements/1.1/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="creator" type="xs:string" />
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://purl.org/rss/1.0/modules/content/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://purl.org/rss/1.0/modules/content/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="encoded" type="xs:string" />
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment