Round up of citations of the Lethbridge Journal Incubator
Posted: Mar 30, 2018 15:03;
Last Modified: Mar 30, 2018 15:03

The Journal Incubator is getting on about 5 years, now. In that time, it’s been the subject of a number of mentions in various contexts: from articles by students and faculty associated with the Incubator, to passing notices of our talks or use of our CC-Licensed material.
Here’s a list of 12 references (excluding conference presentations) I’ve recently come up with:
Borchard, Laurie, Michael Biondo, Stephen Kutay, David Morck, and Andrew Philip Weiss. 2015. “Making Journals Accessible Front & Back: Examining Open Journal Systems at CSU Northridge.” OCLC Systems & Services: International Digital Library Perspectives 31 (1): 35–50. https://doi.org/10.1108/OCLC-02-2014-0013.
Breure, Leen, Maarten Hoogerwerf, and Georgi Khomeriki. 2013. “CLIO-DAP: Systems Analysis and Design.” 1.2. DANS. https://xposre.nl/cliodap/DAP_Analysis+Design_1.2.pdf.
Buckland, Amy. 2015. “Getting the Word out: Students as Content Creators.” In Getting the Word Out Academic Libraries as Scholarly Publishers, edited by Maria Bonn and Mike Furlough, 193–202. Association of College and Research Libraries. https://atrium.lib.uoguelph.ca:8443/xmlui/bitstream/handle/10214/12087/Buckland_ACRLchapter.pdf?sequence=1&isAllowed=y.
Communication, Office of Scholarly. n.d. “FORCE2015 Observations & Notes | Unlocking Research.” Accessed March 30, 2018. https://unlockingresearch-blog.lib.cam.ac.uk/?p=67.
Cowan, Sandra A. 2013. “Open Access Journal Incubator at University of Lethbridge Library.” In Library Publishing Toolkit, edited by Allison P. Brown, 179–86. Geneseo, NY: IDS Project Press, Milne Library, SUNY Geneseo. https://www.uleth.ca/dspace/bitstream/handle/10133/4595/Cowan%202013%20open%20libpubtool.pdf?sequence=1.
Cowan, Sandra, and Chris Bulock. 2017. “Open Access in the World of Scholarly Journals: Creation and Discovery.” The Serials Librarian 72 (1-4). Routledge: 194–200. https://doi.org/10.1080/0361526×.2017.1309845.
Humble, Linnet. 2012. “Unconverted: Outsourcing Ebook Production at a University Press.” Edited by Rowland Lorimer. MPub, Simon Fraser. http://summit.sfu.ca/system/files/iritems1/12513/etd7501_LHumble.pdf.
Moore, Samuel. 2015. “Stop Shielding Early-Career Researchers from Open Access – Limiting Wider Involvement Won’t Change a Broken System.” Impact of Social Sciences. August 24, 2015. http://blogs.lse.ac.uk/impactofsocialsciences/2015/08/24/stop-shielding-early-career-researchers-from-open-access/.
O’Donnell, Daniel Paul, Heather Hobma, Sandra Cowan, Gillian Ayers, Jessica Bay, Marinus Swanepoel, Wendy Merkley, Kelaine Devine, Emma Dering, and Inge Genee. 2015. “Aligning Open Access Publication with Research and Teaching Missions of the Public University: The Case of The Lethbridge Journal Incubator (If’if’s And’and’s Were Pots and Pans).” The Journal of Electronic Publishing: JEP 18 (3). Michigan Publishing, University of Michigan Library. http://quod.lib.umich.edu/cgi/t/text/idx/j/jep/3336451.0018.309/–aligning-open-access-publication-with-research-and-teaching?rgn=main;view=fulltext.
“OA Journal Business Models – Open Access Directory.” n.d. Accessed March 30, 2018. http://oad.simmons.edu/oadwiki/OA_journal_business_models.
Saklofske, John, and INKE Research Team. 2016. “Digital Theoria, Poiesis, and Praxis: Activating Humanities Research and Communication Through Open Social Scholarship Platform Design.” Scholarly and Research Communication 7 (2). http://src-online.ca/index.php/src/article/view/252/495.
Solomon, David J., Mikael Laakso, and Bo-Christer Björk. 2016. “Converting Scholarly Journals to Open Access: A Review of Approaches and Experiences.” Harvard University Library. https://dash.harvard.edu/handle/1/27803834.

Yii Basic Steps
Posted: Apr 06, 2012 16:04;
Last Modified: May 23, 2012 18:05

