Download presentation
Presentation is loading. Please wait.
Published byLorraine Wood Modified over 9 years ago
1
and XML A primer for Web design students
2
Why PHP and XML? Aren’t these just passing fad buzzwords to make cyber-snobbish people sound intelligently superior at cocktail parties? Can’t I just develop all my information in HTML and leave it at that? If I’m already using HTML on IIS on.NET, why would I want to use PHP and MySQL or XML with XSLT to generate XHTML and XSL-FO to generate PDFs?
3
Disoriented paranoid state of mind caused by excessive exposure to an overwhelming number of technology acronyms and buzzwords. Easily cured by this presentation. Acronymophobia (ăk'rə-nĭmă'fōbē-ə) n.
4
Today, we’ll cover… 1.PHP and MySQL for dynamic web pages 2.XML Overview 3.XML terms and processes 4.XML transformations 5.XML software 6.Impact of XML
5
1. What is PHP? Originally “Personal Home Page,” a variant of Perl scripting language. Open-source language for server-side scripting applications. Works with variety of relational databases to create dynamic web sites on just about any server platform.
6
index.html résumé.html writing.html presentations.html Web Server Static Web Pages
7
index.php Dynamic Web Pages Web Server Template XHTML
8
Basic PHP Template
9
PHP Variables <?php $txt="Hello World"; echo $txt; ?>
10
PHP Conditionals <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; else echo "Have a nice day!"; ?>
11
PHP Functions Similar to JavaScript functions, but more powerful. More than 700 unique functions. phpinfo( ) function - used for outputting information phpforms ( ) function - inputting information to database
12
PHP Form Function Enter your name: Enter your age:
13
PHP Example English Department reservation system Built from open-source program called MRBS (Meeting Room Booking System) http://reserve.engl.iastate.edu/
14
2. XML overview XML is a metalanguage, i.e. a language that defines the rules and symbols of another language. XML is not used on the web, but instead used to define other markup languages, such as XHTML, the replacement of HTML. Allows us to define markup languages customized to our individual needs instead of relying on pre-existing tags.
15
Think of XML as…. An indented outline of a very large document. A database table expressed via element tags within one big flattened text file. A family of technologies that work in tandem to express information in a variety of ways. The Rosetta Stone of the information age, allowing you to move information from one context to another through a standardized structure.
16
XML Example Lee Honeycutt 3938 Christytown Road Story City Iowa 50248-1234
17
Uses of XML Provides a simpler method of structuring large data sets compared to earlier tagging systems like SGML. Publishes information to various media formats from a single source. Serves as a platform-independent lingua franca for sharing hierarchically structured information between various programs. Embeds links in RSS feeds for news and weblogs.
18
Impact of XML Provides greater flexibility in organizing information, but also introduces greater complexity. Requires greater upfront planning and design of information sets and their rhetorical use. Separates content from style, which has huge rhetorical implications.
19
3. Key XML Terms & Processes Elements - similar to HTML, but defined by the user instead. They describe, in human language, the data they surround. Attributes - name and value pairs used to distinguish unique instances of an element. Entities - shorthand placeholders for information used often within a document DTDs & Schemas - declared dictionaries of elements that model a document’s content.
20
XML Example Lee Honeycutt 3938 Christytown Road Story City Iowa 50248-1234
21
Purpose of DTDs & Schemas Define the set of allowed tags and attributes in the document. Describe a document’s content model using rules by which tags and data are ordered. Provide easy model management through references to shortcuts and external files.
22
Anatomy of a DTD Entity - shorthand name/value pairs that make XML docs easier to write and parse. Similar to a Word macro. EX: Elements - define actual markup tags. EX:
23
Entity placed in a document Though its claim to the first digital computer is debatable, &isu; does have the world’s only six-sided virtual reality facility. When XML is parsed, &isu; expands to “Iowa State University”
24
4. Transforming XML XSL (Extensible Stylesheet Language) - special type of XML document that transforms XML data into styled format. Similar to HTML’s Cascading Stylesheets. XSLT (Transformations) - usually used for transformation to XHTML. XSL-FO (Formatting Objects) - used for page formats such as PDF and MS Word.
25
XML Transformations XML DTD XSLTXSL-FOXHTML
26
XSLT stylesheets… …contain two types of elements: Instructions - describe how nodes of the XML document will be transformed. Literals - output text, such as XHTML tags, that appear exactly as they appear in the stylesheet. Act as a template for XML content.
27
Instructions & Literals Browse Record Database Name:
28
XPath XPath - syntax for describing how nodes of an XML document are processed. Conditionals
29
5. XML Software Some applications are moving to XML as their foundation. EX: OpenOffice. Most database programs have an XML export feature. XML editors and companion components: Cross Platform - Editix, oXygen, Exchanger Windows - XML Spy, XMetal, and Stylus
30
6. Impact of XML Provides greater flexibility in organizing information, but also introduces greater complexity. Requires greater upfront planning and design of information sets and their rhetorical use. Separates content from style, which has huge rhetorical implications, just as does the use of CSS.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.