Note 3 for XML

Watch & Read:

DTDs are used to validate the XML documents structure and contents

FTP login
 

Note: The host address is
e-commerce.pvc.maricopa.edu

 

Your Password should be the same as Blackboards

 

Our Webspace is at
http://ecommerce.pvc.maricopa.edu

Try downloading the FTP Program

 

Check out the FTP tutorials WS FTP for Windows and for the MAC Fetch and Transmit.

 

IE use to act like a low level validate tool.

The old XML Notepad (not the 2007 version) validates your XML

DTD Provides:

  1. A way to specify (restricting) the type of data that needs to be in the XML document (Validating)

  2. A documentation of the XML document's structure

  3. A sharable description of an XML Document (something to design toward)

USE a DTD to specify content (only one DTD per document)

To identify a DTD you need to specify a

<!DOCTYPE

You can have an internal, external or mixed reference (both)

Syntax for DTD:

Internal Reference : <!DOCTYPE RootElement [

<!ELEMENT name category> ... ]>

External Reference : <!DOCTYPE RootElement SYSTEM "filelocation">

<!ELEMENT name category> for defining Elements

<!ATTLIST element-name attribute-name attribute-type default-value > for defining Attributes of Elements

Element will appear only once!
+ Element will appear one or more times!
<!ELEMENT element-name (child-name)>
<!ELEMENT element-name (child-name+)>
* Element will appear 0 or more times!
<!ELEMENT element-name (child-name*)>
, Elements must appear in the identified order
<!ELEMENT element-name (child-name1, child-name2, child-name3)>
| Elements can appear in any order
<!ELEMENT element-name (child-name1 | child-name2 | child-name3)>

 

<![CDATA[ reference a script or <img src='foo.gif'> ]]> Sample of Character data and including a reference to a link

Review the following:

Class XML will be used for this demonstration. Create a DTD for this example!

Check http://www.w3schools.com for more examples of DTD

 

 

Terms you need to Lookup:

Well formed vs Valid

Homework:

You should have an XML & HTML version of your resume!

Read: pg 63-95 in XML All-in One Dummies

Final Step:

Review in your mind everything we covered in class and remember to cover it again before you go to bed so your mind to process this information while you sleep.