This is just a reminder to myself about setting up a Yii install. There are much more detailed examples on the web.
Build database
Build a database (I use MySql with innodb engine). The innodb engine is important because it allows you to document foreign key associations
Copy yii to top level of webdirectory
If you haven’t already done so, get a copy of the latest version of yii, uncompress it, and install it in a webdirectory immediately below the web root.
In my case, I tend to put it under /var/www/ and call the directory yii.
Use yiic
to build initial site
navigate to the root of your web directory. Assuming yii is an immediate child of this directory, use the following to build the initial site of your website, where $site
is the directory name you want to use for your site and $path
the full path to the current directory:
The response should be: Your application has been created successfully under $path/$site
Prepare for building the scaffolding
change directory to $path/$site/protected/config/
edit main.php
:
- remove the comments surrounding the section on the gii tool (you’ll want to put these back in production)
- make sure you put a password in
- (for MySql) remove the comments surrounding the MySql Stanza and modify/supply the required information (usernames, passwords, servers, etc.)
- fix the admin email.
Use gii to establish the basic scaffolding
- point your webbrowser at the site (e.g.
http://localhost/$site/
orhttp://example.com/$site/
) - click on the “home” link in the menubar to get the top URL (it will be something like this:
http://$domain/$site/index.php?r=site/index
) - in the location bar, replace
site/index
withgii
- enter the database root password
Develop models
Most if not all dbases will have a model in the system.
- Select “Model Generator”.
- enter
*
in the “Table name” field to generate models for all tables; otherwise type the table name in the box for a specific table. - click on preview.
- if everything is good, click on generate (need to make sure permissions all generation).
Develop CRUD
- select “crud generator”
- enter Model names for the models for which you want to have specific forms and actions (not all tables will require this: some will be written automatically or through relations)

Adding an attribute for title to a yii widget
Posted: Feb 24, 2012 15:02;
Last Modified: May 23, 2012 18:05

The Yii file view.php
by default uses the [zii.widgets.CDetailView
] to display all examples of a given model. In the standard scaffolding produced by the gii
utility, this widget consists of references to attributes of the model without any further information (e.g. attribute names and the like):
<?php $this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'editorialInstance_id',
'journal.shortTitle', // a reference to a relational attribute
'type',
'LastNamesFirstName', // a reference to a compound attribute
),
In this minimalist form, yii will calculate an appropriate label for the attribute on the basis of the attribute name: so, for example, in this case, editorialInstance_id will be appear in the view labelled “Editorial Instance” because Yii understands camelCase naming conventions and knows to strip off _id (it’s that good!).
A problem with this, however, is that we also provide customised label names as part of the attributeLabels()
method in our Model controller. Since that method allows arbitrary names, and since CDetailView
attempts to calculate labels on the basis of the attribute name, it is highly likely that the labels for different attributes will get out of synch in different places in your site. To give an example: in this particular case, the model for editorialInstance might have defined the label for editorialInstance_id as “ID” rather than “Editorial Instance”: since CDetailView
doesn’t check to see what you had on attributeLabels()
in the model class, switching from an edit view to an index will mean that the label of the attribute switches.
Ideally what you want to do is keep CDetailView
and attributeLabels()
in synch automatically. I’m sure there must be a way of doing this. In the meantime, however, here’s how you can set an arbitrary label in the widget (I’ve used it on the first and last):
<?php $this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
array('value' =>
$model->editorialInstance_id, 'label' => 'ID'),
'journal.shortTitle',
'type',
array('value' => $model->person->lastNameFirstNames, 'label' => 'Person'),
),

Yii Ensuring that key terms are always linked
Posted: Feb 24, 2012 11:02;
Last Modified: May 23, 2012 18:05

