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

OSP Forms and Presentations in a Nutshell

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: OSP Forms and Presentations in a Nutshell

OSP Forms and Presentations in a Nutshell

Tom Kuipers

Universiteit van Amsterdam

Information Technology Centre

Page 2: OSP Forms and Presentations in a Nutshell

Forms and Portfolios in a Nutshell

Tom Kuipers

Universiteit van Amsterdam

Information Technology Centre

Page 3: OSP Forms and Presentations in a Nutshell
Page 4: OSP Forms and Presentations in a Nutshell

Agenda

• Overview• Forms• Portfolios• Questions

Page 5: OSP Forms and Presentations in a Nutshell

Overview

• Collecting information– Forms

• Presenting information– Portfolio

Page 6: OSP Forms and Presentations in a Nutshell

Anatomy of a Portfolio

Forms and Files

Outline Options

XMLPresentation outline &

supporting files

Page 7: OSP Forms and Presentations in a Nutshell

Steps

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

Page 8: OSP Forms and Presentations in a Nutshell

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

Page 9: OSP Forms and Presentations in a Nutshell

Sakai tools involved

• Resources (maintain, access role)• Forms (maintain role)• Portfolios (maintain, access role)• Portfolio Templates (maintain role)

Page 10: OSP Forms and Presentations in a Nutshell

It’s all XML

• XML• XSD• XSL

– XPath

Page 11: OSP Forms and Presentations in a Nutshell

Tools

• XSD Weaver

http://trident.cdws.ucf.edu/xsdweaver/• From within you XML editor of choice use

Xalan as XSLT-enginejava org.apache.xalan.xslt.Process -IN %1 -XSL %3 -OUT %2

• passthrough.xsl

Page 12: OSP Forms and Presentations in a Nutshell

Forms creation

• Creating XSD’s for your forms• Manual or by using online tool XSD Weaver

Page 13: OSP Forms and Presentations in a Nutshell

XSD Weaver

Page 14: OSP Forms and Presentations in a Nutshell

XSD Weaver

Page 15: OSP Forms and Presentations in a Nutshell

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"

Page 16: OSP Forms and Presentations in a Nutshell

Add Forms to Sakai

Page 17: OSP Forms and Presentations in a Nutshell

Portfolio template creation

Page 18: OSP Forms and Presentations in a Nutshell

Portfolio template creation

Page 19: OSP Forms and Presentations in a Nutshell

Portfolio template creation

Page 20: OSP Forms and Presentations in a Nutshell

Portfolio template creation

Page 21: OSP Forms and Presentations in a Nutshell

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>

Page 22: OSP Forms and Presentations in a Nutshell
Page 23: OSP Forms and Presentations in a Nutshell

Anatomy of a Portfolio

Forms and Files

Outline Options

XMLPresentation outline &

supporting files

Page 24: OSP Forms and Presentations in a Nutshell

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

Page 25: OSP Forms and Presentations in a Nutshell

Portfolio creation

Page 26: OSP Forms and Presentations in a Nutshell

Portfolio creation

Page 27: OSP Forms and Presentations in a Nutshell

Portfolio creation

Page 28: OSP Forms and Presentations in a Nutshell

Portfolio creation

Page 29: OSP Forms and Presentations in a Nutshell
Page 30: OSP Forms and Presentations in a Nutshell

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;}[...]

Page 31: OSP Forms and Presentations in a Nutshell
Page 32: OSP Forms and Presentations in a Nutshell
Page 33: OSP Forms and Presentations in a Nutshell
Page 34: OSP Forms and Presentations in a Nutshell
Page 35: OSP Forms and Presentations in a Nutshell

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

Page 36: OSP Forms and Presentations in a Nutshell

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

Page 37: OSP Forms and Presentations in a Nutshell

Questions?

[email protected]