Download - XML Schema and Stylus Studio
![Page 1: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/1.jpg)
XML Schema and Stylus Studio
![Page 2: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/2.jpg)
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
![Page 3: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/3.jpg)
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
![Page 4: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/4.jpg)
Example
![Page 5: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/5.jpg)
Stylus Studio – Getting Started
![Page 6: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/6.jpg)
Stylus Studio
![Page 7: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/7.jpg)
Stylus Studio
Click on this to create New Element Definition Click on this to create New
Complex Type Element
![Page 8: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/8.jpg)
Stylus Studio – Creating Table Using Complex Type Element
![Page 9: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/9.jpg)
Stylus Studio
Right Click on this to add sequence type to Complex Type Element
![Page 10: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/10.jpg)
Stylus Studio – Adding sub-elements to Complex Type Element
Right Click on this to add Element Definition to Complex Type Element
![Page 11: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/11.jpg)
Stylus Studio – Adding data type for Element Definition
Click on this to get drop down menu to select the data type.
![Page 12: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/12.jpg)
Stylus Studio
Click here to get Tree View of the Schema.
![Page 13: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/13.jpg)
Stylus Studio – Tree View of XML schema
![Page 14: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/14.jpg)
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
![Page 15: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/15.jpg)
Stylus Studio - Adding xsd:keys, xsd:keyref to Element Definition
Assign a name for the new key identity
![Page 16: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/16.jpg)
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
![Page 17: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/17.jpg)
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
![Page 18: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/18.jpg)
Stylus Studio – Adding XPath Expression
Adding Xpath expression in this place
Click on this to view actual code for XML Schema
![Page 19: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/19.jpg)
Stylus Studio
Click on this to Indent XML tags
Click on this to validate the XML Schema
![Page 20: XML Schema and Stylus Studio](https://reader033.vdocuments.mx/reader033/viewer/2022061612/56812f2c550346895d94be54/html5/thumbnails/20.jpg)
Thank You
Any Questions?