473,238 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,238 software developers and data experts.

cvc-elt.1: Cannot find the declaration of element 'student'.What to do?

2
My xml document

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <student xmlns="hyperjam@mail/ru">
  3. <uek:copyright xmlns:uek="http://uek.krakow.pl/">Wydział Zarządzania, Uniwersytet Ekonomiczny, Krakуw</uek:copyright>
  4.  <name gender="female">Anna</name>
  5.  <surname>Postevka</surname>
  6.  <age>18</age>
  7.  <group faculty="applied informatic">KrDZIa1013</group>
  8.  <country_of_origin>Ukraine</country_of_origin>
  9.  <city>Rivne</city>
  10.  <semester>1</semester>
  11.  <listitem_books>
  12.   <!-- This list of items describe the collection of fantasy,horror and fiction books, which where published in 2012. I choose this genres, because I like them the most and i wanted you to know,what's new in the world of this kind of books -->
  13.    <book>
  14.      <title genre="fiction">The White Forest</title>
  15.      <original_title>Empyrean</original_title>
  16.      <author gender="male">Adam McOmber</author>
  17.      <year_of_publishing>2012</year_of_publishing>
  18.      <paper quality="matte"></paper>
  19.     </book>
  20.     <book>
  21.      <title genre="fiction">Dodger</title>
  22.      <original_title>The Dodger</original_title>
  23.      <author gender="female">Terry Pratchett</author>
  24.      <year_of_publishing>2012</year_of_publishing>
  25.      <paper quality="glossy"></paper>
  26.     </book>
  27.     <book>
  28.      <title genre="horror">Ten</title>
  29.      <original_title>Ten</original_title>
  30.      <author gender="female">Gretchen McNeil</author>
  31.      <year_of_publishing>2012</year_of_publishing>
  32.      <paper quality="matte"></paper>
  33.     </book>
  34.     <book>
  35.      <title genre="fiction">Let the Right One In</title>
  36.      <original_title>Lat den ratte komma in</original_title>
  37.      <author gender="male">John Ajvide Lindqvist</author>
  38.      <year_of_publishing>2012</year_of_publishing>
  39.      <paper quality="matte"></paper>
  40.     </book>
  41.     <book>
  42.      <title genre="fantasy">The Graveyard Book</title>
  43.      <original_title>The Graveyard Book</original_title>
  44.      <author gender="male">Neil Gaiman</author>
  45.      <year_of_publishing>2012</year_of_publishing>
  46.      <paper quality="glossy"></paper>
  47.     </book>
  48.     <book>
  49.      <title genre="fantasy">Cursed</title>
  50.      <original_title>Cursed</original_title>
  51.      <author gender="female">Jennifer L. Armentrout</author>
  52.      <year_of_publishing>2012</year_of_publishing>
  53.      <paper quality="matte"></paper>
  54.     </book>
  55.     <book>
  56.      <title genre="horror">The Necro Device</title>
  57.      <original_title>Mandiev</original_title>
  58.      <author gender="male">M.T. Dismuke</author>
  59.      <year_of_publishing>2012</year_of_publishing>
  60.      <paper quality="matte"></paper>
  61.     </book>
  62.     <book>
  63.      <title genre="horror">The Hallowed Ones</title>
  64.      <original_title>The Hallowed Ones</original_title>
  65.      <author gender="female">Laura Bickle</author>
  66.      <year_of_publishing>2012</year_of_publishing>
  67.      <paper quality="glossy"></paper>
  68.     </book>
  69.     <book>
  70.      <title genre="horror">Blackwood</title>
  71.      <original_title>Blackwood</original_title>
  72.      <author gender="female">Gwenda Bond</author>
  73.      <year_of_publishing>2012</year_of_publishing>
  74.      <paper quality="glossy"></paper>
  75.     </book>
  76.     <book>
  77.      <title genre="horror">Incarnation</title>
  78.      <original_title>Incarnation</original_title>
  79.      <author gender="female">Emma Cornwall</author>
  80.      <year_of_publishing>2012</year_of_publishing>
  81.      <paper quality="matte"></paper>
  82.     </book>
  83.   </listitem_books>
  84. </student>
