Hi guys, keep getting an error: Cannot find the deceleration of element test when writing the xml. I have declared the element test in the schema but it appears to ignore it.

The schema is as follows:

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

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="Test"/>
<xs:simpleType name="Stringtype">   
    <xs:restriction base="xs:string"/>
<xs:simpleType name="Yeartype">   
    <xs:restriction base="xs:integer">
        <xs:pattern value="[0-9][0-9][0-9][0-9]"/>

<xs:simpleType name="Inttype">   
        <xs:restriction base="xs:positiveInteger"/>
<xs:simpleType name="Pagetype">
    <xs:restriction base="xs:string">
        <xs:pattern value="([0-9])*--([0-9])*"/>
<xs:simpleType name="Datetype">   
    <xs:restriction base="xs:date"/>
<xs:element name="Top" type="Stringtype"/>    
<xs:element name="Author" type="Stringtype"/>
<xs:complexType name="Titles">
        <xs:element name="Title" type="Stringtype"/>
        <xs:element name="BookTitle" type="Stringtype" minOccurs="0"/>

<xs:complexType name="Journal">
        <xs:element name="Journal" type="Stringtype" minOccurs="0"/>

<xs:complexType name="Publication">
            <xs:element name="Year" type="Yeartype"/>
            <xs:element name="Volume" type="Inttype" minOccurs="0"/>
<xs:element name="Pages" type="Pagetype"/>
<xs:complexType name="Number">
        <xs:element name="Number" type="Inttype" minOccurs="0"/>
<xs:element name="Month" type="Stringtype"/>
<xs:element name="DOI" type="Stringtype"/>
<xs:element name="Owner" type="Stringtype"/>
<xs:element name="Timestamp" type="Datetype"/>

The XML is:

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

<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Schema.xsd">
    <Author>Allen, G. and Davis, K. and Goodale, T. and Hutanu, A. and Kaiser,
        H. and Kielmann, T. and Merzky, A. and van Nieuwpoort, R. and Reinefeld,
        A. and Schintke, F. and Schott, T. and Seidel, E. and Ullmer, B.</Author>
    <Title>The grid application toolkit: toward generic and easy application
    programming interfaces for the grid</Title>
    <Journal>Proceedings of the IEEE</Journal>

Any help would go a long way.

6 Years
Discussion Span
Last Post by mrame
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.