Public: Concord Software Projects : OTrunk Activity Authoring and Relative Resource References
This page last changed on Feb 27, 2009 by stepheneb.
If you start an authoring jnlp from an online page for an activity that is fetched from an online location and edit the activity content and save the otml locally some (all?) of the relative references to resources will be rewritten to be absolute references.
Here's an example:
Start at this page: http://continuum.concord.org/otrunk/examples/LOOPS/ot-index.html
Under the column of links titled otml file is this link for the otml for spring2009_activity3: spring2009_activity3.otml.
Currently if you download this file and list the lines that have the string ''http://' you'll see 5 lines listed
Here are the href attributes urls as a list:
If you run 'spring2009_activity3' from the learner jnlp link it will load the activity otml file from:
Java will set the codebase to the base url for this file:
If you were to copy just this otml file to your local computer and run it locally in it's current state:
If I changed the href attributes to relative references like this:
And check this change into subversion then when you run 'spring2009_activity3' from the server Java will recognize these are relative references, add the default codebase and load the resources from the web server.
For example when the Java application sees this href attribute:
It will prefix the resource reference with http://continuum.concord.org/otrunk/examples/LOOPS/ to produce:
However if you download just the otml file and run it locally the resources will not be found.
However if I change the resource references to relative and you download the LOOPS/ directory from subversion:
and you now run the activity LOOPS/spring2009_activity3.otml from your local filesystem the resources will be located using relative references and the activity will work.
If however you author the local activity by first running the author jnlp link for spring2009_activity3 from this page:
Then use the File::Open command to load your local otml file, make changes, and save them the resource references will be re-written as absolute.
You need to run the start the jnlp locally in authoring mode and then when you author a local otml file with relative references these won't be re-written as absolute references.
|Document generated by Confluence on Jan 27, 2014 16:52|