W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

locally scoped element decls and namespaces

From: Gabe Beged-Dov <begeddov@jfinity.com>
Date: Mon, 03 Jan 2000 10:10:50 -0800
Message-ID: <3870E62A.8C62FE4@jfinity.com>
To: XML List <xml-dev@ic.ac.uk>
CC: xml-schema-comments <www-xml-schema-comments@w3c.org>
I have a hopefully simple question concerning locally
scoped element decls and namespaces. Here is an example
schema:

<schema targetNamespace='urn:person-schema'>
        <type name='Person'>
                <element name='fname' type='string' />
                <element name='lname' type='string' />
        </type>
        <element name='Person' type='Person' />
</schema>

Given this schema, here is an instance:

<t:Person xmlns:t='urn:person-schema'
  
xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
        <fname>Helen</fname>
        <lname>Jones</lname>
</t:Person>

Is this right or should fname and lname be bound to the
same namespace as Person, i.e.: 

<t:Person xmlns:t='urn:person-schema'
  
xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
        <t:fname>Helen</t:fname>
        <t:lname>Jones</t:lname>
</t:Person>


Cordially from Corvallis,

Gabe Beged-Dov

-- 
--------------------------- 
http://www.jfinity.com/gabe
Received on Monday, 3 January 2000 13:26:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT