Higher Level Dist Tools pt1 Flashcards
What does XML stand for?
In General, what is it?
eXtensible Markup Language
It is another markup language that adds meda-information to a document (liek HTML)
- Meta-info is information about information
XML is not about presentation.
What are the differences between XML and HTML?
In HTML there are pre-defined tags, defined by the HTML specification.
With XML you define your own tags to suit your application
- eg. <dnasequence> ... </dnasequence>
XML is focused on document content description, not presentation.
Enables effective data structuring and simplified data exchange
- Meaning, you can define your own data “type” and distribute the type of definition with documents (DTDs and XML schemas)
What are the important notes about XML?
The tags are entirely chosen by the user
- As long as the code involved agrees, this is fine
There can only be a single “root” tag in any XML document
All tags MUST have matching closing tags
- <tab> and </tab>
Tags MUST be properly nested
- <tag1><tag2>...</tag2></tag1>is illegal
White space IS preserved in XML
XML itself does nothing? What does this mean?
XML is not a way to transform data, it is purely description
How is an XML file processed?
How an XML file is processed deponds on how an XML-aware application (code) chooses to manipulate the file.
Applications must parse and interpret the XML and then process the tag appropriately
What does it meal for an XML document to be “well formed”
Any XML document that conforms to the syntactic rules defined by XML is said to be “well formed”
However, just because it is well formed, doesn’t necessarily mean it is valid.
What does it mean for an XML document to be “valid”?
An XML file’s structure must be described using a Document Type Definition (DTD) file.
In general what is a DTD?
DTD = Document Type Definition, it describes the structure of a particular type of XML file.
The DTD file can be used:
- As a reference when creating XML files that are expected to meet the type definition
- by an application that wishes to process such files to know what it shoudl expect
- by an XML type checker/verified that can use the DTD to verify that any given XML file conforms to the specfification in the DTD (ie. “is valid”).
How is a DTD references/used?
A DTD can either be provided inline with an XML document or referenced in an external file
- Of course external is preferred as it is easy to maintain consistency (just like CSS)
Using DTDs, an XML file is self-descriping
- So you can’t “forget” how to interpret it
DTD repositories can be created so unrelate users can use “standard” XML specifications in their code.
What is the code used in an XML file to refer to it’s DTD definition?
What doe the following DTD file code mean?
What does the following DTD code mean (which is a part of the attached code)
What are the operators allowed in DTD?
It is possible and likely that a single application may use more than one XML specification
- Like an app that integrates a number of different systems each with their own DTDs
What happens if there is unintentional name conflicts between multiple DTDs?
XML supports namespaces to handle this.
What modern implemntation has become the preferred alterative to DTDs?
What are the similarities and benefits?