Megan Taylor

front-end dev, volunteacher, news & data junkie, bibliophile, Flyers fan, sci-fi geek and kitteh servant

Intro to Databases, Video Lecture 5: XML Data, DTDs, IDs and IDREFs

“Valid” XML
adheres to basic structural requirements
also adheres to content-specific specifications
– document type descriptor (DTD)
– XML schema (XSD)

test XML with validating XML parser

DTDs
grammar-like language for specifying elements, attributes, nesting, ordering, #occurrences
also special attribute types ID and IDREFs

Benefits of using DTDs
programs can assume structure
CSS/XSL can assume structure
specification – data exchange
documentation

Benefits of NOT using DTDs
flexibility, ease of change
DTDS can be messy – irregular
XSDs can be REALLY messy

ID and IDREF attributes
give elements IDs and refer to them in other elements with IDREFs
must be unique

#REQUIRED vs #IMPLIED

use symbols like regular expressions

| or
* 0 or more
? optional
CDATA or #PCDATA strings
+ 1 or more

October 23, 2011 | Comments Off on Intro to Databases, Video Lecture 5: XML Data, DTDs, IDs and IDREFs | Categories: Posts | Permalink

Comments are closed.

%d bloggers like this: