Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML 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
 
Old February 13th, 2007, 05:32 AM
Registered User
 
Join Date: Feb 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Schemas - Fixed Values

Hi all,

Just working through Beginning XML (3rd Edition), and I've encountered a problem within the Schema chapter.

For those with the book for reference, I'm doing the example from Chapter 5 - Page 187.

Anyway, the example creates a schema which includes a fixed attribute declaration:
<attribute name="version" type="string" fixed="1.0"/>

In my document, I can change the version attribute to any string value without any validation issues (I'm using Toplogi Schemtron btw).

Is this expected behaviour?

I can send example files to anybody that might need them.

Thanks for looking,
Greg

 
Old February 13th, 2007, 06:08 AM
Registered User
 
Join Date: Feb 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey all (again),

I think I've resolved the issue. :)

It appears I need to select the Schema document within Topologi aswell as the xml document (although the book did specifically say I didn't need to do this!) :(

Out of interest, did anyone else encounter this problem?

Cheers,
Greg

 
Old February 13th, 2007, 07:26 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Sounds more like a problem with your schema processor than with the example in the book. Not all schema processors implement 100% of the spec.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old February 13th, 2007, 07:45 AM
Registered User
 
Join Date: Feb 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the response.







Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Schema translation w/ included schemas elliottg XSLT 2 May 16th, 2008 04:14 PM
Using constrainst on multiple schemas Chamkaur XSLT 1 December 15th, 2006 07:08 AM
Using XML Schemas in C++ Unmanaged Code RFickling XML 1 June 8th, 2005 08:23 AM
Regular expressions in XML schemas adrianbarry XML 10 April 7th, 2004 07:54 AM
Source code of Professional XML Schemas Vivian All Other Wrox Books 0 February 2nd, 2004 12:43 PM





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