Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML 3rd Edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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
Reply With Quote
  #2 (permalink)  
Old November 15th, 2006, 03:44 AM
joefawcett's Avatar
Wrox Author
Points: 9,731, Level: 42
Points: 9,731, Level: 42 Points: 9,731, Level: 42 Points: 9,731, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,068
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)
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 08:09 AM.


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