Re: CR Feedback and Implementation

"Henry S. Thompson" wrote:
> Thanks for your detailed comments.  Note for good public relations,
> it's best not to send mail directly to both a public
> (www-xml-schema-comments) and a member-only (w3c-xml-schema-ig) list
> at the same time.
> I'll respond to a few things I think we could use some clarification
> on or where I think you've perhaps misunderstood something:
> "Falk, Alexander" <> writes:
> > 1) the CR should perhaps expressedly inform the reader, that any schema
> > document that uses a default namespace (ie no prefix) to refer to
> > "" must have a targetNamespace - otherwise
> > any type="..." or ref="..." can not be correctly attributed to either the
> > built-in types of XML schema or the types that the user defines in his/her
> > schema
> I'm not sure I understand.  The following is perfectly valid:
> <schema xmlns="">
>  <element name="foo">
>   <sequence>
>    <element name="bar" type="integer"/>
>    <element name="baz" type="date"/>
>   </sequence>
>  </element>
> </schema>

Yes, but the following is not:

<schema xmlns="">
 <element name="foo" type="fooType"/>
 <complexType name="fooType">
   <element name="bar" type="integer"/>
   <element name="baz" type="date"/>

Of course, an explicit schema prefix works:

<xsd:schema xmlns:xsd="">
 <xsd:element name="foo" type="fooType"/>
 <xsd:complexType name="fooType">
   <xsd:element name="bar" type="xsd:integer"/>
   <xsd:element name="baz" type="xsd:date"/>

Although this style is heavier, it is always safe.  It seems to have
the additional advantage that XSLT can be applied to such schemas by
using exactly the same prefixed element names to refer to them.  
Whereas if one has used default namespace declarations in the 
schemas, XSLT forces one to introduce prefixes and use them when 
referring to the elements that are unprefixed in the schemas.


Received on Monday, 18 December 2000 14:18:03 UTC