Title: Advanced Technical Writing 2006
1Advanced Technical Writing2006
Session 3
2Today in Class
- Show-n-tell your CSS Objects from exercise 1
- Meet with your editorial team, refine/post
deliverables - Send URL for deliverables to Bill to post on
class page - Brief intro to XML
3A brief introduction to XML
As customized as necessary As generalized as
possible
4What is XML
- eXtensible Markup Language (much cooler than eML,
eh?) - Think of it as a generic way to describe markup
languagesallowing users to create their own tags
which describe what is sometimes called the
semantic structure of a document
5What is XML
- Still confused? XML is a subset of SGML, the
publishing industry standard for describing
content so that it can be stored, referenced,
distributed, and presented consistently across
diverse systems
6This is XML
This could be finer grained..
- lt?xml version"1.0"?gt
- ltcitationgt
- ltauthorgtHart-Davidson, Williamlt/authorgt
- ltdategt2000lt/dategt
- ltpublishergt
- ltpnamegtDrybooks Inc.lt/pnamegt
- ltpcitygtAntwerplt/pcitygt
- lt/publishergt
- lt/citationgt
Well formed, but not valid XML
7What does XML do? 1
- XML allows you to define the pieces of
information (or objects, as we came to know them
last week) that make up a document in such a way
as to allow both humans and machines to recognize
them and act upon them
8What does XML do? 2
- For machines, XML defines the logical structure
of the document, giving names to things so they
can be recognized (parsed) or referenced in
conditional statements, etc - for people, it provides a way to describe what
Id rather call the rhetorical structure of the
document
9How does XML work?
xml
style rules
Dtd
An xml document is made valid when a Document
Type Definition (or Schema) is present that
describes types of elements and the relationships
among elements for the document
10An XML scenario, 1
Chicago dtd
Using a program that exports citation listings in
XML, he enters info for lots of books..each is
stored as an XML file
Bill downloads a DTD that describes citation
lists according to the Chicago Manual of Style
11An XML scenario, 1
Bill watches as the browser builds his reference
list
Bill creates a CSS document that describes how
Chicago Style references lists look
Chicago css
He could have also used XSLT
12An XML scenario, day 2
Bill downloads a new DTD, this one for MLA style
citations, and a new style sheet too!
Bills editor wants the same list in MLA format!
13A bit more about DTDs
- DTDs are the place where XML tag sets are
defined. They are pretty powerful meta-documents
that determine what the folks reading and writing
XML documents of a particular type can and cannot
include, search for, etc.
14A bit more about DTDs
- We can consider DTDs, or their newer and more
flexible counterparts called XML Schema, as
workspaces. They define conceptual and physical
boundaries for content developers - Their design is a critical task for the content
specialist. Well wrought DTDs Schema can
greatly impact the both user experience, the
development cycle, and, hence, the
business/mission.
15Lets Do a Little XML exercise
- Think of a document type that has sufficiently
granular content as to make it pretty simple to
come up with some XML tags to describe it. - Hint if you must, use a recipebut try to be
more creative - Draft an xml document and make up the tags that
you think you would need. - Name your tags with semantic labelsthat is,
identify functional objects within the document
that we would want to keep separate from the
structure
16Inside the DTD
- A DTD is just a list of declarations. Lets
consider three common types - The first declaration names the DOCTYPE.
lt!DOCTYPE document_name the rest of the dtd
heregt
17Inside the DTD, 2
- 2. Then come declarations of document ELEMENTs.
lt!ELEMENT element_name (data_type)gt
18Inside the DTD, 3
- 3. Finally, there may be declarations for
ATTRIBUTES of an ELEMENT.
lt!ATTLIST parent_element attribute_name data_type
default_valuegt
19This is a DTD
- lt!DOCTYPE citation
- lt!ELEMENT book (author, date, publisher)gt
- lt!ELEMENT author (PCDATA)gt
- lt!ELEMENT date (PCDATA)gt
- lt!ELEMENT publisher (PCDATA)gt
- lt!ATTLIST publisher pname CDATA REQUIREDgt
- lt!ATTLIST publisher pcity CDATA REQUIREDgt
-
- gt
20Another X-ercisewell review these next time!
- Find an article in the online version of your
local newspaper. - 2. Go to http//www.xmlnews.org/docs/story-tutoria
l.html - And follow along with the tutorial, using your
story as an example. - 3. Pick out several objects and create markup
by using CSS to color code your news story each
color should correspond to an item on the DTD
21A Few More Xs
- What is XHTML?
- Quite simply, it is html redescribed as an XML
DTD. Or another way to say it is that XHTML is
the current default web DTD. The W3C may stop
issuing HTML spec. in the future and just
describe a baseline web DTD or Schema.
22A Few More Xs
- What is XSL? XSL-T?
- The xml stylesheet specification. XSLT is a very
robust spec for transforming an XML document of
one type into one of another typemeaning you can
do more than just style information for
display, you can also change it into other forms.
23Good references for CSS XML
- www.webmonkey.com
- www.xml.com
- www.w3c.org
24Readings.
- http//12.108.175.91/ebookweb/stories/storyReader
380 - An article on eBookWeb about XML, structure, and
content. - If you have it handy, you can read Rockley Ch. 14
and Ch. 20.
25Next Time
- Semantic Markup 1 - CSS, XML, More
- Read Rockley, Ch. 1 and Ch. 14 Clark (pdf)
- Send e-mail to Bill H-D w/ URL for editorial team
deliverables