Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
TEI display plugin for Omeka
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Gilbert  
View profile  
 More options Nov 14 2011, 1:44 am
From: Tim Gilbert <timgilb...@gmail.com>
Date: Sun, 13 Nov 2011 22:44:01 -0800 (PST)
Local: Mon, Nov 14 2011 1:44 am
Subject: TEI display plugin for Omeka
Hi all.  I'm trying to help a friend out with getting the TEI plugin
for Omeka to render TEI as HTML and we've run into some problems; I'm
hoping someone here can help me out.  I am a programmer familiar with
PHP, XML and XSL, but Omeka and TEI are both terra incognito for me,
so pardon me if my questions are a little naive.

Briefly, my friend has a series of poems encoded as TEI files; their
content looks roughly like the examples given on this page:

    http://tbe.kantl.be/TBE/examples/TBED04v00.htm

What we are trying to do is get the files to appear rendered as HTML
in the user view of Omeka.

I've managed to validate that the input files are proper TEI using the
online validator here:

    http://tbe.kantl.be/TBE/xquery/TBEvalidator.xq

I also managed to import the files, though it took me a while to
realize that I needed to to add an ID to the root element and use <TEI.
2> instead of <TEI> as the root element (incidentally, this breaks the
validator and I can't seem to find any reference to this root element
in the TEI documentation I've seen, but as I said I'm new to all
this).  As of right now, the files are being imported correctly, the
plugin is picking up the title metadata from the file, and when I view
the metadata of the XML file attached to the item I'm trying to see,
it shows up as "TEI Document".  With all this being the case, I'm
reasonably confident I've got the input side of the equation working
correctly.

When I look at the item which the imported TEI file is attached to as
a user, however (eg, at mysite.com/items/show/23) what I see is just a
short list of the Dublin Core metadata in the item, along with a link
to the TEI file (as raw XML), and nothing else.  I was sort of
expecting to see some rendered output there.  The page is pulling in
the tei_display_toggle_toc.js file (and the jquery files), but nothing
is rendered with class="toggle_toc" - I can see where these would be
generated by the XSL in default.xsl, but it doesn't seem to be getting
processed for some reason.

Is there something I'm missing here?  For instance, do the rendered
files show up a a different URL from /items/show/<id>?  I do see
entries for <lg> and <l> in the XSL source contained in the plugin,
and I've traced through the PHP to some degree, but I'm at a bit of a
loss right now.

Any help would be appreciated; I'm happy to provide more detail if
that helps.  TIA,
Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick Murray-John  
View profile  
 More options Nov 14 2011, 9:58 am
From: Patrick Murray-John <patrickmjc...@gmail.com>
Date: Mon, 14 Nov 2011 09:58:52 -0500
Local: Mon, Nov 14 2011 9:58 am
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Tim,

This was originally put together by the folks at Scholars' Lab, but I
tried it out and have a couple possible ideas.

My first guess is that step 8 in their documentation is missing:

 8.

    Edit the item display for your theme in themes/[your
    theme]/items/show.php . Add the following code where you wish the
    TEI document to be serialized (e. g., under the titles and above
    show_item_metadata()):

<?php if (function_exists('tei_display_installed')){ echo
render_tei_files($item->id, $_GET['section']); } ?>

But that wasn't the complete story for what I had to do to get it to work.

First, depending on the theme you are using, you might need to do some
hunting to the file to edit. Usually, it will be
/themes/{yourtheme}/items/show.php

However, some themes, like the default theme, do not have that file. It
is basically inheriting from /application/views/scripts/items/show.php

So, to override things in Omeka, copy the /items/show.php directory and
file from /application/views/scripts over into your theme, if it is not
there already.

Then, usually you would edit /items/show.php to add in that code.

At least for me, this is where the second major bug happened --
render_tei_files isn't defined.

To get it to work for me, here's what I used instead.
<?php if (function_exists('tei_display_installed')){ echo
render_tei_file($item->Files[0]->id, $_GET['section']); } ?>

instead of render_tei_files(), the function render_tei_file is there. It
looks like the render_tei_files() function, when it exists, is intended
to sort through the TEI files for the item before calling render_tei_file()

