Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning XML 3rd Edition
This is the forum to discuss the Wrox book Beginning XML, 3rd Edition by David Hunter, Andrew Watt, Jeff Rafter, Jon Duckett, Danny Ayers, Nicholas Chase, Joe Fawcett, Tom Gaven, Bill Patterson; ISBN: 9780764570773
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 14th, 2006, 03:16 PM
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
  #2 (permalink)  
Old November 15th, 2006, 03:44 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
  #3 (permalink)  
Old November 15th, 2006, 06:55 AM
Authorized User
 
Join Date: Nov 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ch05 - example3 idroulia BOOK: Beginning JavaServer Pages 1 March 15th, 2008 09:42 AM
beginning java ch05 TryPackage wolfshow Java Basics 1 April 19th, 2006 09:50 AM
Ch05 IE not properly display XML david_4092 BOOK: Beginning ASP.NET 1.0 1 October 24th, 2003 01:23 PM





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