HTML to XML/XSL:

2,420 views
2,290 views

Published on

edu Web 2011 Conference presentation

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,420
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

HTML to XML/XSL:

  1. 1. HTML to XML/XSL: Lessons Learned<br />Jay Knape<br />Senior Manager of Web Content ServicesUniversity Information & Technology ServicesColumbus State University<br />
  2. 2. Topics:<br />Introduction<br />Definitions<br />Migration<br />Future Plans<br />Lessons Learned<br />Q & A<br />
  3. 3. Introduction<br />
  4. 4. University<br />Columbus State University<br />Columbus, Georgia <br />100 miles southeast of Atlanta<br />8,298 students (fall 2010)<br />72 undergrad and 52 grad degrees<br />4 colleges<br />
  5. 5. Web Team<br />Report to CIO<br />4 Full-time Staff<br />3 Part-time Student Assistants<br />
  6. 6. Definition<br />
  7. 7. XML is<br />eXtensible Markup Language.<br />XML is designed to transport and store data.<br />
  8. 8. Benefits of XML<br />Separates Data from Layout/Design<br />Simplifies Data Sharing<br />Simplifies Data Transport<br />Simplifies Platform Changes<br />Makes Your Data More Available for Repurposing<br />
  9. 9. XML Format<br /><?xml version="1.0" encoding="ISO-8859-1"?><br /><bookstore>    <book category="WEB">    <title lang="en">Learning XML</title>    <author>Erik T. Ray</author>    <year>2003</year>    <price>39.95</price>  </book></bookstore><br />
  10. 10. <?xml version="1.0" encoding="ISO-8859-1"?><br /><csu> <br /><!-- ACCT 2101 Principles of Accounting 1 (3-0-3) --><br /> <ACCT><br /> <scbcrse_subj_code>ACCT</scbcrse_subj_code><br /> <scbcrse_subj_name>Accounting</scbcrse_subj_name><br /> <scbcrse_crse_numb>2101</scbcrse_crse_numb><br /> <scbcrse_lec_hr_low>3</scbcrse_lec_hr_low><br /> <scbcrse_lab_hr_low>0</scbcrse_lab_hr_low><br /> <scbcrse_credit_hr_low>3</scbcrse_credit_hr_low><br /> <scrsyln_long_course_title>Principles of Accounting 1 </scrsyln_long_course_title><br /> <scbdesc_text_narrative><br /> 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.)<br /> </scbdesc_text_narrative><br /> </ACCT><br /></csu><br />
  11. 11. XML is like:<br />
  12. 12. Syntax Rules<br />All XML Elements Must Have a Closing Tag<br />XML Tags are Case Sensitive<br />XML Elements Must be Properly Nested<br />XML Documents Must Have a Root Element<br />XML Attribute Values Must be Quoted<br />
  13. 13. Syntax Rules<br />Entity References<br />Comments in XML<br /><!-- This is a comment --> <br />
  14. 14. XSL is<br />eXtensible Stylesheet Language <br />Components:<br />XSL-FO<br />XSLT<br />XPath<br />
  15. 15. XSL-FO is<br />eXtensible Stylesheet Language Formatting Objects<br />language for formatting XML data for output to screen, print or other media<br />
  16. 16. XPath is<br />a language for finding information in an XML document<br />a syntax for defining parts of an XML document<br />uses path expressions to navigate in XML documents<br />contains a library of standard functions<br />a major component of XSLT<br />
  17. 17. XSLT is<br />eXtensible Stylesheet Language Transformations<br />a way to transform an XML document into HTML<br />far more sophisticated than CSS<br />
  18. 18. XSLT is<br />
  19. 19. XSLT 2.0<br />XSLT 2.0<br />XSLT 1.0<br />EXSLT<br />Velocity<br />
  20. 20. Template-Based Publishing<br />Page<br />Page<br />XSLT<br />2.0<br />XSL<br />Page<br />XSL<br />
  21. 21. Multi-File Output<br />XSL<br />Mobile Page<br />XSLT<br />2.0<br />Page<br />XSL<br />Web Page<br />XSL<br />PDF File<br />
  22. 22. Migration<br />
  23. 23. Process<br />2007 – RFP for Web Content Management System<br />Selected OmniUpdate OUCampus<br />2007 – 2010 – manually migrated sites into CMS<br />Table designed HTML pages; CSS; PHP<br />CSS designed HTML pages; CSS PHP<br />
  24. 24. Process<br />2010 – University Branding effort<br />Changed domain from colstate.edu to ColumbusState.edu<br />New Logos<br />New Web Page designs<br />
  25. 25. Page Layouts<br />
  26. 26. Templates<br />
  27. 27. Site Importing<br />
  28. 28. XML Structure<br />Let’s take a look at our XML file format<br />
  29. 29. <?xml version="1.0" encoding="UTF-8"?><br /><?pcf-stylesheet path="/z-omniupdate/xsl/default.xsl" extension="php"?><br /><!DOCTYPE document SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd"><br /><document><br /> <title></title><br /> <config><br /> <pageType></pageType><br /> <scripts></scripts><br /> <onLoad></onLoad><br /> </config><br /> <metadata><br /> <meta name="description" content="" /><br /> <meta name="keywords" content="" /><br /> </metadata><br /> <content><br /> <rightcontent></rightcontent><br /> <sidebox_title></sidebox_title><br /> <LeftInclude></LeftInclude><br /> <breadcrumb></breadcrumb><br /> <content></content><br /> </content><br /></document><br />
  30. 30. XSL Structure<br />default.xsl<br />Imports in additional files<br /> <xsl:importhref="plain-w-nobox.xsl" /><br /> <xsl:importhref="plain-w-box.xsl" /><br /> <xsl:importhref="photos-w-nobox.xsl" /><br /> <xsl:importhref="photos-w-box.xsl" /><br /> <xsl:importhref="photos-w-redbox.xsl" /> <br />
  31. 31. Future Plans<br />
  32. 32. Plans<br />Transformation – With and Without CMS<br />Opportunity with XML/XSL is unlimited<br />XML storage for reusable content<br />Course Descriptions<br />Degree Description/Requirements<br />Faculty Profiles/CV<br />
  33. 33. Lessons Learned<br />
  34. 34. Lessons Learned<br />White-space is Preserved in XML<br />XML Naming Rules<br />Names can contain letters, numbers, and other characters<br />Names cannot start with a number or punctuation character<br />Names cannot start with the letters xml (or XML, or Xml, etc)<br />Names cannot contain spaces<br />Any name can be used, no words are reserved.<br />
  35. 35. Lessons Learned<br />Naming Practices<br />Avoid "-" characters. <br />Avoid "." characters.<br />Avoid ":" characters.<br />Non-English letters like éòá are perfectly legal <br /> XML elements are Case Sensitive<br />
  36. 36. Lesson Learned<br />Weak error reporting with vague messages<br />No room for small typos and mistakes<br />Bell shaped learning curve<br />Invest in training and/or personnel<br />Database vs XML arguments<br />
  37. 37. Q & A<br />
  38. 38. HTML to XML/XSL: Lessons Learned<br />Jay Knape<br />Senior Manager of Web Content ServicesUniversity Information & Technology ServicesColumbus State University<br />knape_jay@ColumbusState.edu<br />Twitter: @knape_jay<br />
  39. 39. References<br />http://www.w3schools.com/xml<br />http://www.w3schools.com/xsl<br />http://www.w3schools.com/xslt<br />

×