What is XML Schema Instance (XSI)?

Questions about XML that are not covered by the other forums should go here.
Zearin
Posts: 107
Joined: Mon Jul 30, 2007 11:31 pm
Location: College Park, MD, United States

What is XML Schema Instance (XSI)?

Post by Zearin »

Hey,

I'm a longtime HTML/CSS junkie that has just become absolutely fascinated by the power of XML. What powerful things it can do!

Anywho, I was interested in writing an XML file which would contain the <model> for an XForm. I noticed the autocomplete wasn't kicking in, even though I gave it the namespace for XForms in an xmlns attribute. But no content assist--so I poked around and found oXygen's "Associate with a schema" option, and voila! It wrote the code necessary for content assist to kick in.

Instant XForms autocomplete. Thank you, oXygen. :)

However, one of the items in this generated code was the XSI namespace (http://www.w3.org/2001/XMLSchema-instance). I know what an XML Schema is (as in *.xsd files), but what is a Schema Instance? What is it used for?

Thanks one and all. This is some exiting stuff! :)[/code]
-- Zearin
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Zearin,

The schema instance namespace (http://www.w3.org/2001/XMLSchema-instance) defines a few attributes that are used in instance documents with special meaning. The xsi:noNemaspaceSchemaLocation and xsi:schemaLocation attributes are used to associate XML Schemas with XML documents. The xsi:nil attribute is used in the XML instance documents to specify that an element defined as nillable in the XML Schema is nil. The xsi:type attribute is used to specify a specific type for an element in the instance document.
For more details see:
http://www.w3.org/TR/xmlschema-1/#Insta ... structions

Best Regards,
George
George Cristian Bina
Post Reply