andrewbadera
Programmer
Can anyone help me generate a schema for the following XML?
<?xml version="1.0" encoding="iso-8859-1" ?>
<story>
<storyfilename>
<![CDATA[0125BUO_gang22.xml]]>
</storyfilename>
<storyorder>0</storyorder>
<section>
<![CDATA[1]]>
</section>
<storytype>
<![CDATA[6]]>
</storytype>
<subsection>
<![CDATA[ent]]>
</subsection>
<byline>
<![CDATA[Patrick Flanigan]]>
</byline>
<dateeline>
<![CDATA[Tuesday, November 11, 2003]]>
</dateeline>
<edition>
<![CDATA[Tuesday, November 11, 2003]]>
</edition>
<headline>
<![CDATA[title;<p>title 2<p>]]>
</headline>
<subhead>
<![CDATA[]]>
</subhead>
<summary>
<![CDATA[summary]]>
</summary>
<source>
<![CDATA[Staff Writer]]>
</source>
<storytext>
<![CDATA[story]]>
<p>PFLANIGA@DemocratandChronicle.com<p>]]>
</storytext>
<sidebar>
<header><![CDATA[If you go<p>]]></header>
<text><![CDATA[ second story text]]>
</sidebar>
<photo filename=""
height=""
width="">
<photographer>
<![CDATA[]]>
</photographer>
<caption>
<![CDATA[]]>
</caption>
</photo>
</story>
So far I have:
<?xml version="1.0" encoding="UTF-8"?>
<Schema name="schEntImport" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
<ElementType name="byline" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="caption" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="cciID" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="dateeline" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="header" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="headline" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="section" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="sidebar" model="closed" content="eltOnly" order="seq">
<element type="header" minOccurs="1" maxOccurs="1"/>
<element type="text" minOccurs="1" maxOccurs="1"/>
</ElementType>
<ElementType name="source" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="story" model="closed" content="eltOnly" order="seq">
<AttributeType name="xmlns" dt:type="string"/>
<attribute type="xmlns"/>
<element type="cciID" minOccurs="1" maxOccurs="1"/>
<element type="storyfilename" minOccurs="1" maxOccurs="1"/>
<element type="storyorder" minOccurs="1" maxOccurs="1"/>
<element type="section" minOccurs="1" maxOccurs="1"/>
<element type="storytype" minOccurs="1" maxOccurs="1"/>
<element type="subsection" minOccurs="1" maxOccurs="1"/>
<element type="byline" minOccurs="1" maxOccurs="1"/>
<element type="dateeline" minOccurs="1" maxOccurs="1"/>
<element type="edition" minOccurs="1" maxOccurs="1"/>
<element type="headline" minOccurs="1" maxOccurs="1"/>
<element type="subhead" minOccurs="1" maxOccurs="1"/>
<element type="summary" minOccurs="1" maxOccurs="1"/>
<element type="source" minOccurs="1" maxOccurs="1"/>
<element type="storytext" minOccurs="1" maxOccurs="1"/>
<element type="sidebar" minOccurs="1" maxOccurs="1"/>
<element type="photo" minOccurs="1" maxOccurs="1"/>
</ElementType>
<ElementType name="storyfilename" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="storytext" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="storytype" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="subhead" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="summary" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="text" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="story" sql:relation="tStory">
<element type="cciID" sql:field="idCCI" />
<element type="section" sql:field="idSection" />
<element type="storytype" sql:field="idSubSec" />
<element type="byline" sql:field="strByline" />
<element type="dateeline" sql:field="dtArticleDate" />
<element type="headline" sql:field="strHeadline" />
<element type="subhead" sql:field="strSubhead" />
<element type="summary" sql:field="strSummaryGraf" />
<element type="source" sql:field="strSource" />
<element type="storytext" sql:field="strText" />
</ElementType>
<ElementType name="sidebar" sql:relation="tStory">
<element type="header" sql:field="strSidebarHeader" />
<element type="text" sql:field="strSidebarText" />
</ElementType>
</Schema>
but I'm not sure that's handling the nested items properly ...
<?xml version="1.0" encoding="iso-8859-1" ?>
<story>
<storyfilename>
<![CDATA[0125BUO_gang22.xml]]>
</storyfilename>
<storyorder>0</storyorder>
<section>
<![CDATA[1]]>
</section>
<storytype>
<![CDATA[6]]>
</storytype>
<subsection>
<![CDATA[ent]]>
</subsection>
<byline>
<![CDATA[Patrick Flanigan]]>
</byline>
<dateeline>
<![CDATA[Tuesday, November 11, 2003]]>
</dateeline>
<edition>
<![CDATA[Tuesday, November 11, 2003]]>
</edition>
<headline>
<![CDATA[title;<p>title 2<p>]]>
</headline>
<subhead>
<![CDATA[]]>
</subhead>
<summary>
<![CDATA[summary]]>
</summary>
<source>
<![CDATA[Staff Writer]]>
</source>
<storytext>
<![CDATA[story]]>
<p>PFLANIGA@DemocratandChronicle.com<p>]]>
</storytext>
<sidebar>
<header><![CDATA[If you go<p>]]></header>
<text><![CDATA[ second story text]]>
</sidebar>
<photo filename=""
height=""
width="">
<photographer>
<![CDATA[]]>
</photographer>
<caption>
<![CDATA[]]>
</caption>
</photo>
</story>
So far I have:
<?xml version="1.0" encoding="UTF-8"?>
<Schema name="schEntImport" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
<ElementType name="byline" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="caption" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="cciID" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="dateeline" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="header" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="headline" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="section" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="sidebar" model="closed" content="eltOnly" order="seq">
<element type="header" minOccurs="1" maxOccurs="1"/>
<element type="text" minOccurs="1" maxOccurs="1"/>
</ElementType>
<ElementType name="source" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="story" model="closed" content="eltOnly" order="seq">
<AttributeType name="xmlns" dt:type="string"/>
<attribute type="xmlns"/>
<element type="cciID" minOccurs="1" maxOccurs="1"/>
<element type="storyfilename" minOccurs="1" maxOccurs="1"/>
<element type="storyorder" minOccurs="1" maxOccurs="1"/>
<element type="section" minOccurs="1" maxOccurs="1"/>
<element type="storytype" minOccurs="1" maxOccurs="1"/>
<element type="subsection" minOccurs="1" maxOccurs="1"/>
<element type="byline" minOccurs="1" maxOccurs="1"/>
<element type="dateeline" minOccurs="1" maxOccurs="1"/>
<element type="edition" minOccurs="1" maxOccurs="1"/>
<element type="headline" minOccurs="1" maxOccurs="1"/>
<element type="subhead" minOccurs="1" maxOccurs="1"/>
<element type="summary" minOccurs="1" maxOccurs="1"/>
<element type="source" minOccurs="1" maxOccurs="1"/>
<element type="storytext" minOccurs="1" maxOccurs="1"/>
<element type="sidebar" minOccurs="1" maxOccurs="1"/>
<element type="photo" minOccurs="1" maxOccurs="1"/>
</ElementType>
<ElementType name="storyfilename" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="storytext" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="storytype" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="subhead" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="summary" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="text" model="closed" content="textOnly" dt:type="string"/>
<ElementType name="story" sql:relation="tStory">
<element type="cciID" sql:field="idCCI" />
<element type="section" sql:field="idSection" />
<element type="storytype" sql:field="idSubSec" />
<element type="byline" sql:field="strByline" />
<element type="dateeline" sql:field="dtArticleDate" />
<element type="headline" sql:field="strHeadline" />
<element type="subhead" sql:field="strSubhead" />
<element type="summary" sql:field="strSummaryGraf" />
<element type="source" sql:field="strSource" />
<element type="storytext" sql:field="strText" />
</ElementType>
<ElementType name="sidebar" sql:relation="tStory">
<element type="header" sql:field="strSidebarHeader" />
<element type="text" sql:field="strSidebarText" />
</ElementType>
</Schema>
but I'm not sure that's handling the nested items properly ...