XML is eXtensible Markup Language. XML is designed to transport and store data.
Benefits of XML Separates Data from Layout/Design Simplifies Data Sharing Simplifies Data Transport Simplifies Platform Changes Makes Your Data More Available for Repurposing
XML Format <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book></bookstore>
<?xml version="1.0" encoding="ISO-8859-1"?> <csu> <!-- ACCT 2101 Principles of Accounting 1 (3-0-3) --> <ACCT> <scbcrse_subj_code>ACCT</scbcrse_subj_code> <scbcrse_subj_name>Accounting</scbcrse_subj_name> <scbcrse_crse_numb>2101</scbcrse_crse_numb> <scbcrse_lec_hr_low>3</scbcrse_lec_hr_low> <scbcrse_lab_hr_low>0</scbcrse_lab_hr_low> <scbcrse_credit_hr_low>3</scbcrse_credit_hr_low> <scrsyln_long_course_title>Principles of Accounting 1 </scrsyln_long_course_title> <scbdesc_text_narrative> A study of the underlying theory and application of financial accounting concepts. It introduces accounting as a decision making tool. Financial accounting principles, methods, and procedures, including assets, liabilities, equity, and financial statements are examined. (Course fee required.) </scbdesc_text_narrative> </ACCT> </csu>
Syntax Rules All XML Elements Must Have a Closing Tag XML Tags are Case Sensitive XML Elements Must be Properly Nested XML Documents Must Have a Root Element XML Attribute Values Must be Quoted
Syntax Rules Entity References Comments in XML <!-- This is a comment -->
XSL is eXtensible Stylesheet Language Components: XSL-FO XSLT XPath
XSL-FO is eXtensible Stylesheet Language Formatting Objects language for formatting XML data for output to screen, print or other media
XPath is a language for finding information in an XML document a syntax for defining parts of an XML document uses path expressions to navigate in XML documents contains a library of standard functions a major component of XSLT
XSLT is eXtensible Stylesheet Language Transformations a way to transform an XML document into HTML far more sophisticated than CSS
Process 2007 – RFP for Web Content Management System Selected OmniUpdate OUCampus 2007 – 2010 – manually migrated sites into CMS Table designed HTML pages; CSS; PHP CSS designed HTML pages; CSS PHP
Process 2010 – University Branding effort Changed domain from colstate.edu to ColumbusState.edu New Logos New Web Page designs
Lessons Learned White-space is Preserved in XML XML Naming Rules Names can contain letters, numbers, and other characters Names cannot start with a number or punctuation character Names cannot start with the letters xml (or XML, or Xml, etc) Names cannot contain spaces Any name can be used, no words are reserved.
Lessons Learned Naming Practices Avoid "-" characters. Avoid "." characters. Avoid ":" characters. Non-English letters like éòá are perfectly legal XML elements are Case Sensitive
Lesson Learned Weak error reporting with vague messages No room for small typos and mistakes Bell shaped learning curve Invest in training and/or personnel Database vs XML arguments
HTML to XML/XSL: Lessons Learned Jay Knape Senior Manager of Web Content ServicesUniversity Information & Technology ServicesColumbus State University knape_jay@ColumbusState.edu Twitter: @knape_jay