Friday, July 23, 2010



Windows Sidebar Gadget's Manifest's Schema

While developing my app (see previous post) i came across a need to validate my generated xml with a schema. I searched around the internet but couldn’t find any schema for the Windows Sidebar Gadget.xml. Many people were asking for one various forums but they got no reply. I needed it too so i thought why not create one for myself, since i didn't knew much about creating xml schemas so referenced some websites and wrote the following schema in Visual Studio. Using Visual Studio made it all easier for me to write a schema cause it helped me by automatically completing and closing tags and it also suggested various attributes i can set, through its "intellisense".  Visual Studio obviously boosts productivity and makes learning new things easy.
Following is the schema code for the Windows sidebar gadget’s manifest.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="SidebarGadget"
  <xs:element name="gadget" type="Tgadget"/>
  <xs:complexType name="Tgadget">
    <xs:sequence maxOccurs="1">
      <xs:element name="name" type="xs:string"/>
      <xs:element name="namespace" type="xs:string"/>
      <xs:element name="version" type="xs:string"/>
      <xs:element name="author" type="Tauthor"/>
      <xs:element name="copyright" type="xs:string"/>
      <xs:element name="description" type="xs:string"/>
      <xs:element name="icons" type="Ticons" maxOccurs="unbounded"/>
      <xs:element name="hosts" type="Thosts"/>
  <xs:complexType name="Tauthor">
      <xs:element name="info" type="Turl"/>
      <xs:element name="logo" type="Tlogo"/>
    <xs:attribute name="name" type="xs:string"/>
  <xs:complexType name="Turl">
    <xs:attribute name="url" type="xs:string"/>
  <xs:complexType name="Tlogo">
    <xs:attribute name="src" type="xs:string"/>
  <xs:complexType name="Ticons">
      <xs:element name="icon" type="Ticon"/>
  <xs:complexType name="Ticon">
    <xs:attribute name="hight" type="xs:nonNegativeInteger"/>
    <xs:attribute name="width" type="xs:nonNegativeInteger"/>
    <xs:attribute name="src" type="xs:string"/>
  <xs:complexType name="Thosts">
      <xs:element name="host" type ="Thost"/>
  <xs:complexType name="Thost">
      <xs:element name="base" type="Tbase"/>
      <xs:element name="permission" type="xs:string"/>
      <xs:element name="platform" type="Tplatform"/>
      <xs:element name="autoscaleDPI" type="xs:boolean" nillable="true"/>
      <xs:element name="defaultImage" type="TdefaultImage"/>
    <xs:attribute name="name" type="xs:string" default="sidebar"/>
  <xs:complexType name="Tbase">
    <xs:attribute name="type" type="xs:string"/>
    <xs:attribute name="apiVersion" type="xs:string"/>
    <xs:attribute name="src" type="xs:string"/>
  <xs:complexType name="Tplatform">
    <xs:attribute name="minPlatformVersion" type="xs:double"/>
  <xs:complexType name="TdefaultImage">
    <xs:attribute name="src" type="xs:short"/>
I hope this could be useful to someone who need it and don't have time to make one.
Comments or suggestion are welcome...


Anonymous said...

Queen Casino & Slots Review - Slots & Casino Games
Queen クイーンカジノ Casino is the sister site of Betsoft Gaming. If you bet365 are a lover of slots, leovegas we recommend checking out the slot

9wldhghdi0 said...

Create functional working prototypes, proof-of-concept models, show items, and extra. STL file with non-manifold edges shared by a couple of bodies This error will rarely lead to any issues throughout slicing, but it should be avoided because the intentions of the designer aren't clear. best bathroom space heater STL file with intersecting faces Intersecting faces usually lead to failures throughout slicing, because the software program can not acknowledge which areas are "inside" the model and which are "outdoors".

u471q85mw1 said...

Before the arrival of the CNC machine store, all machining tools was operated manually or mechanically, which meant that the red shower curtains accuracy of machined elements depended largely on the skill of the machine operator. Computer Numerical Control turned commonplace within the latter half of the 20th century, altering machine retailers forever. Most elements require a surface finish of some sort, and various items of apparatus are used to buff, polish, sandblast and color them. Grinding is often employed as a ending process, because of|as a result of} it offers a high surface high quality. I perceive that normal textual content messaging charges might apply to any messages received from Curaleaf. I also perceive that I might revoke this permission and discontinue my participation in Curaleaf’s textual content message marketing service by replying “STOP” or "END" to a textual content message received from Curaleaf.

Post a Comment