p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning XML 3rd Edition (http://p2p.wrox.com/forumdisplay.php?f=149)
-   -   ch05 no validation error (http://p2p.wrox.com/showthread.php?t=50300)

humayunlalzad November 14th, 2006 03:16 PM

ch05 no validation error
 
this is what the book says to type and save as name5.xsd

<?xml version="1.0"?>
<shema xmlns="http://wwww.w3.org/2001/XMLShema"
 xmlns:target="http://www.example.com/name"
 targetNamespace="http://www.example.com/name"
 elementFormDefault="qualified">

  <element name="name">
    <complexType>
      <sequence>
        <element name="first" type="string"/>
        <element name="middle" type="string"/>
        <element name="last" type="string" />
      </sequence>
      <attribute name="title" type="string"/>
    </complexType>
    </element>
  </shema>
this is the document name5.xml

<?xml version="1.0" ?>
<name
   xmlns="http://www.example.com/name"
   xmlns:xsi="http://www.w3.org/2001/XMLShema-instance"
   xsi:shemaLocation="http://www.example.com/name name5.xsd"
   title="Mr.">
  <first>John</first>
  <middle>Fitzgerald Johansen</middle>
  <last>Doe</last>
</name>
AND THIS IS THE PROB
the topologi shematron is not validating the document against the shema. It keeps saying "no errors" whatever kind of changes you introduce in the shema document.
 I changed the
<element name="first" type="string" />
to
<element name="firs" type="string" />
(deleted the "t")
even then the validator is not showing any errors.
CAN SOMEBODY POINT OUT MY GOOF UP

joefawcett November 15th, 2006 03:44 AM

You'd have to check the specific documentation for Topologi. Firstly does it support XML Schema?
Secondly not all parsers use the schemaLocation attribute (check spelling in your document!), they require a different way of specifying the location. It's also possibly that it can't find the file is it in the same directory as the XML and what is the current directory?

--

Joe (Microsoft MVP - XML)

humayunlalzad November 15th, 2006 06:55 AM

Thank you so much Not only I had misspelt schema as shema but for www.w3.org
I had 4ws.(wwww.w3.org)
Now everything is working fine


All times are GMT -4. The time now is 06:03 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.