Print

Print


> -----Original Message-----
> From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of
> Jonathan Rochkind
> Sent: Monday, July 27, 2009 11:35 AM
> To: [log in to unmask]
> Subject: [CODE4LIB] XML schemas question
> 
> Anyone familiar with XML schemas (.xsd)?
> 
> Can you help me figure something out. Is there something in the schema
> that specifies what elements can serve as the 'root node'... or is any
> element described in the schema available for use as a 'root node',
> and
> it'll still validate?

Any global element is available as a document element in an instance
document.  Typically, you can use global types, specify one global
element and use the Russian Doll approach to limit which elements
can be used for the document element in an instance document.  The
upside is that you can control what elements are used for instance
documents.  The downside is that schema reuse drops because inner
elements cannot be reused in other contexts.


Andy.