XML Schema

Topics: ASP.NET 2.0, Controls
Apr 3, 2009 at 5:03 PM
Hey guys,

I had a question.

Where is the XML schema for the RSS feeds page stored in blogengine projects??
If anyone does ask me to share teh schema for those feeds what do i share?? where do i refer to? as i dont see any xsd files in projects.

Also if i want to add start/end time for  posts using dublin core standard , how do i do it ( may be using some tags)? I want to make sure the RSS standards is not affected. Is that possible?? Where and what changes do i make ??
Apr 6, 2009 at 3:34 PM
Hey guys plzzz someone reply to my above question
Coordinator
Apr 6, 2009 at 5:35 PM
Take a look at your web.config in the http handlers section, you'll see RSS handler registered there:

add verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" validate="false"

In the run time RsdHandler will generate RSS file for your site on the client request, that's where you need to look for any custom changes.
Apr 6, 2009 at 8:18 PM

Hey

Thanx for replying  rtur. But is there any XML schema as such??.I mean what can i show if anyone asks me to give the schema for the RSS post?

Also if i want to add start/end time for  posts using dublin core standard , how do i do it ( may be using some tags)? I want to make sure the RSS standards is not affected. Is that possible?? Where and what changes do i make ?? Please if you can mention a little bit in detail.
 

I am not really a technical guy.So sorry i ask you any simple or invalid questions.

Bacca

