Re: Attributes and Default Namespaces

If you see the following element declaration (which is element
declaration for the root element of your XML document) in your Schema
document,

<xs:element name="Results">
     <xs:annotation>
         <xs:documentation>Comment describing your root
element</xs:documentation>
     </xs:annotation>
</xs:element>

There is nothing defined within this element declaration (except an
annotation). I think this implies that schema type of such an element
declaration (even if this element is in non null namespace which is
http://raid.raidllp.com in your case) is xs:anyType (which allows any
XML markup as content), which means your XML document should be
reported valid with your schema with a compliant XML Schema validator.
But I think, you wouldn't want to write such a schema document (i.e
having no schema components defined within the root element
declaration, which doesn't make such an element declaration any-way
useful).

In your example, I think an xs:import is necessary (in Schema 1.0
mode) to import attribute declarations from no/null namespace, since
the parent schema defines (or must define) components in non null
namespace (i.e http://raid.raidllp.com), in your example.

On Thu, Nov 11, 2010 at 8:42 PM, Neil Beddoe <Neil.Beddoe@raidllp.com> wrote:
> Actually, I  Figured it out.  I was rustier than I thought.  I was creating attributes outside the element when what I should have been doing is creating types and using those for the attributes instead.




-- 
Regards,
Mukul Gandhi

Received on Friday, 12 November 2010 07:01:54 UTC