Introduction to XML Schemas using eXcelon Stylus Studio
description
Transcript of Introduction to XML Schemas using eXcelon Stylus Studio
![Page 1: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/1.jpg)
1
Introduction to XML Schemasusing eXcelon Stylus Studio
• XML schema language is a standard for specifying the structure of XML documents
• Uses the same syntax as XML documents• Complex types correspond to table names• Keys are specified using xsd:unique,
xsd:key, and xsd:keyref
![Page 2: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/2.jpg)
2
Stylus Studio – Getting Started
Opening a Schema:
-Click on the folder
- Choose an .xsd file
![Page 3: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/3.jpg)
3
Stylus Studio – Getting Started
![Page 4: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/4.jpg)
4
Stylus Studio – Getting Started• Open a new XML Schema• The opening page:
You can type the schema here….
Or, there is an easier way…
![Page 5: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/5.jpg)
5
Stylus Studio – Getting Started• Open a new XML Schema• The opening page:
Switch to the diagram view using the tabs at the bottom
![Page 6: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/6.jpg)
6
Stylus Studio – Getting Started• Diagram View
Click on “New Element Definition” to create the element ‘company’ as pictured on page 850 of your text, Figure 26.5.
![Page 7: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/7.jpg)
7
Stylus Studio – Getting Started• Diagram View
Type ‘company’ in the name box
![Page 8: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/8.jpg)
8
Stylus Studio – Getting Started• Before creating the sequence you need to
define the complex types
Use New Complex Type button to create Department Type
![Page 9: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/9.jpg)
9
Stylus Studio – Getting Started• Create a sequence for Department type
Right click to get menu
![Page 10: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/10.jpg)
10
Stylus Studio – Getting Started• Create element departmentName
Specify data type, min and max occurrences
Right click to “Add Child” – “Element”
![Page 11: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/11.jpg)
11
Stylus Studio – Getting Started• Specify data type for departmentName
Type in data type or use pull down menu to verify accurate naming.
You may specify min and max occurrences; use the default (1,1) in this case.
![Page 12: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/12.jpg)
12
Stylus Studio – Getting Started• Create element departmentName
Now Department is visible in the pull down menu for Data Type
![Page 13: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/13.jpg)
13
Stylus Studio – Getting Started• Validate your document as you go!
Validate Button
![Page 14: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/14.jpg)
14
Stylus Studio – Getting Started• Check your Schema against the text!
Text View
Use indent button to format text
![Page 15: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/15.jpg)
15
Stylus Studio – Getting Started• Adding a key or unique name
Tree View
Click on id button and choose unique, key, or keyref from pull down menu
![Page 16: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/16.jpg)
16
Stylus Studio – Getting Started
Click New Selector key to create the selector, or field, xpath.
![Page 17: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/17.jpg)
17
Stylus Studio – Getting Started
XPath is specified here
![Page 18: Introduction to XML Schemas using eXcelon Stylus Studio](https://reader036.fdocuments.net/reader036/viewer/2022062301/56815cda550346895dcae3b3/html5/thumbnails/18.jpg)
18
Stylus Studio – Getting Started
Next Step:
Try entering the rest of the information yourself!!!