1 / 37

OSP Forms and Presentations in a Nutshell

OSP Forms and Presentations in a Nutshell. Tom Kuipers Universiteit van Amsterdam Information Technology Centre. Forms and Portfolios in a Nutshell. Tom Kuipers Universiteit van Amsterdam Information Technology Centre. Agenda. Overview Forms Portfolios Questions. Overview.

Download Presentation

OSP Forms and Presentations in a Nutshell

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OSP Forms and Presentations in a Nutshell Tom Kuipers Universiteit van Amsterdam Information Technology Centre

  2. Forms and Portfolios in a Nutshell Tom Kuipers Universiteit van Amsterdam Information Technology Centre

  3. Agenda • Overview • Forms • Portfolios • Questions

  4. Overview • Collecting information • Forms • Presenting information • Portfolio

  5. Outline Options Forms and Files Anatomy of a Portfolio Presentation outline & supporting files XML

  6. Steps • Define what type of information to collect • Split up in logical entities • Reusability • Create Forms • Create Portfolio template • Create XSL stylesheet

  7. Types of Portfolios • Free form presentation • Page centered • Drag ‘n drop interface • Choose style, layout and content • ‘classic’ template presentation • Templates have predefined layout and style • Add existing content items from Resources • Placeholders for specific types of content

  8. Sakai tools involved • Resources (maintain, access role) • Forms (maintain role) • Portfolios (maintain, access role) • Portfolio Templates (maintain role)

  9. It’s all XML • XML • XSD • XSL • XPath

  10. Tools • XSD Weaver http://trident.cdws.ucf.edu/xsdweaver/ • From within you XML editor of choice use Xalan as XSLT-engine java org.apache.xalan.xslt.Process -IN %1 -XSL %3 -OUT %2 • passthrough.xsl

  11. Forms creation • Creating XSD’s for your forms • Manual or by using online tool XSD Weaver

  12. XSD Weaver

  13. XSD Weaver

  14. XSD’s • XSD (XML Schema Definition) • Describes structure and data types of an XML document • File extension *.xsd • Mime-type "application/xml" or "text/xml"

  15. Add Forms to Sakai

  16. Portfolio template creation

  17. Portfolio template creation

  18. Portfolio template creation

  19. Portfolio template creation

  20. passthrough.xsl stylesheet (available in .\sakai-demo\webapps\osp-presentation-tool\WEB-INF\resources) <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="ospiPresentation"> <ospiPresentation> <xsl:copy-of select="*"></xsl:copy-of> </ospiPresentation> </xsl:template> </xsl:stylesheet>

  21. Outline Options Forms and Files Anatomy of a Portfolio Presentation outline & supporting files XML

  22. XSL Development process • In your presentation use passthrough.xsl as template and save the raw XML to desktop • Create your own XSL, use XML editor for XPath queries to show what you want • Use an XML editor with Xalan as (optional) XSLT-engine to do the translation • Improve XSL stylesheet, when satisfied upload it to Sakai environment, and update portfolio template

  23. Portfolio creation

  24. Portfolio creation

  25. Portfolio creation

  26. Portfolio creation

  27. Example XSL <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> [...] <xsl:variable name="border_color" select="ospiPresentation/presentationProperties/cv-properties/border-color"/> <xsl:variable name="color_schema" select="ospiPresentation/presentationProperties/cv-properties/color-schema"/> <xsl:output method="html" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ospiPresentation"> <html> <head> <xsl:element name="title"><xsl:value-of select="presentationProperties/cv-properties/titel"/></xsl:element> <link rel="stylesheet" type="text/css"> <xsl:attribute name="href"> <xsl:value-of select="presentationFiles/curriculumvitae_css/artifact/fileArtifact/uri"/> </xsl:attribute> </link> <style type="text/css" media="screen"> .border-top { background-image: url(<xsl:value-of select="presentationFiles/*[name()=concat('border_top_',$border_color)]/artifact/fileArtifact/uri"/>); width: 778px; height: 18px; } [...]

  28. Lessons Learned • In XSD Weaver spaces in element name are allowed, while spaces are not allowed in xml element name (invalid syntax) • Published Form types cannot be altered. You can bypass this by ‘un-publishing’ it in de database. Set the fields 'sitestate' and 'globalstate' to 0 in table 'metaobj_form_def'. Upload revised xsd form definition and restore published state • Import / export multiple forms at once by adding the forms to a portfolio template and importing / exporting that template

  29. Links • XSD Weaver online tool for XSD creation at http://trident.cdws.ucf.edu/xsdweaver/ • Community library at http://osportfolio.org. Containing xsd schemas, matrix examples, xslt portfolio templates, how-to tips, and more

  30. Questions? • T.F.Kuipers@uva.nl

More Related