That explains why I have $item->Files[0]->id instead of $item->id. What
I have here assumes that the first file associated with the Item is the
TEI file you want. If that's not the case, it looks like you'd need to
build that code.

Hope that helps!
Patrick

On 11/14/2011 01:44 AM, Tim Gilbert wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wayne.gra...@gmail.com  
View profile  
 More options Nov 14 2011, 11:38 am
From: wayne.gra...@gmail.com
Date: Mon, 14 Nov 2011 16:38:26 +0000
Local: Mon, Nov 14 2011 11:38 am
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Hi Tim,

I'll start off by saying that we developed the TEI plugin as a  
proof-of-concept to work with our (UVA's) collection of TEI documents. I  
think the first thing you noticed was that we have a large collection of  
TEI P4 documents, which required the TEI.2 (the .2 was removed in the  
latest P5 version of the spec). This is a big leap with the underlying  
structure, and can cause all kinds of issues if you're not careful.

Another issue is that this plugin has not been tested for Omeka > 1.3.2.  
While I don't believe there were any major changes that would affect the  
TEIPlugin, work on bringing the plugin up to the latest revision hasn't  
bubbled up.

That said, we do have this in the queue to refactor, but right now it looks  
like the time frame won't start until January. In the mean time, it would  
actually be good to have a document that we know is causing issues for our  
test suite. Would you mind sending me one (off list)?

Wayne

On , Tim Gilbert <timgilb...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Gilbert  
View profile  
 More options Nov 14 2011, 2:18 pm
From: Tim Gilbert <timgilb...@gmail.com>
Date: Mon, 14 Nov 2011 11:18:56 -0800 (PST)
Local: Mon, Nov 14 2011 2:18 pm
Subject: Re: TEI display plugin for Omeka
Hi Patrick, thanks for the reply.  Indeed, it does look as though the
problem is that the various theme templates and output files didn't
have the logic added to them to trigger the plugin hooks.  I'm not
certain my friend has shell access to the server to modify the
relevant bits of PHP, but your instructions look like they will be
very helpful one she gets it.  I'll keep the list posted as to our
progress in case someone else has similar problems in the future.

Wayne, thanks for your response as well.  I'll send you a sample
document off-list, but the main thing that was frustrating as a user
was that if the document was not successfully recognized as TEI, it
sort of silently failed and was uploaded as a plain XML file instead.
I'm not certain that Omeka's plugin architecture would make some sort
of feedback possible (and other users will need to upload non-TEI XML
files anyways).  As a feature request for your eventual refactor,
though, it would be helpful if the plugin added a checkbox to the "add
files" page which, if checked, would only add the file if it was
recognized as valid TEI and otherwise fail with an error message. It
might even be handy to run a schema validator over the file as well,
though with the existing online tools that's not necessarily a crucial
step.

In the plugin documentation, an example input document and possibly a
screenshot of the file metadata display after a successful upload
would also be helpful.

Anyways, thanks again to you both and I'll keep you posted.

Tim

On Nov 14, 9:58 am, Patrick Murray-John <patrickmjc...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacque Wernimont  
View profile  
 More options Jun 28 2012, 1:17 pm
From: Jacque Wernimont <jacque.wernim...@gmail.com>
Date: Thu, 28 Jun 2012 10:17:32 -0700 (PDT)
Local: Thurs, Jun 28 2012 1:17 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Just wanted to say thanks to Patrick - the php fix is what has been holding
me up for two days. Your revised line worked like magic.

Jacque


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mandy gagel  
View profile  
 More options Nov 5 2012, 1:14 pm
From: mandy gagel <mandyga...@gmail.com>
Date: Mon, 5 Nov 2012 10:14:58 -0800 (PST)
Local: Mon, Nov 5 2012 1:14 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Hello all,

I am at the point where I am uploading TEI documents to my site. So far, I
have been successful with uploading a file...it is recognized as TEI and
the configure tab has given me options and I have set it to "entire
document" and "default:xsl"

The metadata was extracted and put into Dublin Core...but there is a lot I
have to add myself..like because my TEI header wasn't the best to begin
with? That is fine, I can add these things.

But, it is not displaying in html, etc...just the raw xml.

I have read some of the forums here that say that there is php script I
have to insert in "themes" to make things happen. I am using the "seasons"
default theme which doesn't give me any options to configure the way items
are displayed, etc. Is this the problem? Can I still use this theme? Any
step by step instructions would be helpful as this is all new to me!...

thanks!
Mandy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mandy gagel  
View profile  
 More options Nov 5 2012, 1:39 pm
From: mandy gagel <mandyga...@gmail.com>
Date: Mon, 5 Nov 2012 12:39:11 -0600
Local: Mon, Nov 5 2012 1:39 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Also,

As a follow up..

under "Item Type Metadata" for the TEI doc. I added,

There is no "TEI Doc" type listed. It just tells me to "select below"

is this also indicative of a problem?

thanks
Mandy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sue Hemmens  
View profile  
 More options Nov 5 2012, 1:42 pm
From: Sue Hemmens <sue.hemm...@gmail.com>
Date: Mon, 5 Nov 2012 18:42:37 +0000
Local: Mon, Nov 5 2012 1:42 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Hi Mandy

I'm sure someone will correct me if I'm wrong but I think Seasons is one of
the older themes which needs the second fix described in the thread above.

You need to go digging in  youromekadir/application/views/scripts/items

then edit show.php to include the TEI stuff: the file I've attached works
with Seasons, so if you like, just rename your show.php to show.old and
stick my file in instead.

(be warned, there's another wrinkle, if you need to upload a new version of
your TEI file, it won't be recognised if it has the same id as an existing
file. There are various ways round this but the handiest one is just to
delete the old item before uploading the new one.)

For the other part, mapping the TEI goodness to Dublin Core is a bit of a
shoehorn operation. It's done in plugin.php.

my version is appended: you have to customise the mapping for your schema.

good luck!

Sue

-------------------------------
//map TEI to DC
 //based on CDL encoding guidelines:
http://www.cdlib.org/groups/stwg/META_BPG.html#d52e344
foreach ($dc as $name){
if ($name == 'Title'){
$queries = array('//*[local-name() = "teiHeader"]/*[local-name() =
"fileDesc"]/*[local-name() = "titleStmt"]/*[local-name() = "title"]');

  }elseif ($name == 'Creator'){
$queries =
array('//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-nam e()="titleStmt"]/*[local-name()="author"]');

} elseif ($name == 'Subject'){

$queries = array(
'//*[local-name()="teiHeader"]/*[local-name()="profileDesc"]/*[local-name() ="textClass"]/*[local-name()="keywords"]/*[local-name()="list"]/*[local-nam e()="item"]');
} elseif ($name == 'Description'){

$queries = array(
'//*[local-name()="teiHeader"]/*[local-name()="encodingDesc"]/*[local-name( )="classDecl"]/*[local-name()="taxonomy"]/*[local-name()="category"]/*[loca l-name()="catDesc"]/*[local-name()="rs"]');
} elseif ($name == 'Publisher'){

$queries =
array('//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-nam e()="publicationStmt"]/*[local-name()="publisher"]',
'//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-name()="p ublicationStmt"]/*[local-name()="date"]');
} elseif ($name == 'Contributor'){

$queries = array(
'//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-name()="t itleStmt"]/*[local-name()="respStmt"]');
} elseif ($name == 'Date'){

$queries = array(
'//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-name()="t itleStmt"]/*[local-name()="title"]/*[local-name()="date"]/@when');

} elseif ($name == 'Rights'){

//type, defined with Item Type Metadata dropdown
$queries =
array('//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-nam e()="publicationStmt"]/*[local-name()="availability"]');
} elseif ($name == 'Identifier'){

$queries = array(
'//*[local-name()="teiHeader"]/*[local-name()="encodingDesc"]/*[local-name( )="classDecl"]/*[local-name()="taxonomy"]/*[local-name()="category"]/*[loca l-name()="catDesc"]/*[local-name()="rs"]/@xml:id');
} elseif ($name == 'Source'){

$queries =
array('//*[local-name()="teiHeader"]/*[local-name()="fileDesc"]/*[local-nam e()="sourceDesc"]');
} elseif ($name == 'Language'){

$queries =
array('//*[local-name()="teiHeader"]/*[local-name()="profileDesc"]/*[local- name()="langUsage"]/*[local-name()="language"]');

} elseif ($name == 'Type'){

//type, defined with Item Type Metadata dropdown
$queries = array();
} elseif ($name == 'Relation'){

//type, defined with Item Type Metadata dropdown
$queries = array();
} elseif ($name == 'Format'){

//type, defined with Item Type Metadata dropdown
$queries = array();}
 elseif ($name == 'Coverage'){
//type, defined with Item Type Metadata dropdown
$queries = array();}

On 5 November 2012 18:14, mandy gagel <mandyga...@gmail.com> wrote:

...

read more »

  show.php
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mandy gagel  
View profile  
 More options Nov 5 2012, 1:45 pm
From: mandy gagel <mandyga...@gmail.com>
Date: Mon, 5 Nov 2012 12:45:52 -0600
Local: Mon, Nov 5 2012 1:45 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Hello,

THank you so much Sue...

I can try some of this, I think.

But now of course I have switched to the Rhythm theme, which just works
better for my content, but I think it still needs the new script you sent
me?

Also, as I have just written, the "TEI doc" doesn't pop up in my Item Type
box??

mandy

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sue Hemmens  
View profile  
 More options Nov 5 2012, 1:49 pm
From: Sue Hemmens <sue.hemm...@gmail.com>
Date: Mon, 5 Nov 2012 18:49:01 +0000
Local: Mon, Nov 5 2012 1:49 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Yep, it never worked for me, I'm sure it's something simple (=stupid on my
part) but I never bothered to fix it. It would only matter if you wanted to
do something with the items based on item type.

On 5 November 2012 18:45, mandy gagel <mandyga...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sue Hemmens  
View profile  
 More options Nov 5 2012, 1:54 pm
From: Sue Hemmens <sue.hemm...@gmail.com>
Date: Mon, 5 Nov 2012 18:54:26 +0000
Local: Mon, Nov 5 2012 1:54 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

And Rhythm is 'new style' and has its own items directory.

So just pop the <?php if (function_exists('tei_display_**installed')){ echo
render_tei_files($item->id, $_GET['section']); } ?> into show.php in that
dir.

just before <?php echo custom_show_item_metadata(); ?> works for me

On 5 November 2012 18:49, Sue Hemmens <sue.hemm...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wayne Graham  
View profile  
 More options Nov 5 2012, 3:34 pm
From: Wayne Graham <wayne.gra...@gmail.com>
Date: Mon, 5 Nov 2012 15:34:22 -0500
Local: Mon, Nov 5 2012 3:34 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka
Just wanted to give you all a heads up that there is an major revision
of the code base currently going on which addresses several os these
issues. If you're brave, and want to try it out, check out the the
feature/new branch of https://github.com/scholarslab/TeiDisplay/. You
will need Omeka 2.0 (master branch off of
https://github.com/omeka/omeka), but there has been quite a bit of
work put in on the new version.

Wayne

/**
 * @author Wayne Graham
 * @link http://www.liquidfoot.com
 */

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sue Hemmens  
View profile  
 More options Nov 5 2012, 3:39 pm
From: Sue Hemmens <sue.hemm...@gmail.com>
Date: Mon, 5 Nov 2012 20:39:22 +0000
Local: Mon, Nov 5 2012 3:39 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka

Aha...

Thanks! I was just about to bite the Omeka 2.0 bullet, this gives me
another incentive!

(You haven't by any remote chance done that 'construct an element set from
the schema' thing I've been fantasising about?? :) )

On 5 November 2012 20:34, Wayne Graham <wayne.gra...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wayne Graham  
View profile  
 More options Nov 5 2012, 8:19 pm
From: Wayne Graham <wayne.gra...@gmail.com>
Date: Mon, 5 Nov 2012 20:19:24 -0500
Local: Mon, Nov 5 2012 8:19 pm
Subject: Re: [omeka-dev] TEI display plugin for Omeka
That's a little beyond the scope of the TEIDisplay plugin, but I did
write something like that for the VRACore element set
(https://github.com/scholarslab/VraCoreElementSet/blob/feature/1.5/Vra...).
Depending on how you have the schema, you would need to convert it a
bit differently to get the rules correct, but it should be relatively
straight forward.

Wayne

/**
 * @author Wayne Graham
 * @link http://www.liquidfoot.com
 */

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »