Jump to content

Schema Linking Failed


Guest david ng

Recommended Posts

Guest david ng

The following file is taken from w3school and with slightly edit to fit with my websiteNote:w3school have example of a wrongly coded xml that show how xsd workmy xsd file is located at http://davidng777.byethost3.com/test/note.xsd

<?xml version="1.0" encoding="ISO-8859-1" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><!-- definition of simple elements --><xs:element name="orderperson" type="xs:string"/><xs:element name="name" type="xs:string"/><xs:element name="address" type="xs:string"/><xs:element name="city" type="xs:string"/><xs:element name="country" type="xs:string"/><xs:element name="title" type="xs:string"/><xs:element name="note" type="xs:string"/><xs:element name="quantity" type="xs:positiveInteger"/><xs:element name="price" type="xs:decimal"/><!-- definition of attributes --><xs:attribute name="orderid" type="xs:string"/><!-- definition of complex elements --><xs:element name="shipto">  <xs:complexType>	<xs:sequence>	  <xs:element ref="name"/>	  <xs:element ref="address"/>	  <xs:element ref="city"/>	  <xs:element ref="country"/>	</xs:sequence>  </xs:complexType></xs:element><xs:element name="item">  <xs:complexType>	<xs:sequence>	  <xs:element ref="title"/>	  <xs:element ref="note" minOccurs="0"/>	  <xs:element ref="quantity"/>	  <xs:element ref="price"/>	</xs:sequence>  </xs:complexType></xs:element><xs:element name="shiporder">  <xs:complexType>	<xs:sequence>	  <xs:element ref="orderperson"/>	  <xs:element ref="shipto"/>	  <xs:element ref="item" maxOccurs="unbounded"/>	</xs:sequence>	<xs:attribute ref="orderid" use="required"/>  </xs:complexType></xs:element>

this is my xml file, at http://davidng777.byethost3.com/test/note.xml

<?xml version="1.0" encoding="ISO-8859-1"?><shiporder orderid="889923"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="note.xsd">  <orderperson>John Smith</orderperson>  <shipto>	<address>Langgt 23</address>	<name>Ola Nordmann</name>	<city>4000 Stavanger</city>	<country>Norway</country>  </shipto>  <item>	<title>Empire Burlesque</title>	<note>Special Edition</note>	<quantity>1</quantity>	<price>10.90</price>  </item>  <item>	<title>Hide your heart</title>	<quantity>1</quantity>	<price>9.90</price>  </item></shiporder>

Issit something to do with my free hosting company?Even my code external linking of dtd with <!DOCTYPE webdesign SYSTEM "webdesign.dtd"> failed.xml link - http://davidng777.byethost3.com/test/webdesign.xmldtd link - http://davidng777.byethost3.com/test/webdesign.dtdHelp will be greatly appreciated

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...