OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Intuition and XML Schema restriction (was: XML Schema to r

[ Lists Home | Date Index | Thread Index ]

> So true. Type derivation involving anonymous types is another example 
> where the derivation looks fine but is in fact incorrect.

And the funny thing is, I would have sworn that 6 mos. ago most validators
handled restrictions of anonymous types just fine.  Maybe I'm
misremembering. I know that XML Spy 4.3  doesn't complain. 

I still don't  know which validators can now correctly determine value space
subsets from pattern expressions, though (it may be a terrifically hard
problem to solve for all cases).  I can do a quick check (incorrectly
restricting pattern "[a-m]*" to "[a-z]*") with the three validators I have
here (all probably out of date by now):

XSV  Nope, doesn't catch it.

SchemaQualityChecker version 2.0:  Nope.

XML Spy 4.3: Nada.

Anybody want to try the following with Xerces or MSXML?:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified"  attributeFormDefault="unqualified">
	<xs:simpleType name="name_t">
		<xs:restriction base="xs:string">
			<xs:pattern value="[a-m]*"/>
	<xs:complexType name="foo">
			<xs:element name="firstName" type="qux:name_t"/>
	<xs:complexType name="bar">
			<xs:restriction base="qux:foo">
					<xs:element name="firstName">


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS