W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

newbie question

From: <mrbannon@swen.uwaterloo.ca>
Date: Fri, 16 Aug 2002 14:34:46 -0400
Message-ID: <1029522886.3d5d45c6d21bc@www.nexusmail.uwaterloo.ca>
To: xmlschema-dev@w3.org

Hi,

I've got a really simple problem that I can't seem to fix.
Basically, I want to create a schema that only defines attributes.
I've done this in the following schema (prototype.xsd):

<?xml version="1.0"?>
<xsd:schema	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
		targetNamespace="http://www.swen.uwaterloo.ca/~mrbannon">
	<xsd:attribute name="data_item"		type="xsd:boolean"/>
	<xsd:attribute name="ontology_class"	type="xsd:string"/>
</xsd:schema>

I believe this is valid...please let me know if it's not.

My instance is the following:

<?xml version="1.0"?>
<purchaseOrder	xmlns:test="http://www.swen.uwaterloo.ca/~mrbannon"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://www.swen.uwaterloo.ca/~mrbannon
http://www.swen.uwaterloo.ca/~mrbannon/prototype.xsd">
    <shipTo country="US" test:ontology_class="blahblah"></shipTo>
    <billTo country="US" test:data_item="false"></billTo>
</purchaseOrder>

When I run it through the online validator and change the value 
of "test:data_item" to gibberish ("lsjdflsdjkfsldj"), I'm told that it's valid 
and well-formed.  How can this be if data_item is to be a boolean?

Thanks in advance,

Ryan 

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
Received on Friday, 16 August 2002 14:34:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT