You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tags are case-sensitive: <FOO>...</foo> does not match
Tags are nested arbitrarily
XML has only one basic type, which is text
Two ways of representing a database:
Elements intermixed
One element following another
Consistency of ID and IDREF Attribute Values
ID stands for identifier. The values across all IDs must be distinct
IDREF stands for identifier reference. If an attribute is declared as IDREF, then ...
the associated value must exist as the value of some ID attribute (i.e., no dangling "pointers")
IDREFS specifies “several” (0 or more) identifiers
IDREFs are a lot like Foreign Keys ...except that IDREFs don’t have data types!
We say that an XML document is well-formed if the document (with or without an associated DTD) has proper nesting of tags and the attributes of every element are all unique
We say that an XML document x is valid with respect to a DTD D if x conforms to D. That is, if the document x conforms to the regular expression grammar and constraints given by D
XML Schema: An extension of DTDs that allows one to impose a schema or type on an XML document
Query Languages for XML
XPath: Language for navigating through an XML document
XQuery: Query language for XML, similar in power to SQL
XSLT: Language for extracting information from an XML document and transforming it
Template
Start the document with a declaration, surrounded by <?xml... ?>
The document starts with a root tag that surrounds nested tags
<?xml version = "1.0" standalone = "yes"?>
DTD Structure
Document Type Descriptors (DTDs)impose structure on an XML document, much like relation schemas impose a structure on relations
The DTD is just a syntactic specification, not a semantic specification
<!DOCTYPE <root tag> [
<!ELEMENT <name>(<components>)>
. . . more elements . . .
]>