xsd - Is "ref=" the only directive that tells an XML schema to treat a global as a reference? -


i going through xml tutorial right , while think understand concept of "reference", trying understand advantage of using it.

if @ example given tutorial:

enter image description here

the difference between reference element (e.g. "person") , "embedded" (?) element element uses it, uses ref= instead of name=.

since both referenced element , non-referenced element global , avoid duplication defining complex type, is makes referenced element is?

using local elements (non-global elements name attribute) allows have different types same element depending on occurs, example project/status might have different validation rules person/status. can used readability, though there disadvantages: local elements cannot reused, , cannot appear in substitution groups.

i tend use local elements simple elements (elements having simple type), , make complex elements global.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -