View Single Post
 
Old November 14th, 2006, 03:16 PM
humayunlalzad humayunlalzad is offline
Authorized User
 
Join Date: Nov 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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