Coordinator
Apr 6, 2009 at 10:03 PM
Physically, there is no such file. You can generate it with a tool or online service. For example, I generated schema below by pushing RSS button on my site, saving source as .XML file and then using online schema generator (http://www.hitsw.com/xml_utilites/). That's your schema for the post. So I guess you'll need to add code to http handler to create that new fields, and then re-generate schema - which is kinda involved not to mention you'll need to re-compile core dll.

<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="atom10:link">
    <xs:complexType>
      <xs:attribute name="rel" type="xs:NMTOKEN" use="required" />
      <xs:attribute name="href" type="xs:string" use="required" />
      <xs:attribute name="type" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="author">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="blogChannel:blink">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="blogChannel:blogRoll">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="category">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="channel">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title" />
        <xs:element ref="description" />
        <xs:element ref="link" />
        <xs:element ref="docs" />
        <xs:element ref="generator" />
        <xs:element ref="language" />
        <xs:element ref="blogChannel:blogRoll" />
        <xs:element ref="blogChannel:blink" />
        <xs:element ref="dc:creator" />
        <xs:element ref="dc:title" />
        <xs:element ref="geo:lat" />
        <xs:element ref="geo:long" />
        <xs:element ref="atom10:link" />
        <xs:element ref="item" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="comments">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="dc:creator">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="dc:publisher">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="dc:title">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="description">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="docs">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="feedburner:origLink">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="generator">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="geo:lat">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="geo:long">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="guid">
    <xs:complexType mixed="true">
      <xs:attribute name="isPermaLink" type="xs:NMTOKEN" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="item">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title" />
        <xs:element ref="description" />
        <xs:element ref="link" />
        <xs:element ref="author" />
        <xs:element ref="comments" />
        <xs:element ref="guid" />
        <xs:element ref="pubDate" />
        <xs:element ref="category" maxOccurs="unbounded" />
        <xs:element ref="dc:publisher" />
        <xs:element ref="pingback:server" />
        <xs:element ref="pingback:target" />
        <xs:element ref="slash:comments" />
        <xs:element ref="trackback:ping" />
        <xs:element ref="wfw:comment" />
        <xs:element ref="wfw:commentRss" />
        <xs:element ref="feedburner:origLink" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="language">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="link">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="pingback:server">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="pingback:target">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="pubDate">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="rss">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="channel" />
      </xs:sequence>
      <xs:attribute name="version" type="xs:NMTOKEN" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="slash:comments">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="title">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="trackback:ping">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="wfw:comment">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="wfw:commentRss">
    <xs:complexType mixed="true" />
  </xs:element>

</xs:schema>
Apr 6, 2009 at 11:00 PM
Hey Rthur,

I tried doing that before but for me it only generates  these 2 lines :(

  <?xml version="1.0" encoding="UTF-8" ?>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" />


Below is my XML document. The Highlighted things are the new additions to blogengine code.






<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"

xmlns:media="
http://search.yahoo.com/mrss/" xmlns:fh="http://purl.org/syndication/history/1.0" xmlns:fa="|http://purl.org/atompub/age/1.0|">
 
<channel>
    <title>Table Top Media Blog</title>
    <description>Driven by Success</description>
    <link>http://localhost:1674/BlogEngine.Web/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.5.0</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://localhost:1674/BlogEngine.Web/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>My name</dc:creator>
    <dc:title>Table Top Media Blog</dc:title>
    <item>
      <title>future</title>
      <description>&lt;img src="http://localhost:1674/BlogEngine.Web/image.axd?picture=2009%2f4%2fmovies1.jpg" alt="" /&gt;</description>
      <link>http://localhost:1674/BlogEngine.Web/post/future.aspx</link>

      <media:content>
        <media:thumbnail url="
http://localhost:1674/BlogEngine.Web/image.axd?picture=2009%2f4%2fmovies1.jpg" height="98" width="145" />
      </media:content>

      <author>name.nospam@nospam.example.com (Admin)</author>
      <comments>http://localhost:1674/BlogEngine.Web/post/future.aspx#comment</comments>
      <guid>http://localhost:1674/BlogEngine.Web/post.aspx?id=0939ea54-0e3f-434a-b1af-af8c15ee588a</guid>
      <pubDate>Mon, 06 Apr 2009 16:49:00 -0500</pubDate>

      <stopDate>Sat, 12 Dec 2020 05:21:00 -0500</stopDate>

      <category>Table top media</category>
      <dc:publisher>Admin</dc:publisher>
      <pingback:server>http://localhost:1674/BlogEngine.Web/pingback.axd</pingback:server>
      <pingback:target>http://localhost:1674/BlogEngine.Web/post.aspx?id=0939ea54-0e3f-434a-b1af-af8c15ee588a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://localhost:1674/BlogEngine.Web/trackback.axd?id=0939ea54-0e3f-434a-b1af-af8c15ee588a</trackback:ping>
      <wfw:comment>http://localhost:1674/BlogEngine.Web/post/future.aspx#comment</wfw:comment>
      <wfw:commentRss>http://localhost:1674/BlogEngine.Web/syndication.axd?post=0939ea54-0e3f-434a-b1af-af8c15ee588a</wfw:commentRss>
    </item>

item2, item3....................


 </channel>
</rss>


Please help me out....
Apr 7, 2009 at 3:58 PM
Any answer to above question?
Coordinator
Apr 7, 2009 at 5:16 PM
I saved your XML and ran it through online schema generator as suggested above. This is a result:
<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="author">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="blogChannel:blink">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="blogChannel:blogRoll">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="category">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="channel">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title" />
        <xs:element ref="description" />
        <xs:element ref="link" />
        <xs:element ref="docs" />
        <xs:element ref="generator" />
        <xs:element ref="language" />
        <xs:element ref="blogChannel:blogRoll" />
        <xs:element ref="blogChannel:blink" />
        <xs:element ref="dc:creator" />
        <xs:element ref="dc:title" />
        <xs:element ref="item" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="comments">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="dc:creator">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="dc:publisher">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="dc:title">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="description">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="docs">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="generator">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="guid">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="item">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title" />
        <xs:element ref="description" />
        <xs:element ref="link" />
        <xs:element ref="media:content" />
        <xs:element ref="author" />
        <xs:element ref="comments" />
        <xs:element ref="guid" />
        <xs:element ref="pubDate" />
        <xs:element ref="stopDate" />
        <xs:element ref="category" />
        <xs:element ref="dc:publisher" />
        <xs:element ref="pingback:server" />
        <xs:element ref="pingback:target" />
        <xs:element ref="slash:comments" />
        <xs:element ref="trackback:ping" />
        <xs:element ref="wfw:comment" />
        <xs:element ref="wfw:commentRss" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="language">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="link">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="media:content">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="media:thumbnail" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="media:thumbnail">
    <xs:complexType>
      <xs:attribute name="height" type="xs:NMTOKEN" use="required" />
      <xs:attribute name="url" type="xs:string" use="required" />
      <xs:attribute name="width" type="xs:NMTOKEN" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="pingback:server">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="pingback:target">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="pubDate">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="rss">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="channel" />
      </xs:sequence>
      <xs:attribute name="version" type="xs:NMTOKEN" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="slash:comments">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="stopDate">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="title">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="trackback:ping">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="wfw:comment">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="wfw:commentRss">
    <xs:complexType mixed="true" />
  </xs:element>

</xs:schema>