2. Introduction to XML Schema
XML Schema defines building blocks of a XML
document
XML Schemas are alternative to DTD
Why XML Schema?
– Supports data types
– Written in XML
– Supports namespaces
– Extensible to future additions
3. XML Schema
Tables in XML schemas are represented by
complex elements.
Columns are represented as sub elements of
complex elements.
Unique keys are represented by xsd:unique
Primary keys are represented by xsd:key
Foreign keys are represented by xsd:keyref
14. Stylus Studio – Adding xsd:keys,
xsd:keyref to Element Definition
Click on the ID
button to add new
Identity constraint
After adding an Identity constraint, You can select the
constraint type like Unique, key or keyref from drop-down
menu
15. Stylus Studio - Adding xsd:keys,
xsd:keyref to Element Definition
Assign a name for the new
key identity
16. Stylus Studio – Adding selector element
Click on the ID button
to add new selector
After adding new selector, You can select the Selector/field
from drop-down menu
17. Adding xsd:keys, xsd:keyref to Element
Definition
Assign a name for the new
keyref
Provide the name of
primary key to which it
refers
18. Stylus Studio – Adding XPath
Expression
Adding Xpath expression
in this place
Click on this to view actual code for XML
Schema