TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

23
TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay

Transcript of TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

Page 1: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

TUTORIAL

Dolphy A. Fernandes

Computer Science & Engg.

IIT Bombay

Page 2: 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

Page 3: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 4: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 5: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 6: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 6

Designing

Generating

Converting

Documenting

Validating

View Schemas

Page 7: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 8: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 9: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 10: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 11: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 12: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 12

Creating a basic schema

Page 13: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 13

Creating a basic schema

Page 14: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 14

Creating a basic schema

Page 15: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 15

Creating a global complex type

Page 16: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 16

Extending a complex type definition

Page 17: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 17

Referencing global elements

Page 18: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 18

Attributes and attribute enumerations

Page 19: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 20: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 20

Working with databases

Export to Database

Page 21: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 21

Import Database data

Working with databases

Page 22: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

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

Page 23: TUTORIAL Dolphy A. Fernandes Computer Science & Engg. IIT Bombay.

30-Aug-2006 Dolphy Fernandes [ XML Spy ] 23

Thank You