RE: XML Schema usage submission

Setting nillable=true is not equivalent to an element whose occurence
range varies between zero and infinity so that may not be an appropriate
work around for a number of content models. For the cases where Bob's
solution may be inadequate I'd additionally suggest  
 
a.) Use minOccurs="1"  not minOccurs="0" to ensure determinism.
Downside: Elements no longer optional. 
b.) Try combinations of namespace ="##other" & namespace="##local" for
wildcards. Downside: Elements from the targetnamespace can no longer
appear anywhere in the content model.  
 
 
-- 
PITHY WORDS OF WISDOM 
The shortest distance between two points is under repair.

This posting is provided "AS IS" with no warranties, and confers no
rights. 


	-----Original Message-----
	From: Bob Schloss [mailto:rschloss@us.ibm.com] 
	Sent: Monday, June 10, 2002 2:51 PM
	To: nathan.crews@autodesk.com
	Cc: cmsmcq@w3.org; xmlschema-dev@w3.org
	Subject: RE: XML Schema usage submission
	
	

	Nathan,
	
	Instead of saying
	<xsd:sequence>
	<xsd:element name="Feature" minOccurs="0" .../>
	<xsd:any namespace="##any".../>
	</xsd:sequence>
	perhaps you can say
	<xsd:sequence>
	<xsd:element name="Feature" nillable="true".../>
	<xsd:any namespace="##any"../>
	</xsd:sequence>
	although that would require documents that do not use feature
	to say
	<Feature xsi:nill="true"/>
	
	This would allow the use of any and your content
	models would be deterministic. 
	
	Regards,
	Bob
	
	
	
	

	To: Bob Schloss/Watson/IBM@IBMUS
	cc: cmsmcq@w3.org, xmlschema-dev@w3.org 
	Subject: RE: XML Schema usage submission
	
	
	
	
	Thanks Bob.
	
	I have tried the schema validator at sourceforge and used XMLSpy
4.4, msxml4 sp1, msxml3 sp2, and System.XML in .NET. I will add the one
at IBM in the future. I can validate in all, but I do get the
non-determinstic content warnings in .NET.
	
	Yes, the use of the <xs:any> attribute with in the <Feature>
element is intentional. This is where application specific freeform data
may or may not exist. I have tried various methods and the current one,
while creating indeterminate content, does work in practice.
	
	Basically with in the <Feature> element we want freeform data to
co-exist along with the deterministic content. I will have another look
at the <PVI> sequencing restrictions.
	
	Can I use the <xs:any> element anywhere and still be
