Print

Print


Defining a root element's content model makes sense, but declaring the
root element itself belies the purpose of a type library, I think.

--Andy

>>> [log in to unmask] 01/25/05 9:40 AM >>>
> Or to put it another way, prefixes are required for types with
complex
> content rather than simple content.

But in addition,  if the reference is to a *root* element of an
external
schema then you need a prefix.  It just happens that the type library
doesn't currently define any root elements, but it might in the
future.
For example, we have defined a number of root elements in mods,
besides
<mods> and <modsCollection> so that other schemas could reference them.
 I
would think that some of these would be moved to the type library.

--Ray


Another option is to include the
> attribute form="unqualified" on elements local to complex type
> definitions in the MSTL schema. Then the condition (1) is reversed:
> local elements will have to appear unprefixed even if the MODS/MADS
> elements are prefixed, e.g.
>
> <m:mads xmlns:m="http://www.loc.gov/mads/">
>     ...
>     <m:address>
>         <city>Nowhere</city>
>         <state>Arizona</state>
>     </m:address>
> </m:mads>
>
> --Andy
>
> >>> [log in to unmask] 01/24/05 5:11 PM >>>
> (1) within your mods or mads instances, references to elements
defined
> in
> the type library will have to include a namespace prefix.  (Only
> elements
> though, not datatypes, and most of the type library will be
datatypes,
> not
> elements).