SlideShare a Scribd company logo
1 of 25
INTRODUCTION TO XML
Fergus Fahey – Training officer ARA(I)
Format of Workshop
• Description of xml features
• Practical exercise
What is XML
• XML stands for EXtensible Markup Language.
• XML was designed to store and transport data.
• XML was designed to be both human- and machine-readable
• XML is a software- and hardware-independent tool for storing and transporting
data
• “XML does not DO anything”
• Very widely used to store and share data:
• By libraries to share bibliographic data
• By software applications e.g. podcast metadata,
• By banks e.g. to process Single Euro Payments Area
eXtensible MARK-UP Language XML
XML Does Not DO Anything
<tramTicket>
<type>return</type>
<from>Central 1</from>
<to>Red 2</to>
<validUntil>Last Tram</validUntil>
<date>31 Jul 06</date>
<for>Adult</for>
<on>Luas only</on>
<timeIssued>21:15</timeissued>
<price>2.90</price>
<number>6004375019</number>
</tramTicket>
Before xml…html…before html…
Marc record processed
000 02617cam 22004931a 450
001 1197435
005 20030227130037.0
008 940923s1840 enkabcf 00 0 eng u
035 __ |a (UPRA)CTYXRL7078-B
035 __ |9 CAF1680YL
040 __ |c UPRA |d CtY-BR
043 __ |a n-us---
090 __ |a Za W679 |b +840s
100 1_ |a Willis, Nathaniel Parker, |d 1806-1867.
245 10 |a American scenery, or, Land, lake, and river
illustrations of transatlantic nature : |b 246
246 30 |a Land, lake and river illustrations of transatlantic
nature
260 __ |a London : |b George Virtue, |c 1840
Author: Willis, Nathaniel Parker, 1806-1867.
Title: American scenery, or, Land, lake, and river illustrations
of transatlantic nature : uniform with Dr. Beattie's
Switzerland, Scotland, & Waldenses / from drawings by
W.H. Bartlett, engraved in the first style of the art,
by R. Wallis, J. Cousen, Willmore, Brandard, Adlard,
Richardson, &c ; the literary department by N.P. Willis.
American scenery
Land, lake and river illustrations of transatlantic nature
Published: London : George Virtue, 1840
Description: 30 parts : ills., map, port. ; 29 cm.
Location: BEINECKE (Non-Circulating)
Call Number: 2003 +56
Library has: pt.1-pt.30
Html Hyper Text Mark-up Language
• HTML was designed to display data - with focus on how data looks (Unlike
the MARC example)
• HTML – Has predefined tags:
• <b> for bold
• <p> for paragraph
• HTML tags relate to layout and appearance of text/data and images
• HTML is permissive i.e. HTML will still render if it includes invalid tags.
HTML
<html>
<p>
The <b>cat</b>sat on the
<i>mat</i>
</p>
<img src=“catonmat.jpg”/>
</html>
The cat sat on the mat
xml
<animal type=‘cat’>
<name>Felix</name>
<colour>white</colour>
<state>seated</state>
<surface>mat</surface>
<attire>Dickie bow</attire>
<mood>Happy</mood>
</animal>
The Difference Between XML and HTML
• The XML language has no predefined tags
• The tags in the luas ticket example above (like <to> and
<price>) are not defined in any XML standard. These tags
are "invented" by the author of the XML document.
• HTML works with predefined tags like <p>, <b>, <img>,
etc.
• With XML, the author must define both the tags and the
document structure.
• XML Separates Data from Presentation
XML Tree root element
<eu>
element
<memberState>
element
<name>
element
<area>
element
<population>
element
<headOfstate>
element
<capital>
element
<firstName>
element
<lastName>
Text:
Brussels
Text:
Belgium
Text:
11,190,845
Text:
30,528
Text:
Philippe
Text:
Saxe-Coburg-
Gotha
element
<name>
attribute
“type”
XML Syntax
• XML documents must contain one root element that is the parent of all other
elements
• <root>
<child>
<subchild>.....</subchild>
</child>
</root>
XML Syntax example
<memberstate>
<name>Belgium</name>
<area>30,528</area>
<population>11,190,845</population>
<headOfstate type="Constitutional Monarch">
<lastName>Saxe-Coburg-Gotha</lastName>
<firstName>Philippe</firstName>
</headOfstate>
<capital>
<name>Brussels</name>
<population AdministrativeDivision="Capital Region">1,138,854</population>
</capital>
</memberstate>
XML Elements
• An XML element is everything from (including) the element's start tag to
(including) the element's end tag.
<population>11,190,845</population>
• An element can contain:
• text
• attributes
• other elements
• or a mix of the above
<capital>
<name>Brussels</name>
<population AdministrativeDivision="Capital Region">1,138,854</population>
</capital>
XML Attributes
• Attributes are designed to contain data related to a specific element.
<headOfstate type="Constitutional Monarch">
<lastName>Saxe-Coburg-Gotha</lastName>
<firstName>Philippe</firstName>
</headOfstate>
--------------------------------------------------------------------------------------
<headOfstate>
<type>Constitutional Monarch</type>
<lastName>Saxe-Coburg-Gotha</lastName>
<firstName>Philippe</firstName>
</headOfstate>
XML Tree root element
<eu>
element
<memberState>
element
<name>
element
<area>
element
<population>
element
<headOfstate>
element
<capital>
element
<firstName>
element
<lastName>
Text:
Brussels
Text:
Belgium
Text:
11,190,845
Text:
30,528
Text:
Philippe
Text:
Saxe-Coburg-
Gotha
element
<name>
attribute
“type”
XML Namespaces
• In XML, element names are defined by the developer. This often results in a
conflict when trying to mix XML documents from different XML applications.
• This XML carries HTML table information:
<table>
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</table>
This XML carries information about a table (a piece of furniture):
<table>
<name>African Coffee Table</name>
<width>80</width>
<length>120</length>
</table>
Xml Namespaces
• <h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
<f:table>
<f:name>African Coffee Table</f:name>
<f:width>80</f:width>
<f:length>120</f:length>
</f:table>
Validating XML
• XML documents must have a root
element
• XML elements must have a
closing tag
• XML tags are case sensitive
• XML elements must be properly
nested
• XML attribute values must be
quoted
<eu>
….
</eu>
<lastName>Mattarella</Lastname>
<lastName>Mattarella</lastName>
<eu>
<headOfstate type="Non executive President">
<eu>
<country>
<headOfstate type="Non executive President">
<population AdministrativeDivision=Capital Region>
<population AdministrativeDivision="Capital Region">
Validating xml - dtd
• An XML document with correct syntax is
called "Well Formed".
• An XML document validated against a DTD
is both "Well Formed" and "Valid“
• Xml parser only knows what is valid if you
tell it, e.g. doesn’t know that a country has a
head of state but a capital does not.
• Rules are created using a dtd file.
• <!DOCTYPE eu
• [<!ELEMENT eu (memberstate*)>
• <!ELEMENT memberstate
(name,area,population,headOfstate,capital)>
• <!ELEMENT name (#PCDATA)>
• <!ELEMENT area (#PCDATA)>
• <!ELEMENT headOfstate
(firstName,lastName)>
• <!ELEMENT capital (name,population)>
• <!ELEMENT firstName (#PCDATA)>
• <!ELEMENT lastName (#PCDATA)>
• <!ELEMENT population (#PCDATA)>
• <!ATTLIST headOfstate type CDATA "0">
• <!ATTLIST population AdministrativeDivision
CDATA "0">]>
Three types of error
• Badly formatted – missing closing tag, tags not matching, tags not nestled
correctly
• Not valid – doesn’t comply with dtd rules
• Information is wrong, xml will not spot this in most circumstances, may spot it if
information doesn’t comply with a rule.
• Won’t spot
<lastName>O’Higgins</ lastName >
<firstName>Michael D.</firstName>
• Might spot (if expecting alphabetic characters only):
<lastName>O’Higgins</ lastName >
<firstName>Michael D.</firstName>
XML and XSLT
• Xslt is one of a number of technologies which is used to process xml
• In our example we will use xslt to pick out individual xml elements and use
html to display them in a web browser.
• In my experience writing xslt is not easy, more difficult than any other
programing language I’ve used.
• Good news you don’t necessarily have to use xslt to use xml or EAD.
Useful links
• W3 schools xml tutorial http://www.w3schools.com/xml/default.asp
• W3 schools xslt tutorial http://www.w3schools.com/xsl/default.asp

More Related Content

What's hot (20)

Xml
XmlXml
Xml
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
XML
XMLXML
XML
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML
XMLXML
XML
 
SQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML DataSQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML Data
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
Basic xml syntax
Basic xml syntaxBasic xml syntax
Basic xml syntax
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Xml
XmlXml
Xml
 
XML
XMLXML
XML
 
Intro xml
Intro xmlIntro xml
Intro xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 

Viewers also liked

Rebecca Grant DPASSH presentation 2015
Rebecca Grant DPASSH presentation 2015Rebecca Grant DPASSH presentation 2015
Rebecca Grant DPASSH presentation 2015dri_ireland
 
Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.
Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.
Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.dri_ireland
 
Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD Workshop
Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD WorkshopFergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD Workshop
Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD Workshopdri_ireland
 
Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...
Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...
Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...dri_ireland
 
Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...
Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...
Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...dri_ireland
 
Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...
Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...
Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...dri_ireland
 
Kathryn Cassidy - What metadata do we need for preservation?
Kathryn Cassidy - What metadata do we need for preservation?Kathryn Cassidy - What metadata do we need for preservation?
Kathryn Cassidy - What metadata do we need for preservation?dri_ireland
 

Viewers also liked (7)

Rebecca Grant DPASSH presentation 2015
Rebecca Grant DPASSH presentation 2015Rebecca Grant DPASSH presentation 2015
Rebecca Grant DPASSH presentation 2015
 
Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.
Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.
Rebecca Grant - Approaching Archival Authenticity: when 'Records' become 'Data.
 
Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD Workshop
Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD WorkshopFergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD Workshop
Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - EAD Workshop
 
Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...
Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...
Stuart Kenny; Kathryn Cassidy - Experience with Ingestion of Large Collection...
 
Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...
Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...
Rebecca Grant, Sharon Webb - Preserving Ireland's Digital Cultural Identity T...
 
Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...
Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...
Rebecca Grant - DRI/ARA(I) Training: Introduction to EAD - Metadata and Metad...
 
Kathryn Cassidy - What metadata do we need for preservation?
Kathryn Cassidy - What metadata do we need for preservation?Kathryn Cassidy - What metadata do we need for preservation?
Kathryn Cassidy - What metadata do we need for preservation?
 

Similar to Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - Introduction to XML (20)

Xmll
XmllXmll
Xmll
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
Intro XML for archivists (2011)
Intro XML for archivists (2011)Intro XML for archivists (2011)
Intro XML for archivists (2011)
 
Xml
XmlXml
Xml
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
23xml
23xml23xml
23xml
 
Xml Overview
Xml OverviewXml Overview
Xml Overview
 
xml.pptx
xml.pptxxml.pptx
xml.pptx
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
XHTML
XHTMLXHTML
XHTML
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
Html
HtmlHtml
Html
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
IT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notesIT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notes
 
Xml passing in java
Xml passing in javaXml passing in java
Xml passing in java
 
Html
HtmlHtml
Html
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 

More from dri_ireland

NORFest 2023 Lightning Talks Session Two
NORFest 2023 Lightning Talks Session TwoNORFest 2023 Lightning Talks Session Two
NORFest 2023 Lightning Talks Session Twodri_ireland
 
NORFest 2023: Early Career Researcher Panel on Research Assessment
NORFest 2023: Early Career Researcher Panel on Research AssessmentNORFest 2023: Early Career Researcher Panel on Research Assessment
NORFest 2023: Early Career Researcher Panel on Research Assessmentdri_ireland
 
NORFest 2023: National Open Research Fund 2023, Projects Launch
NORFest 2023: National Open Research Fund 2023, Projects LaunchNORFest 2023: National Open Research Fund 2023, Projects Launch
NORFest 2023: National Open Research Fund 2023, Projects Launchdri_ireland
 
NORFest 2023 Lightning Talks Session Three
NORFest 2023 Lightning Talks Session Three NORFest 2023 Lightning Talks Session Three
NORFest 2023 Lightning Talks Session Three dri_ireland
 
NORFest 2023 Lightning Talks Session One
NORFest 2023 Lightning Talks Session OneNORFest 2023 Lightning Talks Session One
NORFest 2023 Lightning Talks Session Onedri_ireland
 
NORFest2023 Keynote address: Chelle Gentemann (NASA)
NORFest2023 Keynote address: Chelle Gentemann (NASA)NORFest2023 Keynote address: Chelle Gentemann (NASA)
NORFest2023 Keynote address: Chelle Gentemann (NASA)dri_ireland
 
The Archiving Reproductive Health project as a FAIR data resource for humanit...
The Archiving Reproductive Health project as a FAIR data resource for humanit...The Archiving Reproductive Health project as a FAIR data resource for humanit...
The Archiving Reproductive Health project as a FAIR data resource for humanit...dri_ireland
 
Developing a self-care protocol for working with potentially traumatic data: ...
Developing a self-care protocol for working with potentially traumatic data: ...Developing a self-care protocol for working with potentially traumatic data: ...
Developing a self-care protocol for working with potentially traumatic data: ...dri_ireland
 
An Introduction to the Digital Repository of Ireland
An Introduction to the Digital Repository of Ireland An Introduction to the Digital Repository of Ireland
An Introduction to the Digital Repository of Ireland dri_ireland
 
DRI Copyright and Licencing_UCC_Mar23.pptx
DRI Copyright and Licencing_UCC_Mar23.pptxDRI Copyright and Licencing_UCC_Mar23.pptx
DRI Copyright and Licencing_UCC_Mar23.pptxdri_ireland
 
The Digital Repository of Ireland Digital Preservation and Research Sustainab...
The Digital Repository of Ireland Digital Preservation and Research Sustainab...The Digital Repository of Ireland Digital Preservation and Research Sustainab...
The Digital Repository of Ireland Digital Preservation and Research Sustainab...dri_ireland
 
DRI's role in WorldFAIR: Cultural Heritage / Image Sharing
DRI's role in WorldFAIR: Cultural Heritage / Image SharingDRI's role in WorldFAIR: Cultural Heritage / Image Sharing
DRI's role in WorldFAIR: Cultural Heritage / Image Sharingdri_ireland
 
Introduction to research data management
Introduction to research data managementIntroduction to research data management
Introduction to research data managementdri_ireland
 
Archiving Ports, Ports as Archives
Archiving Ports, Ports as ArchivesArchiving Ports, Ports as Archives
Archiving Ports, Ports as Archivesdri_ireland
 
Preservation, Access, Discovery
Preservation, Access, DiscoveryPreservation, Access, Discovery
Preservation, Access, Discoverydri_ireland
 
Dublin in the Fingal Archives
Dublin in the Fingal ArchivesDublin in the Fingal Archives
Dublin in the Fingal Archivesdri_ireland
 
Dublin Ghost Signs
Dublin Ghost SignsDublin Ghost Signs
Dublin Ghost Signsdri_ireland
 
Mapping Memories: Participatory Media, Place-Based Stories, Refugee Youth
Mapping Memories: Participatory Media, Place-Based Stories, Refugee YouthMapping Memories: Participatory Media, Place-Based Stories, Refugee Youth
Mapping Memories: Participatory Media, Place-Based Stories, Refugee Youthdri_ireland
 
Supporting Activists to Preserve Video Documentation
Supporting Activists to Preserve Video Documentation Supporting Activists to Preserve Video Documentation
Supporting Activists to Preserve Video Documentation dri_ireland
 
Making the Future
Making the FutureMaking the Future
Making the Futuredri_ireland
 

More from dri_ireland (20)

NORFest 2023 Lightning Talks Session Two
NORFest 2023 Lightning Talks Session TwoNORFest 2023 Lightning Talks Session Two
NORFest 2023 Lightning Talks Session Two
 
NORFest 2023: Early Career Researcher Panel on Research Assessment
NORFest 2023: Early Career Researcher Panel on Research AssessmentNORFest 2023: Early Career Researcher Panel on Research Assessment
NORFest 2023: Early Career Researcher Panel on Research Assessment
 
NORFest 2023: National Open Research Fund 2023, Projects Launch
NORFest 2023: National Open Research Fund 2023, Projects LaunchNORFest 2023: National Open Research Fund 2023, Projects Launch
NORFest 2023: National Open Research Fund 2023, Projects Launch
 
NORFest 2023 Lightning Talks Session Three
NORFest 2023 Lightning Talks Session Three NORFest 2023 Lightning Talks Session Three
NORFest 2023 Lightning Talks Session Three
 
NORFest 2023 Lightning Talks Session One
NORFest 2023 Lightning Talks Session OneNORFest 2023 Lightning Talks Session One
NORFest 2023 Lightning Talks Session One
 
NORFest2023 Keynote address: Chelle Gentemann (NASA)
NORFest2023 Keynote address: Chelle Gentemann (NASA)NORFest2023 Keynote address: Chelle Gentemann (NASA)
NORFest2023 Keynote address: Chelle Gentemann (NASA)
 
The Archiving Reproductive Health project as a FAIR data resource for humanit...
The Archiving Reproductive Health project as a FAIR data resource for humanit...The Archiving Reproductive Health project as a FAIR data resource for humanit...
The Archiving Reproductive Health project as a FAIR data resource for humanit...
 
Developing a self-care protocol for working with potentially traumatic data: ...
Developing a self-care protocol for working with potentially traumatic data: ...Developing a self-care protocol for working with potentially traumatic data: ...
Developing a self-care protocol for working with potentially traumatic data: ...
 
An Introduction to the Digital Repository of Ireland
An Introduction to the Digital Repository of Ireland An Introduction to the Digital Repository of Ireland
An Introduction to the Digital Repository of Ireland
 
DRI Copyright and Licencing_UCC_Mar23.pptx
DRI Copyright and Licencing_UCC_Mar23.pptxDRI Copyright and Licencing_UCC_Mar23.pptx
DRI Copyright and Licencing_UCC_Mar23.pptx
 
The Digital Repository of Ireland Digital Preservation and Research Sustainab...
The Digital Repository of Ireland Digital Preservation and Research Sustainab...The Digital Repository of Ireland Digital Preservation and Research Sustainab...
The Digital Repository of Ireland Digital Preservation and Research Sustainab...
 
DRI's role in WorldFAIR: Cultural Heritage / Image Sharing
DRI's role in WorldFAIR: Cultural Heritage / Image SharingDRI's role in WorldFAIR: Cultural Heritage / Image Sharing
DRI's role in WorldFAIR: Cultural Heritage / Image Sharing
 
Introduction to research data management
Introduction to research data managementIntroduction to research data management
Introduction to research data management
 
Archiving Ports, Ports as Archives
Archiving Ports, Ports as ArchivesArchiving Ports, Ports as Archives
Archiving Ports, Ports as Archives
 
Preservation, Access, Discovery
Preservation, Access, DiscoveryPreservation, Access, Discovery
Preservation, Access, Discovery
 
Dublin in the Fingal Archives
Dublin in the Fingal ArchivesDublin in the Fingal Archives
Dublin in the Fingal Archives
 
Dublin Ghost Signs
Dublin Ghost SignsDublin Ghost Signs
Dublin Ghost Signs
 
Mapping Memories: Participatory Media, Place-Based Stories, Refugee Youth
Mapping Memories: Participatory Media, Place-Based Stories, Refugee YouthMapping Memories: Participatory Media, Place-Based Stories, Refugee Youth
Mapping Memories: Participatory Media, Place-Based Stories, Refugee Youth
 
Supporting Activists to Preserve Video Documentation
Supporting Activists to Preserve Video Documentation Supporting Activists to Preserve Video Documentation
Supporting Activists to Preserve Video Documentation
 
Making the Future
Making the FutureMaking the Future
Making the Future
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

Fergus Fahey - DRI/ARA(I) Training: Introduction to EAD - Introduction to XML

  • 1. INTRODUCTION TO XML Fergus Fahey – Training officer ARA(I)
  • 2. Format of Workshop • Description of xml features • Practical exercise
  • 3. What is XML • XML stands for EXtensible Markup Language. • XML was designed to store and transport data. • XML was designed to be both human- and machine-readable • XML is a software- and hardware-independent tool for storing and transporting data • “XML does not DO anything” • Very widely used to store and share data: • By libraries to share bibliographic data • By software applications e.g. podcast metadata, • By banks e.g. to process Single Euro Payments Area
  • 5.
  • 6. XML Does Not DO Anything <tramTicket> <type>return</type> <from>Central 1</from> <to>Red 2</to> <validUntil>Last Tram</validUntil> <date>31 Jul 06</date> <for>Adult</for> <on>Luas only</on> <timeIssued>21:15</timeissued> <price>2.90</price> <number>6004375019</number> </tramTicket>
  • 8. Marc record processed 000 02617cam 22004931a 450 001 1197435 005 20030227130037.0 008 940923s1840 enkabcf 00 0 eng u 035 __ |a (UPRA)CTYXRL7078-B 035 __ |9 CAF1680YL 040 __ |c UPRA |d CtY-BR 043 __ |a n-us--- 090 __ |a Za W679 |b +840s 100 1_ |a Willis, Nathaniel Parker, |d 1806-1867. 245 10 |a American scenery, or, Land, lake, and river illustrations of transatlantic nature : |b 246 246 30 |a Land, lake and river illustrations of transatlantic nature 260 __ |a London : |b George Virtue, |c 1840 Author: Willis, Nathaniel Parker, 1806-1867. Title: American scenery, or, Land, lake, and river illustrations of transatlantic nature : uniform with Dr. Beattie's Switzerland, Scotland, & Waldenses / from drawings by W.H. Bartlett, engraved in the first style of the art, by R. Wallis, J. Cousen, Willmore, Brandard, Adlard, Richardson, &c ; the literary department by N.P. Willis. American scenery Land, lake and river illustrations of transatlantic nature Published: London : George Virtue, 1840 Description: 30 parts : ills., map, port. ; 29 cm. Location: BEINECKE (Non-Circulating) Call Number: 2003 +56 Library has: pt.1-pt.30
  • 9. Html Hyper Text Mark-up Language • HTML was designed to display data - with focus on how data looks (Unlike the MARC example) • HTML – Has predefined tags: • <b> for bold • <p> for paragraph • HTML tags relate to layout and appearance of text/data and images • HTML is permissive i.e. HTML will still render if it includes invalid tags.
  • 10. HTML <html> <p> The <b>cat</b>sat on the <i>mat</i> </p> <img src=“catonmat.jpg”/> </html> The cat sat on the mat
  • 12. The Difference Between XML and HTML • The XML language has no predefined tags • The tags in the luas ticket example above (like <to> and <price>) are not defined in any XML standard. These tags are "invented" by the author of the XML document. • HTML works with predefined tags like <p>, <b>, <img>, etc. • With XML, the author must define both the tags and the document structure. • XML Separates Data from Presentation
  • 13. XML Tree root element <eu> element <memberState> element <name> element <area> element <population> element <headOfstate> element <capital> element <firstName> element <lastName> Text: Brussels Text: Belgium Text: 11,190,845 Text: 30,528 Text: Philippe Text: Saxe-Coburg- Gotha element <name> attribute “type”
  • 14. XML Syntax • XML documents must contain one root element that is the parent of all other elements • <root> <child> <subchild>.....</subchild> </child> </root>
  • 15. XML Syntax example <memberstate> <name>Belgium</name> <area>30,528</area> <population>11,190,845</population> <headOfstate type="Constitutional Monarch"> <lastName>Saxe-Coburg-Gotha</lastName> <firstName>Philippe</firstName> </headOfstate> <capital> <name>Brussels</name> <population AdministrativeDivision="Capital Region">1,138,854</population> </capital> </memberstate>
  • 16. XML Elements • An XML element is everything from (including) the element's start tag to (including) the element's end tag. <population>11,190,845</population> • An element can contain: • text • attributes • other elements • or a mix of the above <capital> <name>Brussels</name> <population AdministrativeDivision="Capital Region">1,138,854</population> </capital>
  • 17. XML Attributes • Attributes are designed to contain data related to a specific element. <headOfstate type="Constitutional Monarch"> <lastName>Saxe-Coburg-Gotha</lastName> <firstName>Philippe</firstName> </headOfstate> -------------------------------------------------------------------------------------- <headOfstate> <type>Constitutional Monarch</type> <lastName>Saxe-Coburg-Gotha</lastName> <firstName>Philippe</firstName> </headOfstate>
  • 18. XML Tree root element <eu> element <memberState> element <name> element <area> element <population> element <headOfstate> element <capital> element <firstName> element <lastName> Text: Brussels Text: Belgium Text: 11,190,845 Text: 30,528 Text: Philippe Text: Saxe-Coburg- Gotha element <name> attribute “type”
  • 19. XML Namespaces • In XML, element names are defined by the developer. This often results in a conflict when trying to mix XML documents from different XML applications. • This XML carries HTML table information: <table> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> This XML carries information about a table (a piece of furniture): <table> <name>African Coffee Table</name> <width>80</width> <length>120</length> </table>
  • 20. Xml Namespaces • <h:table> <h:tr> <h:td>Apples</h:td> <h:td>Bananas</h:td> </h:tr> </h:table> <f:table> <f:name>African Coffee Table</f:name> <f:width>80</f:width> <f:length>120</f:length> </f:table>
  • 21. Validating XML • XML documents must have a root element • XML elements must have a closing tag • XML tags are case sensitive • XML elements must be properly nested • XML attribute values must be quoted <eu> …. </eu> <lastName>Mattarella</Lastname> <lastName>Mattarella</lastName> <eu> <headOfstate type="Non executive President"> <eu> <country> <headOfstate type="Non executive President"> <population AdministrativeDivision=Capital Region> <population AdministrativeDivision="Capital Region">
  • 22. Validating xml - dtd • An XML document with correct syntax is called "Well Formed". • An XML document validated against a DTD is both "Well Formed" and "Valid“ • Xml parser only knows what is valid if you tell it, e.g. doesn’t know that a country has a head of state but a capital does not. • Rules are created using a dtd file. • <!DOCTYPE eu • [<!ELEMENT eu (memberstate*)> • <!ELEMENT memberstate (name,area,population,headOfstate,capital)> • <!ELEMENT name (#PCDATA)> • <!ELEMENT area (#PCDATA)> • <!ELEMENT headOfstate (firstName,lastName)> • <!ELEMENT capital (name,population)> • <!ELEMENT firstName (#PCDATA)> • <!ELEMENT lastName (#PCDATA)> • <!ELEMENT population (#PCDATA)> • <!ATTLIST headOfstate type CDATA "0"> • <!ATTLIST population AdministrativeDivision CDATA "0">]>
  • 23. Three types of error • Badly formatted – missing closing tag, tags not matching, tags not nestled correctly • Not valid – doesn’t comply with dtd rules • Information is wrong, xml will not spot this in most circumstances, may spot it if information doesn’t comply with a rule. • Won’t spot <lastName>O’Higgins</ lastName > <firstName>Michael D.</firstName> • Might spot (if expecting alphabetic characters only): <lastName>O’Higgins</ lastName > <firstName>Michael D.</firstName>
  • 24. XML and XSLT • Xslt is one of a number of technologies which is used to process xml • In our example we will use xslt to pick out individual xml elements and use html to display them in a web browser. • In my experience writing xslt is not easy, more difficult than any other programing language I’ve used. • Good news you don’t necessarily have to use xslt to use xml or EAD.
  • 25. Useful links • W3 schools xml tutorial http://www.w3schools.com/xml/default.asp • W3 schools xslt tutorial http://www.w3schools.com/xsl/default.asp