Page 1 of 1

What is XML Schema Instance (XSI)?

Posted: Tue Jul 31, 2007 5:29 am
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]

Posted: Tue Jul 31, 2007 11:50 am
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