1 / 15

XML modelling

XML modelling. Adolf Knoll National Library of the Czech Republic adolf.knoll@nkp.cz. Which elements do we need for description of a postcard?. Author. Surname – always necessary (if the name cannot be split into „surname“ and „name“, the author will be written into the surname field)

Download Presentation

XML modelling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML modelling Adolf Knoll National Library of the Czech Republic adolf.knoll@nkp.cz

  2. Which elements do we need for description of a postcard?

  3. Author Surname – always necessary (if the name cannot be split into „surname“ and „name“, the author will be written into the surname field) Name – it can be missing, but one author can have also more names

  4. Publisher – more publishers can join to publish the postcard PlaceOfPublicantion and NameofPublisher can be missing DateOfPublication must be always expressed Publisher

  5. Physical description It is required. It consists of 2 elements that are mandatory, too.

  6. Visual representation It is required. The image of the recto part is always required, too; there can be 1 or more images to represent the recto part. The image of the verso part is not mandatory, but there can be more images to represent it, too.

  7. Entire expanded scheme

  8. DTD (document type definition) on the basis of the graphic representation also a *.dtd file can be written W3C XML Schema graphically we have created its structure it must be formalized in *.xsd file How to express it as controlling tool? Both of them can control, which elements are used for description, which attributes they have, which are the relations between them, etc.

  9. DTD vs. W3C XML Schema <!ELEMENT publisher (PlaceOfPublication?, NameOfPublisher?, DateOfPublication)> <!ELEMENT PlaceOfPublication (#PCDATA)> <!ELEMENT NameOfPublisher (#PCDATA)> <!ELEMENT DateOfPublication (#PCDATA)> <xs:element name="publisher"> <xs:complexType> <xs:sequence> <xs:element ref="PlaceOfPublication" minOccurs="0"/> <xs:element ref="NameOfPublisher" minOccurs="0"/> <xs:element ref="DateOfPublication"/> </xs:sequence> </xs:complexType> </xs:element> + additional information about placement in the whole structural schema

  10. DTD vs. XML file • concrete application of the DTD is an XML file in which the elements, attributes, etc., are filled in with datar DTD x.dtd W3C XML Schema x.xsd XML file x.xml

  11. However, we wish to work with the files… • There is a tool that can tell us what to do with the elements, attributes, entities, etc., from the XML file. • Each of them can be assigned specific behaviour • XSLT (stylesheet) transformation XML file XSL transformation e.g. HTML

  12. Associated stylesheet • <?xml version="1.0" encoding="UTF-8"?> • <!DOCTYPE PostcardDescription SYSTEM "C:\Documents and Settings\Knoll\Dokumenty\E\Text_DB\Postcard.dtd"> • <?xml-stylesheet type="text/xsl" href="C:\Documents and Settings\Knoll\Dokumenty\E\Text_DB\Postcard.xslt"?> • <PostcardDescription>………

  13. Transformed output sample

More Related