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 Collecting information –Forms Presenting information –Portfolio
Anatomy of a Portfolio Forms and Files Outline Options XML Presentation outline & supporting files
Steps Define what type of information to collect Split up in logical entities Reusability Create Forms Create Portfolio template Create XSL stylesheet
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
Sakai tools involved Resources (maintain, access role) Forms (maintain role) Portfolios (maintain, access role) Portfolio Templates (maintain role)
It’s all XML XML XSD XSL –XPath
Tools XSD Weaver 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
Forms creation Creating XSD’s for your forms Manual or by using online tool XSD Weaver
XSD Weaver
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"
Add Forms to Sakai
Portfolio template creation
passthrough.xsl stylesheet (available in.\sakai-demo\webapps\osp-presentation-tool\WEB- INF\resources)
Anatomy of a Portfolio Forms and Files Outline Options XML Presentation outline & supporting files
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
Portfolio creation
Example XSL [...].border-top { background-image: url( ); width: 778px; height: 18px; } [...]
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
Links XSD Weaver online tool for XSD creation at Community library at Containing xsd schemas, matrix examples, xslt portfolio templates, how-to tips, and morehttp://osportfolio.org
Questions?