180 likes | 307 Views
This guide provides a comprehensive introduction to XML schemas using Stylus Studio, a powerful XML editor. It covers the XML schema language, which establishes the structure of XML documents through syntax similar to XML itself. Users will learn to open and create XML schemas, define complex types, and specify keys using unique, key, and keyref attributes. The tutorial walks through diagram view operations, element definition, and data type specifications. It emphasizes validating documents and managing schema details effectively within Stylus Studio.
E N D
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
Stylus Studio – Getting Started • Opening a Schema: • Click on the folder • - Choose an .xsd file
Stylus Studio – Getting Started • Open a new XML Schema • The opening page: You can type the schema here…. Or, there is an easier way…
Stylus Studio – Getting Started • Open a new XML Schema • The opening page: Switch to the diagram view using the tabs at the bottom
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.
Stylus Studio – Getting Started • Diagram View Type ‘company’ in the name box
Stylus Studio – Getting Started • Before creating the sequence you need to define the complex types Use New Complex Type button to create Department Type
Stylus Studio – Getting Started • Create a sequence for Department type Right click to get menu
Stylus Studio – Getting Started • Create element departmentName Right click to “Add Child” – “Element” Specify data type, min and max occurrences
Stylus Studio – Getting Started • Specify data type for departmentName You may specify min and max occurrences; use the default (1,1) in this case. Type in data type or use pull down menu to verify accurate naming.
Stylus Studio – Getting Started Now Department is visible in the pull down menu for Data Type • Create element departmentName
Stylus Studio – Getting Started • Validate your document as you go! Validate Button
Stylus Studio – Getting Started • Check your Schema against the text! Use indent button to format text Text View
Stylus Studio – Getting Started • Adding a key or unique name Click on id button and choose unique, key, or keyref from pull down menu Tree View
Stylus Studio – Getting Started Click New Selector key to create the selector, or field, xpath.
Stylus Studio – Getting Started XPath is specified here
Stylus Studio – Getting Started Next Step: Try entering the rest of the information yourself!!!