deterministic?
	
	Nathan Crews
	www.landxml.org
	
	-----Original Message-----
	From: Bob Schloss
	To: nathan.crews@autodesk.com
	Cc: cmsmcq@w3.org; xmlschema-dev@w3.org
	Sent: 6/10/02 1:33 PM
	Subject: Re: XML Schema usage submission
	
	Nathan,
	
	I believe that your schema is not valid.
	
	I ran it through the IBM XML Schema Quality Checker
	(available at http://www.alphaworks.ibm.com/tech/xmlsqc
	<http://www.alphaworks.ibm.com/tech/xmlsqc> ) and it
	pointed out several problems, including 5 cases where you appear
	to have an ambiguous content model.
	
	Here is an image of how it looks in my browser
	with the SQC output styled by a stylesheet:
	
	
	And here is the actual output from SQC:
	<?xml version="1.0" encoding="UTF-8"?>
	<?xml-stylesheet type="text/xsl"
href="file:/C:/sqc/ErrorReport.xsl"?>
	<schemaAnalysis
	SchemaQualityCheckerVersion="2.0.1"
	anyWarningsRequestedToBeSuppressed="false" cost="10"
	haltAtFirstError="false"
	requireEachDocumentValid="false"
schemaLanguageVersion="2001-05-02">
	<file fileNameWithoutPath="LandXML-1.0.xsd"
filename="LandXML-1.0.xsd">
	<startdatetime>2002-06-10T16:06:30</startdatetime>
	<error severity="1" type="2">
	<source column="26" line="1265"
	location="file:C:/sqc/LandXML-1.0.xsd"
	locationWithoutPath="LandXML-1.0.xsd"/>
	<message>Ambiguous content model : the following particles
	overlap : &lt;xs:element block=&quot;&quot;
	maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;
	ref=&quot;Feature&quot;/&gt; , &lt;xs:any
	maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot;
	namespace=&quot;##any&quot;/&gt; . </message>
	</error>
	
	<error severity="1" type="2">
	<source column="26" line="1358"
	location="file:C:/sqc/LandXML-1.0.xsd"
	locationWithoutPath="LandXML-1.0.xsd"/>
	<message>Ambiguous content model : the following particles
	overlap : &lt;xs:element block=&quot;&quot;
	maxOccurs=&quot;1&quot; minOccurs=&quot;0&quot;
	ref=&quot;Start&quot;/&gt; , &lt;xs:any
	maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot;
	namespace=&quot;##any&quot;/&gt; . </message>
	</error>
	
	<error severity="1" type="2">
	<source column="26" line="2578"
	location="file:C:/sqc/LandXML-1.0.xsd"
	locationWithoutPath="LandXML-1.0.xsd"/>
	<message>Ambiguous content model : the following particles
	overlap : &lt;xs:element block=&quot;&quot;
	maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;
	ref=&quot;PVI&quot;/&gt; , &lt;xs:element
	block=&quot;&quot; maxOccurs=&quot;1&quot;
	minOccurs=&quot;1&quot; ref=&quot;PVI&quot;/&gt; . </message>
	</error>
	
	<error severity="1" type="2">
	<source column="26" line="36"
	location="file:C:/sqc/LandXML-1.0.xsd"
	locationWithoutPath="LandXML-1.0.xsd"/>
	<message>Ambiguous content model : the following particles
	overlap : &lt;xs:element block=&quot;&quot;
	maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot;
	ref=&quot;Units&quot;/&gt; , &lt;xs:any
	maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot;
	namespace=&quot;##any&quot;/&gt; . </message>
	</error>
	
	<error severity="1" type="2">
	<source column="26" line="963"
	location="file:C:/sqc/LandXML-1.0.xsd"
	locationWithoutPath="LandXML-1.0.xsd"/>
	<message>Ambiguous content model : the following particles
	overlap : &lt;xs:element maxOccurs=&quot;1&quot;
	minOccurs=&quot;1&quot; name=&quot;DocFileRef&quot;
	nillable=&quot;false&quot;&gt;
	&lt;xs:complexType&gt;
	&lt;xs:attribute name=&quot;name&quot;
	use=&quot;required&quot;/&gt; &lt;xs:attribute
	name=&quot;location&quot; type=&quot;xs:anyURI&quot;
	use=&quot;required&quot;/&gt; &lt;xs:attribute
	name=&quot;fileType&quot; type=&quot;xs:string&quot;
	use=&quot;optional&quot;/&gt; &lt;xs:attribute
	name=&quot;fileFormat&quot; type=&quot;xs:string&quot;
	use=&quot;optional&quot;/&gt;
	&lt;/xs:complexType&gt; &lt;/xs:element&gt; ,
	&lt;xs:any maxOccurs=&quot;1&quot;
	minOccurs=&quot;1&quot; namespace=&quot;##any&quot;/&gt;
	. </message>
	</error>
	<enddatetime>2002-06-10T16:07:19</enddatetime>
	</file>
	</schemaAnalysis>
	
	Thanks,
	Bob
	
	Extensible Technologies
	IBM Watson Research Center
	Yorktown Heights, NY
	
	
	
	
	Sent by: xmlschema-dev-request@w3.org
	
	
	To: xmlschema-dev@w3.org
	cc: cmsmcq@w3.org
	Subject: XML Schema usage submission
	
	
	
	
	I would like to contribute an XML Schema, LandXML, to the usage
section
	of the W3 XML Schema page.
	
	
	The LandXML schema is defined, maintained and hosted by
LandXML.org, an
	open organization for Land Development/Transportation Industry
	organization. LandXML models the civil engineering design data
used to
	create new residential subdivisions and build new roads.
	
	Schema file name   : LandXML-1.0.xsd
	Schema namespace: http://www.landxml.org/schema/LandXML-1.0
	<http://www.landxml.org/schema/LandXML-1.0>
	Schema location     :
	<http://www.landxml.org/schema/LandXML-1.0/%20LandXML-1.0.xsd>
	http://www.landxml.org/schema/LandXML-1.0/ LandXML-1.0.xsd
	
	Schema Description: LandXML is an emerging XML data standard for
civil
	engineering and survey data used in the Land Development and
	Transportation Industries. LandXML facilitates open data
exchange
	between software applications, provides an electronic format for
design
	data project submission and provides a format suitable for long
term
	archival.
	
	More Information:
	
	LandXML has a reasonably complex content model has evolved from
a simple
	XDR schema, (
	<http://www.landxml.org/schema/landxml-0.01/LandXML-0.01.xml>
	http://www.landxml.org/schema/landxml-0.01/LandXML-0.01.xml),
over the
	past 3 years to use most of the features available in the latest
XML
	Schema recommendation. The web site for the schema is
	<http://www.landxml.org> http://www.landxml.org, where you will
find the
	schema, documentation, sample files and sample applications.
There is
	also a list of world-wide participants on the
	<http://www.landxml.org/org.htm> http://www.landxml.org/org.htm
page.
	
	LandXML is emerging as the XML standard for the Land Development
and
	Transportation Industry by US Department of Transportation,
AASHTO
	(American Association of State Highway Officials) and the
Federal
	Highway Administration. LandXML is also being used and
recognized
	internationally by Land Information New Zealand. LandXML also
has strong
	support in the software vendor community
	<http://www.landxml.org/landxmlapps.htm>
	http://www.landxml.org/landxmlapps.htm.
	
	Please let me know if any other information is required.
	
	Nathan Crews
	Principal Schema Architect,  <http://www.landxml.org>
www.landxml.org
	
	Software Researcher
	Civil/Survey Software Development
	GIS Solutions Division
	Autodesk, Inc.
	
	<mailto:nathan.crews@autodesk.com> nathan.crews@autodesk.com
	
	
	
	
	

Received on Monday, 10 June 2002 19:25:56 UTC