As we are building our workflow manager, we are discovering that we develop a more intuitive interface if some terms are always hyperlinked and point to a standard presentation of the relational information.
One example of this might be names of people associated with the workflow (editors, authors, copyeditors, production assistants). An intuitive internal navigation method seems to be to have the names of these people always hyperlinked with the hyperlink always pointing to the person’s profile page.
One way of doing this in Yii would be to modify the views associated with each table in the site so that every time a name is called, you get a link. This is contrary to spirit of the MVC model, however, since it means you are using a view to present logic about the underlying model. And it is also prone to error, since it means you a) need to find every possible invocation of the name in all you various views and b) not make an error as you enter the same code over an over again in all these different views.
The better approach is to add this functionality to the underlying datamodel that supplies the information to the entire site in the first place—that is, to the model for the database that is providing the name information and the page you want to link to in the end.
Here’s some code for your model that would allow you produce a linked name anywhere in your yii site (for simplicity’s sake in this example, I am wrapping a single attribute from my database in a hyperlink. This post shows you how to use a similar method to first make compound attributes):
public function getLastNameLink()
{
return CHtml::link(CHtml::encode($this->lastName),
array('person/view', 'id'=>$this->person_id));
}
Here are some underlying premises behind this code:
- There is a table in my database called
person
- I have written a view for this database (either by hand or using the gii utility to build one automatically):
person/view
is the URL fragment CHtml::link will use to build the link to the profile page for a given person (note: it is tempting to just useview
for the URL because we are already in the person model; you should use the “full” yii-path however because you will be invoking this throughout the site from views associated with all sorts of other models) - The table
person
has an attribute (column) calledperson_id
.
Once this has been added to my Person model, I can call the code (and add a link to the person profile) in any view by just invoking the method: from now on, the LastNameLink functions as an attribute of the Person model and can be used in exactly the same way actual direct, table-based attributes can be invoked. For example, in a different model’s view:
<?php echo $data->person->LastNameLink; ?>
This code will produce a link to index.php?r=person/view&id=
n where n is the id number of a given record in the table. If I hadn’t added the above code to the Person model, the code required to do the equivalent would have been:
<?php echo
CHtml::link(CHtml::encode($data->person->lastNameFirstNames),
array('person/view', 'id'=>$data->person->person_id)); ?>

Extracting a catalogue of element names from a collection of XML documents using XSLT 2.0
Posted: Sep 15, 2011 17:09;
Last Modified: May 23, 2012 19:05

We are trying to build a single stylesheet to work with the documents of two independent journals. In order to get a sense of the work involved, we wanted to create a catalogue of all elements used in the published articles. This means loading as input document directories’ worth of files and then going through extracting and sorting the elements across all the input documents.
Here’s the stylesheet that did it for us. It is probably not maximally optimised, but it currently does what we need. Any suggestions for improvements would be gratefully received.
Some notes:
- Our goal was to pre-build some templates for use in a stylesheet, so we formatted the elements names into xsl templates.
- Although you need to use this sheet with an input document, the input document is not actually transformed (the files we are extracting the element names from are loaded using the
collection()
function). So it doesn’t matter what the input document is as long as it is valid XML (we used the stylesheet itself)
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!-- this output is because we are going to construct ready-made templates for each element --> <xsl:output method="text"/>
<!-- for pretty printing --> <xsl:variable name="newline"> <xsl:text> </xsl:text> </xsl:variable>
<!-- Load the files in the relevant directories --> <xsl:variable name="allFiles" select="collection(iri-to-uri('file:///some/path/to/the/directories?select=*.xml; recurse=yes'))"/>
<!-- Dump their content into a single big pile --> <xsl:variable name="everything"> <xsl:copy-of select="$allFiles"/> </xsl:variable>
<!-- Build a key for all elements using their name --> <xsl:key name="elements" match="*" use="name()"/>
<!-- Match the root node of the input document (since the files we are actually working on have been loaded using the using the collection() function, nothing is actually going to happen to this element) --> <xsl:template match="/">
<!-- this is information required to turn the output into an XSL stylesheet itself --> <xsl:text><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"></xsl:text> <xsl:value-of select="$newline"/> <xsl:text><!--Summary of Elements --></xsl:text> <xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/>
<!-- this invokes the collection of all elements in all the files in the directory for further processing --> <xsl:for-each select="$everything">
<!-- This makes sure we are dealing with the first named key --> <xsl:for-each select="//*[generate-id(.)=generate-id(key('elements',name())[1])]">
<!-- sort them --> <xsl:sort select="name()"/>
<xsl:for-each select="key('elements', name())">
<!-- this makes sure that only the first instance of each element name is outputted --> <xsl:if test="position()=1"> <xsl:text><xsl:template match="</xsl:text> <xsl:value-of select="name()"/> <xsl:text>"> </xsl:text> <xsl:value-of select="$newline"/> <xsl:text><!--</xsl:text> <!-- this counts the remaining occurences --> <xsl:value-of select="count(//*[name()=name(current())])"/> <xsl:text> occurences</xsl:text> <xsl:text>--></xsl:text> <xsl:value-of select="$newline"/> <xsl:text></xsl:template></xsl:text> <xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:for-each> <xsl:value-of select="$newline"/> <xsl:text></xsl:stylesheet></xsl:text> </xsl:template> </xsl:stylesheet>