and here is my schema

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ru="hyperjam@mail/ru" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  3.  
  4.  
  5.  <xsd:element name="student" type="StudentType"/>
  6.   <xsd:complexType name="StudentType"> 
  7.    <xsd:sequence>
  8.     <xsd:element name="name">
  9.      <xsd:complexType>
  10.       <xsd:attribute name="gender" use="required">
  11.        <xsd:simpleType>
  12.         <xsd:restriction base="xsd:string">
  13.          <xsd:pattern value="male|female"/>
  14.         </xsd:restriction>     
  15.        </xsd:simpleType>
  16.       </xsd:attribute>  
  17.      </xsd:complexType>
  18.     </xsd:element>
  19.     <xsd:element name="surname" type="xsd:string" />
  20.     <xsd:element name="age" type="xsd:integer" />
  21.     <xsd:element name="group">
  22.      <xsd:complexType>
  23.       <xsd:attribute name="faculty" type="xsd:string" use="required"/>
  24.      </xsd:complexType>
  25.     </xsd:element>
  26.     <xsd:element name="country_of_origin" type="xsd:string" />
  27.     <xsd:element name="city" type="xsd:string" />
  28.     <xsd:element name="semester" type="xsd:integer" />
  29.     <xsd:element name="listitem_books">
  30.      <xsd:complexType>
  31.       <xsd:sequence>
  32.        <xsd:element name="book" minOccurs ="10" maxOccurs="unbounded">
  33.           <xsd:complexType>
  34.             <xsd:sequence>
  35.               <xsd:element name="title">
  36.                <xsd:complexType>
  37.                  <xsd:simpleContent>
  38.                   <xsd:extension base="xsd:string">
  39.                    <xsd:attribute name="genre" use="required">
  40.                     <xsd:simpleType>
  41.                      <xsd:restriction base="xsd:string">
  42.                       <xsd:enumeration value="fantasy"/>
  43.                       <xsd:enumeration value="horror"/>
  44.                       <xsd:enumeration value="fiction"/>
  45.                     </xsd:restriction>
  46.                    </xsd:simpleType>
  47.                   </xsd:attribute>
  48.                  </xsd:extension>
  49.                 </xsd:simpleContent>
  50.                </xsd:complexType>
  51.               </xsd:element>
  52.               <xsd:element name="original_title" type="xsd:string" />
  53.               <xsd:element name="author">
  54.                <xsd:complexType>
  55.                  <xsd:simpleContent>
  56.                   <xsd:extension base="xsd:string">
  57.                    <xsd:attribute type="xsd:string" name="gender" use="required"/>
  58.                  </xsd:extension>
  59.                 </xsd:simpleContent>
  60.                </xsd:complexType>
  61.               </xsd:element>
  62.               <xsd:element name="year_of_publishing" type="xsd:integer" />
  63.               <xsd:element name="paper">
  64.                <xsd:complexType>
  65.                 <xsd:simpleContent>
  66.                  <xsd:extension base="xsd:string">
  67.                   <xsd:attribute name="quality" use="required">
  68.                    <xsd:simpleType>
  69.                     <xsd:restriction base="xsd:string">
  70.                      <xsd:enumeration value="glossy"/>
  71.                      <xsd:enumeration value="matte"/>
  72.                     </xsd:restriction>
  73.                    </xsd:simpleType>
  74.                   </xsd:attribute>
  75.                  </xsd:extension>
  76.                 </xsd:simpleContent>
  77.                </xsd:complexType>
  78.               </xsd:element>
  79.             </xsd:sequence>
  80.           </xsd:complexType>
  81.        </xsd:element>
  82.       </xsd:sequence>
  83.      </xsd:complexType>
  84.     </xsd:element>
  85.    </xsd:sequence>
  86.   </xsd:complexType> 
  87. </xsd:schema>
the validator says

Not valid.
Error - Line 2, 35: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 35; cvc-elt.1: Cannot find the declaration of element 'student'.
Nov 4 '12 #1
0 2206

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: anguo | last post by:
hi, everyone. i use mysql server version: 3.23.33. when i insert one line in a table, it can insert normaly. but then it display : null discard 9/udp sink null systat ...
3
by: dfielder | last post by:
I'm using the latest version of Xerces-J and parsing an XML file using the 'org.apache.xerces.parsers.SAXParser' parser. The problem I have is that a value such as 'file:///c:/#test#.jpg' is...
8
by: Dennis Gearon | last post by:
Is it possible to write functions for PL/C that have variable argument lists? I.E. UPPER( arg ) UPPER( arg, encoding_list ) LOWER( arg ) LOWER( arg, encoding_list ) SUBSTR( arg, arg, arg )
6
by: Tim Edwards | last post by:
Currently I'm running PostgreSQL 7.2.3 and having a problem sorting. I've got two colums of data, one Int4 one Varchar. When I sort ASC on the varchar I get some strange results. Here a section...
3
by: Josh Armstrong | last post by:
I need to import text from a text.txt file. The file separates records by an #. Below are 2 sample records they are all fixed size. Any help would be great. Each line represents a field, but of...
3
by: chrisvc | last post by:
I have an ASP.NET application that creates 4 threads in the Application OnStart event. Each thread is stored in the Application object collection. This code works perfectly on my dev machine,...
36
by: ali3n8 | last post by:
Hello I need some assistance with creating a form/subform. The scenarios is I have a form on this form i want to create a button to open a page were notes can be entered and time stamped. On the...
5
by: mknoll217 | last post by:
I am a newbie at XML. I have been given an xml document that I need to write the schema for, for a class assignment. The xml given to me is <?xml version="1.0"?> <Vendors> <Vendor> ...
1
by: mktita | last post by:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login_Form.aspx.cs" Inherits="ajax_control" Debug="true"%> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.