TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.
-
Upload
edgar-bradford -
Category
Documents
-
view
228 -
download
2
Transcript of TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.
TUTORIAL
Dolphy A. Fernandes
Computer Science & Engg.
IIT Bombay
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 2
Why XML ?
• XML is a data representation language
• XML “describes” data
• XML can be used to share & store data
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 3
XML Schema
Information Modeling Syntax in XML
a
b
x
y
XML Schema
<a>
<b>
<x>…</x>
<y>…</y>
</b>
</a>XML instance
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 4
If your data is structured asXML and there is a schema,then you can hand the data-checking task off to a schema validator.
Thus, your code is reducedby up to 60%!!!
Save $$$.. using XML Schema
Code to check
the structure
and contentof the data
Code to actuallydo the work
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 5
®
• Altova has the largest user-base of any XML product in the market
• All Altova XML products are based on established standards released by the W3C
• It includes powerful viewing and editing tools
Altova XMLSpy
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 6
Designing
Generating
Converting
Documenting
Validating
View Schemas
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 7
XmlSpy’s integrated Views
• Advanced Text view
– Allows customized syntax color, book-marking and line numbers
– Source folding that helps expand and collapse portions of file
– Code completion automatically generates closing tags
– In case of schema, it suggests a list of occurable components in Xml
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 8
• Grid view
– Allows you to visualize and edit your documents in a graphical manner
– Also allows drag-n-drop and expand-collapse of elements
– Append data, insert data, sort alphabetically in a table-like structure
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 9
• Authentic view
– They have web-page look used for accepting data
– Helps non-technical users to get data into an xml format quickly and easily.
– Authentic forms are created by Altova StyleVision
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 10
• Browser view
– Can be used to view xml documents
– Used to view html files those that are created from an xml file using an XSLT Stylesheet
– Documentations generated by Xml Spy can be viewed in Browser view
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 11
• Schema View
Schema Overview– Displays a list of all global components in top pane
– Displays attributes and identity constraints in bottom pane
Content Model view– It consists of compositors and components
– It provides the content model of an element in a graphical way
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 12
Creating a basic schema
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 13
Creating a basic schema
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 14
Creating a basic schema
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 15
Creating a global complex type
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 16
Extending a complex type definition
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 17
Referencing global elements
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 18
Attributes and attribute enumerations
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 19
Specifying the type in Xml
To specify that the Address element must conform to one of the extended Address types i.e. IN-Address or
UK-Address rather than the generic AddressType
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 20
Working with databases
Export to Database
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 21
Import Database data
Working with databases
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 22
References
[1] Altova. World Wide Web, http://www.altova.com
[2] O’Reilly xml.com. World Wide Web, http://www.xml.com
30-Aug-2006 Dolphy Fernandes [ XML Spy ] 23
Thank You