Talk:Leap2A structured content

Ideas from Penny

 * 1) Each item in the view/webfolio is an item in its own right, with an id.
 * 2) The view/webfolio itself is a selection.
 * 3) The formatting of the view/webfolio is xhtml
 * 4) The points in the xhtml where items have been rendered, are rendered like normal to xhtml, but wrapped in a with some RDFA attribute to point to the id in 1 (and possibly any other data we need)  This means that at import time, importers can take everything out between the tags, throw it away, and  replace it with a "hole" that gets filled by the new artefact/asset when being rendered to the user.  Note that this even includes links.  Eg (inventing RDFA in my head):

&lt;span resource="leap:item:123456">  click here to view this item  &lt;/span>

That example should show what I'm trying to explain - it contains the rendered information (in this case just a link, but could be the fully rendered blog, for example), but also provides a placeholder that importers can use to tell the difference between formatting and content.

This raises an interesting issue about links in the exported xhtml content anyway - there must be some way to decode them at import, because they'll be pointing to urls specific to installations of various systems, and ones that have ids in them (eg in Mahara we have artefact/view.php?id=6) will need to be rewritten even importing between Mahara and Mahara, as the id will be different.

Additions from Simon
A couple of points to add, to make real RDFa. &lt;div rel="leap:has_part" src="portfolio:item123456"> &lt;img src="http://someurl.com/specific/link/to/view/this/photo.png" alt="my nice photo" /> &lt;/div>
 * 1) We could use &lt;span> or &lt;div> equally, decided by whether it made sense for it to be a block (as embedded things usually are) or an in-line link.
 * 2) The rel attribute represents the relationship between the containing selection (view, webfolio, etc.) and the linked/embedded resource - this will often just be leap:has_part
 * 3) We could use src or href attributes equally, depending on whether the resource is intended to be embedded or just linked
 * 4) So we might get something like...

My feeling at the moment is that it would be best to duplicate this "has_part" information in the content and in the links. This doesn't mean duplication in the databases of the systems, just the same kind of useful duplication that we have already by listing relationships both ways round.

Have a look at the RDFa primer and the RDFa syntax and processing.