XML

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

DTD Example

<!DOCTYPE NEWSPAPER [ <!ELEMENT NEWSPAPER (ARTICLE+)> <!ELEMENT ARTICLE (HEADLINE, BYLINE, LEAD, BODY, NOTES)> <!ELEMENT HEADLINE (#PCDATA)> ... <!ATTLIST ARTICLE AUTHOR CDATA #REQUIRED> <!ATTLIST ARTICLE EDITOR CDATA #IMPLIED> ... <!ENTITY NEWSPAPER "Vervet Logic Times"> <!ENTITY PUBLISHER "Vervet Logic Press"> <!ENTITY COPYRIGHT "Copyright 1998 Vervet Logic Press"> ]>

Namespace Example

<-- Start with namespace declaration --> <h:html xmlns:xdc="http://www.xml.com/books" xmlns:h="http://www.w3.org/HTML/1998/html4"> <h:head><h:title>Book Review</h:title></h:head> <h:body> <xdc:bookreview> <xdc:title>XML: A Primer</xdc:title>

What is XHTML?

A set of HTML markup tags that follow all the well-formedness rules of XML -Extensible HyperText Markup Language -Designed to replace HTML -Uses the HTML tag set but is written using the XML syntax rules -Is a cleaner, stricter version of HTML

Who created it, when?

Also a creation of W3C - first developed in 2001. Current version: XML 1.0 and XML 1.1

What is Semantic Web

An extension of the World Wide Web that provides a standardized way of expressing the relationships between webpages, to allow machines to understand the meaning of hyperlinked information This "understanding" is based on structured sets of information and inference rules that define the relationship between different data resources The idea is to publish data in a reusable form

What are some CSS limitations when used with XML

CSS limitations -Reordering and sorting of elements is not possible -Generation of text is difficult or not practical -Adding functionality, such as creating a link from certain content elements, is not possible

What are the goals of XML

Development Goals -XML shall support a wide variety of applications. XML should be beneficial to a wide variety of diverse applications: authoring, browsing, content analysis, etc. -It shall be easy to write programs that process XML documents. -The number of optional features in XML is to be kept to an absolute minimum, ideally zero, thus minimizing compatibility issues. -XML documents should be human-legible and reasonably clear. -The design of XML shall be formal and concise. -XML docs should be easy to create

What is XML

Extensible Markup Language: an application- and platform-independent way to represent data It is a markup language that lets information systems share structured data

what is the purpose of HTML

HTML - designed to display data, with focus on how data looks

What are characteristics of HTML tags

HTML tags are predefined with a set meaning

What makes XML Unique

It is a standard that lets users create their own tags to structure and store data

HTML Vs. XML

Library Book List Example - HTML <table> <tr> <th>ISBN</th> <th>Genre</th> <th>Last Name</th> <th>First Name</th> <th>Title</th> </tr> <tr> <td>1595476512</td> <td>Children's</td> <td>Lang</td> <td>Andrew</td> <td>Blue Fairy Book</td> </tr> </table> Library Book List Example - XML <?xml version="1.0" encoding="ISO-8859-1"?> <books> <book> <isbn>1595476512</isbn> <genre>Children's</genre> <author> <lastName>Lang</lastname> <firstName>Andrew</firstName> </author> <title>Blue Fairy Book</title> </book> <book> <isbn>0451169514</isbn> <genre>Horror</genre>

How is XML like HTML

Like HTML, XML ... -produces a flat, text file. -needs other software to send, receive, display, or make use of the data within -XML and HTML share very similar structure and syntax -Both begins with declaration <?xml version="1.0" encoding="UTF-8"?> vs. <!DOCTYPE HTML> -Both requires a root element that contains all other elements (for HTML, it's <html></html>) -Both use opening tags and closing tags -XML and HTML elements can all be given attributes and values -Comments can be inserted using <!-- text

What is XML Schema -XSD

Recommended by W3C to replace DTD -Describes the structure of an XML document -Defines the elements that can appear -Defines the elements that are allowed -Defines parent-child relationships for elements -Defines the order and number of child elements -Defines empty elements -Defines data types for elements and attributes -Defines default and fixed values

What are characteristics of XML documents

The documents are self-describing The documents are a hierarchy of nested objects

Web Ontology Language (OWL):

defines the type of relationships that can be expressed in RDF using XML to indicate the hierarchies and relationships between different resources

XML Applications

digital libraries (Perseus Project), archival projects (Harvard University E-Journal Archive Project and The Making of America II Project). A detailed list is here:

How is an XML file validated,

- a Document Type Definition (DTD) needs to be referenced to the XML processor -Like CSS, DTD can exist within an XML or referenced externally -XML processor: a software module that Sits between the -XML file and the software application (such as RSS feed generator) that will be using the file -Reads the XML doc to find out the structure and content -DTD are used to define the necessary rules of an XML document. It describes the structure, content, and quantity of elements, attributes, and entities that can exist within an XML -DTD allows verification that an XML document is structurally consistent with a formal specification -Files sharing a single DTD can be sure to have the same data structure -XML validator: XML editing software or online

What are the Charactersics of a Well Formed XML Doc

-A well formed XML document simply markup pages with descriptive tags that conform to XML syntax rules, no need for explanation of the tags -XML documents must contain at least one element -Every element must have a start tag and end tag -Tags are case sensitive: <LastName>, <lastName>, and <lastname> are three different tags - tags cannot overlap - a child element must be closed before its parent element is closed -Attribute values must be enclosed in single or double quotation signs -Reserved characters, such as "<" or "&", can only be used in the elements by its entity references, such as &lt; and &amp;

What are some Features of XSLT

-Add/remove elements and attributes to or from the output file -Rearrange and sort elements -Perform tests and make decisions about which elements to display -With XSLT, you can transform one XML into three different types of formats (such as HTML, a slide presentation, and a PDF) using 3 different XSLT

What is Metadata

-Data about data -Structured information used to identify, describe, manage, and locate resources -Earliest form: Catalog record

What are some Elements of DTD Syntax

-Element declarations and definitions : Elements are declared and defined with their relationships in the DTD file. -Attribute declarations and definitions : Element classes or attributes are declared and defined in the DTD file. -Entities : Entities are the same thing as variables inside a DTD file or XML document. They can hold any kind of data.

What is EAD

-Encoded Archival Description: an XML standard for encoding archival finding aids that is maintained by the Library of Congress in partnership with the Society of American Archivists

What are some XHTML rules:

-Must contain a root element -Must be properly nested -Must be properly closed

What is Namespaces?

-Namespaces are a simple and straightforward way to distinguish names used in XML documents, no matter their source, so that <book:title> is different from <song:title> -Using namespace, each element now has a two-part name, a namespace identifier and a local name -You can combine XML content from different sources, but then you might encounter tags of same name with different context (Title for books, vs. songs, etc)

Name some examples of XML

-RSS: RDF (Resource Description Framework) Site Summary - an open method of syndicating and aggregating Web content -MARC XML (uses and features) Uses: for representing a complete MARC record in XML as an extension schema to METS (Metadata Encoding and Transmission Standard) to represent metadata for OAI harvesting for original resource description in XML syntax for metadata in XML that may be packaged with an electronic resource -MODS - Metadata Object Description Schema A descriptive metadata standard Uses XML schema language A derivative of MARC (more user-friendly and has a simpler element set) Uses include: represent metadata for harvesting; serves as a core element set for convergence between MARC and non-MARC XML descriptions; provides a resource description in XML syntax that is simpler than full MARC

What are the pros of MARC XML

-The schema supports all MARC encoded data regardless of format -XML framework is a component-oriented, extensible architecture allowing users to plug and play different software pieces to build custom solutions

What are some features of XSD

-Written in XML -Support data-types -Enforce more specific limitation of element and attribute contents -Specify inheritance of one data type by another -More flexible and expressive (hence more powerful and complicated) than DTDs -Supports the use of namespaces

What are characteristics of XML tags

-XML lets the developers create and choose the names of the elements, the attributes and the data the elements will contain, recall the book list example predefined with a set meaning -XML needs to be well formed and validated

What happens when the file is not well formed?

...

Resource Description Framework (RDF):

17 An XML-based standard for describing resources that exist on the Internet

What are 2 styling options for XML?

Two options -CSS and XSLT (Extensible Stylesheet Language Transformation) XSLT is a language for transforming XML documents into a format (such as HTML) that is recognized by the browser

what is the purpose of XML

XML - designed to transport and store data, with focus on what data is


Ensembles d'études connexes

Carskadon Psychology Unit 3 (Social Psychology, Psychological Disorders, and Personality)

View Set

Chapter 4: Work Breakdown Structure

View Set

Forms of Business Organization 8.1

View Set

systems of equations (3 variables)

View Set

NUR 417 Genomics in Nursing Quiz #2

View Set