W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Root element

From: Michael Shapiro <michael@creativescience.com>
Date: Tue, 13 Feb 2001 20:20:26 -0800
Message-ID: <011401c096b7$999eb2f0$110a0a0a@voquetter>
To: <xmlschema-dev@w3.org>
I'm learning the schema language and I have a question that I can't find an
answer for.

Primer in http://www.w3.org/TR/xmlschema-0/ declares two elements in
http://www.example.com/PO1 namespace: <purchaseOrder/> and <comment/>

Does it mean that an instance document like

<?xml version="1.0"?>
<a:comment xmlns:a="http://www.example.com/PO1">
Hello
</a:comment>

is as http://www.example.com/PO1 schema valid as
the one with <purchaseOrder .../> root?

If it's the case then is the following document also schema-valid?

<?xml version="1.0"?>
<xsd:annotation xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
    <xsd:documentation>Hello</xsd:documentation>
</xsd:annotation>

Or the identity constraints on the <schema/> element itself will make a
document with <annotation/> root schema-invalid? What am I missing here?

Thanks,
Michael
Received on Wednesday, 14 February 2001 13:49:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC