Re: [Dspace-tech] Sitemap matcher question and DRI question

2008-07-22 Thread Conal Tuohy
On Tue, 2008-07-22 at 13:43 -0400, yinjin wrote:
> Hi,
> 
> I'm trying to put a lot of static pages on our dspace site and got some 
> trouble when I work on the sitemap and DRI.
> 
> I updated the sitemap.xmap for ArtifactBrowser to add match entries:
> ===
> 
> 
> 
>  src="file://{dspace.dir}/config/thes/thes_{1}.xml">
> 
> 
> 
> 
> I was told "could not find the page". However, if I remove the substitution, 
> for example:
> ===
> 
> 
> 
>  src="file://{dspace.dir}/config/thes/thes_A.xml">
> 
> 
> 
> 
> It works. However, it's annoying to repeat these from A to Z. Does anybody 
> know why substitution variable doesn't work?

Yes. The reason is that the expression "{1}" used in the map:transform
element actually refers to a different variable from the one defined by
the map:match element.

The variables created in the sitemap by map:match, map:act, etc, are
organised into a stack which reflects the nesting of the XML elements in
the sitemap. The expression "{1}" refers to the first variable created
by the parent element (in this case, the map:act, not the map:match). To
access the first substitution variable created by the map:match element
(the "grandparent" element) you need to go up the stack one level:
replace your expression with "{../1}". 

Conal
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Achieving security by obscurity

2008-07-08 Thread Conal Tuohy
On Tue, 2008-07-08 at 12:43 -0400, Gary McGath wrote: 
> In order to prevent provenance metadata from being easily reached by 
> users, and to make embargoing watertight, I'd like to disable the 
> "metadata" URLs in Manakin. (I've disabled METS output in the OAI 
> provider for the same reason.) Since they're useful for debugging 
> purposes, it would be nice to have them available, so changing the path 
> component from "metadata" to something else seems like a useful 
> approach. To this end, I edited 
> (dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/sitemap.xmap) and 
> changed the relevant map:match element.  When I restarted DSpace, 
> though, it hung. Changing it back let DSpace run normally.
> 
> Is there something else that needs to be changed in order to disable or 
> modify the metadata URLs?

The problem with disabling the pipelines which handle those URLs is that
other parts of Manakin depend on them. The "theme" XSLTs which display
item metadata on item pages, for instance, dereference those URLs to
obtain the item data. :-)

What you should be attempting is to patch the pipelines which handle
those URLs, so that the sensitive information is filtered out. Take a
look at this pipeline fragment, for instance:


   
  
  
   
   


If you insert a 
element between the generator and the serializer, then you can have
complete control over what metadata Manakin exposes. e.g. removing any
dc.description.provenance fields which include an "@" character.

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Field Missing from Altered Submission Forms

2008-06-30 Thread Conal Tuohy
On Mon, 2008-06-30 at 13:54 -0500, [EMAIL PROTECTED] wrote:
> I could use some help on a DSpace mystery. We are on 1.4.2 and just
> created a custom submission input form process for DSpace for a
> particular collection, primary using the instructions from
> http://wiki.dspace.org/index.php/Alter_submission_input_forms and it
> works just fine, except for one problem. One of the fields just
> doesn't show up at all (dc.publisher).
> 
> Interestingly, this field is a really simple one, and it is a
> basically unchanged from the default Publisher field value in the
> input-forms.xml file. It looks like this in the file:
> 
> 
>  dc
>  publisher
>  
>  false
>  Publisher
>  onebox
>  Enter the publisher of the collection.
>  
> 
> 
> I've tried moving it to a different place in the submission workflow,
> but it still doesn't show up. All of the other custom fields show up
> and write the correct DC metadata for submitted item of this
> particular collection, but the Publisher field doesn't show up at all.
> 
> Has anyone seen this before? Is there a limit on the number of
> submission fields of a particular page? Any ideas?

I think I know what this is about.

There is a strange (to my mind) feature in the metadata editing system,
which is that the dc.publisher field, dc.date.issued,
dc.title.alternative, and dc.identifier.citation fields are
automatically removed from the input forms at runtime, depending on the
value of responses to the "initial questions" in the submission
process. 

If, when submitting an item, you say that an item has not been published
before, then the dc.publisher field disappears from your form, wherever
it may be.

The Java code responsible is in org.dspace.app.util.DCInputSet
http://projects.dspace.org/dspace/xref/org/dspace/app/util/DCInputSet.html#185

Hope that helps!

Con

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Functional javascript in Manakin

2008-06-22 Thread Conal Tuohy
On Wed, 2008-06-18 at 16:08 +0200, Art Lowel wrote:
> I've been recreating some of our custom jsp addons for 1.4 dspaces as
> aspects in Manakin, and I have some questions concerning javascript. I
> was unable to find documentation addressing following issues and so
> far, I have only found examples of dspace installations using
> javascript as part of a theme.
> 
> 
> That's fine for javascript that does something mainly visual e.g. a
> sliding animation to show/hide the contents of a div, or a script
> emphasising a menu item when the mouse hovers over it. It's a good
> thing that these scripts are part of the theme layer because that way
> they can differ from theme to theme.
> 
> 
> However, there are ways of using javascript where can it be considered
> to be functional rather than visual and thus preferably not part of a
> theme. Consider the problem of alerting a user of unsaved changes on a
> settings page. This requires an onblur action for every setting (form
> field) to trigger a javascript function that verifies whether that
> setting has changed. If the setting has changed a warning should be
> shown at the top of the page.
> 
> 
> I believe the manner in which that the warning will be shown, and the
> way it looks should be part of the theme. But the onblur actions, and
> the verify function should be part of the aspect, as they don't do
> anything visual whatsoever.

Even for functions that do nothing visual, do they not still have a
dependency on the theme?

These functions presumably run within the context of the web page (the
HTML form). They would need to interrogate the HTML form, presumably
accessing nodes in a DOM by id, etc, and presumably using a browser
method to pop up a dialog box or something. That would assume a DOM with
a particular structure, and a standard web browser host.

But consider that a different theme might not render the DRI form as an
HTML form in quite the same way. The DRI form might even be rendered in
some other format: altogether; for the sake of argument it could be PDF,
SVG, VRML, Flash, XUL, etc.

If you are after modularity and want to reuse the javascript then you
might instead follow the pattern of the "dri2xhtml" theme in the
"themes" folder. This isn't really a theme at all, but a theme library
which is included from various other themes. 

Con

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Manakin

2008-06-09 Thread Conal Tuohy
Vincent

RSS feeds are supported in Manakin but (as far as I know) they are only
exposed via html/head/link elements - they don't appear as hyperlinks in
the html body. If you'd like to see them in the body of your web pages
as well I have a Manakin aspect you could use to do so. Just let me
know.

Conal

On Mon, 2008-06-09 at 14:42 +0200, BAILLY, Vincent wrote:
> Hello,
>  
> I am looking for adding RSS to manakin
> I beleive that i should look for this in the theme but i don't know
> where exactly
> and I didn't found anymore information on the net.
> So if anybody can explain it to me or guid me to a tutorial
> that would grealy help me.
>  
> Thanks
>  
> Vincent BAILLY
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ___ DSpace-tech mailing list 
> DSpace-tech@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Ant Update or Fresh Install

2008-06-09 Thread Conal Tuohy
To update dspace/config/dspace.cfg I think you want:

ant init_configs

On Mon, 2008-06-09 at 14:57 -0400, Hutchinson, Alvin wrote:
> Thanks, Mark. Yes, it is Dspace 1.3.2
> 
> The web.xml file shows:
> 
> 
>   dspace-config
>   ${dspace.dir}/config/dspace.cfg
>   
> The location of the main DSpace configuration file
>   
> 
> 
> I assume that the ${dspace.dir} value comes from the
> dspace-source/config/dspace.cfg file which is set at 
> 
> dspace.dir = /data/dspace
> 
> Do I have to edit the web.xml file as well? 
> 
> I also tried ant build_wars but the same message appeared:
> 
> FATAL main org.dspace.core.ConfigurationManager - Can't load
> configuration
> java.io.FileNotFoundException: ${dspace.dir}/config/dspace.cfg (No such
> file or directory)
> 
> thanks again for any tips. 
> 
> Alvin 
> 
> -Original Message-
> From: Mark Diggory [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 09, 2008 2:20 PM
> To: Hutchinson, Alvin
> Cc: dspace-tech@lists.sourceforge.net
> Subject: Re: [Dspace-tech] Ant Update or Fresh Install
> 
> A assume this is 1.4 or eariler?
> 
> No, running a fresh install on an existing installation will more  
> than likely break it.
> 
> If you look in your dspace web-application (and dspace-oai if you  
> have that installed as well) you'll find a WEB-INF/web.xml file with  
> the location of your dspace.dir/config/dspace.cfg configured. You'll  
> need to change those.
> 
> The ant build_wars task will rebuild the wars with you changes in  
> dspace.cfg (either in your [source]/config/dspace or vi -Dconfig=.../ 
> location/of/dspace.cfg)
> 
> -Mark
> 
> On Jun 9, 2008, at 9:32 AM, Hutchinson, Alvin wrote:
> 
> > Recently my Dspace directory was changed from /dspace to /data/dspace.
> >
> > When I try to start Tomcat I get the error:
> >
> > FATAL main org.dspace.core.ConfigurationManager - Can't load
> > configuration
> > java.io.FileNotFoundException: ${dspace.dir}/config/dspace.cfg (No  
> > such
> > file or directory)
> >
> > I changed the $dspace.dir folder in the dspace.cfg file to reflect the
> > change but my question is:
> >
> > Do I need to do ant fresh_install instead of an ant update? I tried  
> > the
> > latter but still get the error.
> >
> > If I do a fresh_install will it wipe out my jsp, css,
> > messages.properties etc. files?
> >
> > I poked around the wiki to try to find an answer but couldn't see
> > anything.
> >
> > Many thanks in advance for guidance,
> >
> > Alvin Hutchinson
> > Smithsonian Institution Libraries
> > (202) 633-1031
> >
> > --
> 
> > ---
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://sourceforge.net/services/buy/index.php
> > ___
> > DSpace-tech mailing list
> > DSpace-tech@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> 
> 
> -----
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] process 2 DRI with a XSL

2008-06-05 Thread Conal Tuohy

Xaquín: yes you can do this.

You could look at using xinclude and Cocoon's XIncludeTransformer.

Perhaps you could add an Aspect which:

1) used an XSLT to insert the appropriate xinclude element in the DRI document; 
2) then used the XInclude transformer to dereference the xinclude (essentially 
this will make a recursive call to Cocoon).

e.g. you need to insert something like this:

http://www.w3.org/2001/XInclude"; 
href="cocoon://DRI/cualquier/uri/aqui"/>

In the cocoon sitemap you would have:




Of course you will also need to transform the included XML into HTML ...

Con

-Original Message-
From: [EMAIL PROTECTED] on behalf of Xaquin Lores
Sent: Thu 6/5/2008 23:29
To: DSpace-tech@lists.sourceforge.net
Subject: [Dspace-tech] process 2 DRI with a XSL
 
Hello,

Would be posible to call another DRI inside a XSL while procesing a DRI? I
want to have list of items in a collection homepage (not recent submisions),
so I need to include it in the DRI of collection.

Thanks

Xaquín Lores


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


[Dspace-tech] problems with uploading files with unknown file formats

2008-06-04 Thread Conal Tuohy
At Victoria University of Wellington, we're preparing to migrate from DSpace 
1.4 to 1.5, but during testing we've found a problem with uploading files.

If either the uploaded file's type is unknown to DSpace, or if the "Uload file 
and add another" button is clicked, then the upload step will never complete. 

For example, I browsed for an xsl file, and when I clicked the "Next" button, 
the file upload page returned, this time with my uploaded file listed on it; 
"application/octet-stream" as the type; and "Unknown" as the description. 

I could then edit the type and change it to "text/xml", which would take me 
back to the File Upload page again. Now my file has "text/xml" as the type, but 
if I click "Next" I still remain on the same page. I can't get to the "Review" 
stage not matter what button I press. I have to cancel and delete the 
submission.

By contrast if I upload a file with the extension ".xml" and click "Next" then 
everything works fine and I go on to the "Review" stage. DSpace assigns the 
known content type "text/xml" to the file.

(By the way, in both cases my browser has sent the uploaded file with a content 
type of "text/xml", so I assume that DSpace is ignoring this metadata and 
guessing (or failing to guess) the content type itself.)

Even more oddly, if I click on the "Upload file and add another" button 
(instead of "Next"), then I get stuck on that page, EVEN IF the file I uploaded 
was a "Known" type. 

It is possible to upload multiple files (of "known" types, only), by clicking 
the "Next" button on the File Upload page, then clicking "Previous" to return 
to that page to upload another file. Clicking the "Upload file and add another" 
at any point will get the submission stuck in a loop.

Does anyone else have the same problem?

I am trying to debug the problem. I'm looking in submission.js and in 
org.dspace.submit.step.UploadStep. I'm still a fair way away from understanding 
the process, though.

Conal

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Best Practices for Journal Articles

2008-06-02 Thread Conal Tuohy
On Mon, 2008-06-02 at 16:04 -0500, Dorothea Salo wrote:
> On Mon, Jun 2, 2008 at 3:58 PM, Thomas A McGee <[EMAIL PROTECTED]> wrote:
> 
> > What's the best methodology for archiving individual articles within an
> > issue of a periodical?
> 
> I don't think there's one answer to this. Partly it depends on the
> journal's production workflow and what they're willing to give you.
> I'm not a big fan of archiving whole issues in a single item, but
> sometimes that's how I get 'em. Such is life.
> 
>  We'd like to have the metadata be more closely tied
> > to an individual author's work, as well as let users more easily find the
> > section they need. But we'd also like to keep the articles tied together as
> > part of a master entry which represents the entire issue.
> 
> We're looking at this where we are too. I suspect the way we're going
> to go is to write a small Manakin Aspect that groups items based on
> dumb string-matching in a specific Dublin Core field (probably
> relation.ispartof). There's almost certainly a better way, but we
> think this should be reasonably feasible and effective.

I think DC.Relation.isPartOf (and the inverse relation
DC.Relation.hasPart) is a good idea, but why would you use "dumb
string-matching"? Why not use the (handle) URI of the items? e.g. the
DSpace item representing the issue would have dc.relation.haspart fields
each equal to the handle of an article, and each article could have an
ispartof field equal to the handle of the issue record.

Con


-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Quick SRU Survey

2008-05-18 Thread Conal Tuohy
Ralph, SRU is on my list.

I am migrating customisations from DSpace/Manakin 1.4 (in production) to
a test instance of DSpace 1.5, and when I've finished this I will
definitely want to add SRU support to integrate the repository into the
university library's federated search system. 

Con

On Fri, 2008-05-16 at 13:35 -0400, LeVan,Ralph wrote:
> I have no sense of how much my SRW/U code is being used by the DSpace
> community.  I just spent most of the last week working on Claudia’s
> problem and my management is grumbling.  It would greatly help if I
> could provide a list of real users.  And if none of you (except
> Claudia) are using it, then we’ll make some other sort of support
> arrangements.
> 
>  
> 
> Send some sort of information (glowing testimonials always help!) to
> [EMAIL PROTECTED]
> 
>  
> 
> Thanks!
> 
>  
> 
> Ralph
> 
> 
> -
> This SF.net email is sponsored by: Microsoft 
> Defy all challenges. Microsoft(R) Visual Studio 2008. 
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___ DSpace-tech mailing list 
> DSpace-tech@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Keeping the database information of Dspace 1.4.2to 1.5

2008-05-14 Thread Conal Tuohy
Hi Gary and Vincent

I expect you've already solved your problem by now, but for the record,
in case anyone has the same problem when upgrading to 1.5, I also had
the problem (after an upgrade from 1.4 to 1.5) that the browse did not
work, although I could see the list of communities and collections.

In the logs I could see a JDBC exception that the "bi_item" table did
not exist. I eventually worked out I had forgotten to run the browse
indexer program:

[dspace]/bin/index-init

This is actually covered in the documentation for dspace 1.5's - in
point 13 in "update.html", but I had missed it. Once I ran the indexer,
everything worked.

Hope this helps someone!

Con

On Fri, 2008-05-02 at 10:23 +1000, Gary Browne wrote: 
> Bonjour/soir Vincent
> 
> Unfortunately I don't have any answers for you but I'm still working on
> the very same issue myself. From your description, it sounds like you've
> gone through the same process which I tried. I also am able to get the
> content displaying but browsing does not work. See my former posts:
> 
> "1.4 to 1.5 db upgrade errors"
> 
> And the subsequent
> 
> "Postgres upgrade issues"
> 
> The second post was made in desperation really. Just a more detailed
> wording in the vain hope of someone coming up with a magic fix. There
> have been a couple of suggestions on fixes for this but there was
> nothing suggested that I hadn't already tried. If you read of my posts,
> I'd be interested to see whether you are performing the same actions as
> me, and getting any similar error messages or outcomes. I'd also be
> interested (and I'm sure the list would - there must be others having
> this problem) to hear if you manage to get it working.
> 
> I'll post to the list when I come up with any great ideas (hah!) or if I
> get things working.
> 
> Regards
> Gary
> 
> 
> 
> Gary Browne
> Development Programmer
> Library IT Services
> University of Sydney
> ph: 9351-5946
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of BAILLY,
> Vincent
> Sent: Tuesday, 29 April 2008 7:52 PM
> To: dspace-tech@lists.sourceforge.net
> Subject: Re: [Dspace-tech] Keeping the database information of Dspace
> 1.4.2to 1.5
> 
> Hello,
> 
> After making a fresh install of Dspace 1.5, i look for how i could take
> my old database back I have made a dump of this one and saved it in the
> new one. As i was waiting for it doesn't work instantly But at least the
> list of my old communauties and collections appear. So i launch the SQL
> script Database_schema_14-15.sql but i doesn't work better. Any idea of
> how should i do ?
> 
> Thanks Vincent 

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Overlays etc for local customization

2008-05-14 Thread Conal Tuohy
On Tue, 2008-05-13 at 23:17 -0700, Mark Diggory wrote:

> > I read the wiki page
> > http://wiki.dspace.org/index.php/SimpleAddonMechanism which did say  
> > this
> > is possible, but I didn't understand how for instance my overlay  
> > project
> > could extend the manakin project and override it, for instance by
> > including a new Manakin Aspect and inserting it into the Aspect chain,
> > or defining a new authenticator class and declaring it in dspace.cfg.
> 
> Yes, in fact, this is now the default mechanism in the build process  
> we recommend for doing UI customizations.  There have been a few  
> tutorials put together, 

Thanks Mark - could you provide links to these tutorials?


-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Overlays etc for local customization

2008-05-13 Thread Conal Tuohy
On Tue, 2008-05-13 at 18:19 +0100, Dan Sheppard wrote:

> At OR2008 there was talk about the new maven build supporting
> overlays 
> (is that correct) for defining such things, I believe. I've not had
> much 
> chance finding the docs, though, and have asked around locally,
> checked 
> the wiki, etc, but there's always the possibilty I'm being dim. I can
> do 
> maven, I'm just interested mainly in where I should put things for an 
> overlay/whatever-it-is-I-want.

That's a good question. I'd like to know, too. Is anyone already using
Maven in this way?

I read the wiki page
http://wiki.dspace.org/index.php/SimpleAddonMechanism which did say this
is possible, but I didn't understand how for instance my overlay project
could extend the manakin project and override it, for instance by
including a new Manakin Aspect and inserting it into the Aspect chain,
or defining a new authenticator class and declaring it in dspace.cfg.


-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


[Dspace-tech] permissions to modify permissions

2008-05-01 Thread Conal Tuohy
One thing that's always struck me as odd about DSpace's permission
system is that it doesn't seem possible for anyone but the administrator
to modify the permissions on an item. 

Is this actually the case, or am I mistaken?

Assuming I understand it correctly, can anyone comment on why it is the
case? Is there a rationale for the omission of this feature, or is just
a historical accident?

??Shouldn't it be possible for a collection admin to be ass=gned this
ability? It's quite a common feature in many access controlled
environments (i.e. a "modify permissions" permission).

What do others think? I am interested in adding this feature (I won't
list here the reasons since I think they should be obvious).

Finally, can anyone who's hacked on DSpace's authorisation system before
provide a hint as to what's involved?

Thanks!!

Con

PS apologies for the cross-posting - it wasn't clear which forum these
questions are best confined to. :-)
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org






-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Manakin RSS errors

2008-05-01 Thread Conal Tuohy
We had the same problem here though in our case the "Short Description"
field was typically blank. We found that if we inserted something (even
a space) in the "Short Description" field, then the problem was solved.

On Fri, 2008-05-02 at 10:26 +0930, [EMAIL PROTECTED] wrote:
> I have a rather weird problem, which I've reached the end of my limit of
> expertise.  On our site, I've enabled the rss feeds, and currently all the 
> feeds
> for each community and collection (and the whole site), on the JSPUI side are
> working.
> 
> The problem is the manakin side. Yesterday, there were only one community 
> feed,
> and two collection feeds working, while all the other feeds were giving an 
> error
> (I've included it below). Today, after I've restarted tomcat, three different
> collection feeds are working now and all the others are gone. It seems to be
> pretty random, some of them are big collections, some of them are small.
> 
> I traced it to com.sun.syndication.io.impl.RSS20Generator  where it seems to 
> be
> something with the description, but all the collections and communities have
> descriptions, and if they didn't, I'm assuming that the JSPUI would have made 
> a
> fuss.
> 
> Any help with this problem would be greatly appreciated.
> 
> 
> Thanks
> Jennifer
> 

> org.apache.cocoon.ProcessingException: Failed to process pipeline
>  at  -
> file:/usr/local/dspace/tomcat/webapps/manakindev/sitemap.xmap:301:32
>  at  -
> file:/usr/local/dspace/tomcat/webapps/manakindev/sitemap.xmap:297:33
>  at  -
> file:/usr/local/dspace/tomcat/webapps/manakindev/sitemap.xmap:293:46
>  at
> org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:144)
>  at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:951)

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] news, javascript and Manakin

2008-03-19 Thread Conal Tuohy

On Wed, 2008-03-19 at 21:50 -0700, Mark Diggory wrote:
> On Mar 19, 2008, at 8:44 PM, Conal Tuohy wrote:
> 
> >
> > On Wed, 2008-03-19 at 18:52 -0700, Mark Diggory wrote:
> >> On Mar 19, 2008, at 5:30 PM, Conal Tuohy wrote:
> >> If its a question of it being well formed xhtml coming out of the
> >> template... A simple Java class can be created to assist in this area
> >> using JTidy to process the string containing the html prior to
> >> processing it into the outputstream.
> >
> > You mean using JTidy as an XSLT extension function, passing a  
> > string and
> > returning a DOM back into the XSLT? That could work. Or JTidy could be
> > packaged into a Cocoon transformer of its own.
> 
> The problem is that anything in the pipeline (generator or  
> transformer) has to produce well formed XML.  So a transformer that  
> takes poorly formed xml would never be reached because the sax errors  
> happen in-between it and the previous one. 

I was thinking of a transformer that would consume a SAX stream
containing some nodes which contained quoted HTML, and would unquote
them and parse the result as HTML. So it would be well-formed (text)
before, and well-formed (XHTML) after.

> However, a Generator that  
> cleaned up RSS on the way through would be a nice feature... And if  
> it were triggered/configured from the URI of the resource being  
> called to get the RSS, even better... the just an xpath "document 
> ('http://foo.com/feed.rss')" or "document(${dspace.dir}/config/ 
> news.rss')"  could activate it... see
> 
> http://cocoon.apache.org/2.0/userdocs/generators/html-generator.html

Better not to invoke it from within XSLT though - it could be included
using the XInclude transformer referring to a Cocoon pipeline with the
"cocoon:" protocol.

There are known issues with Cocoon's caching when using the XPath
"document()" function in XSLT (I don't think these have been fixed?).
Basically the cache validity of the result is based on the resources
mentioned in the pipeline definition in the sitemap, and doesn't take
account of resources invoked from with an XSLT itself. So the RSS could
change without invalidating the cache entry of the resulting page, and
you could end up serving stale content until some other part of the
document changed, and the cache was invalidated.

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] news, javascript and Manakin

2008-03-19 Thread Conal Tuohy

On Wed, 2008-03-19 at 18:52 -0700, Mark Diggory wrote:
> On Mar 19, 2008, at 5:30 PM, Conal Tuohy wrote:
> 
> >
> > On Wed, 2008-03-19 at 16:40 -0700, Mark Diggory wrote:
> >> This is why its my opinion not to go that deep into the system.  Skip
> >> DRI altogether an write a document() include in the theme that
> >> retrieved the feed.  Author a few xslt templates into the base xslt
> >> of the theme to handle formating.
> >
> > Transclusion of feeds in Manakin is problematic whether you do it in a
> > theme or in the aspect layer. Either way you have the problem of
> > handling escaped HTML markup. You can't just use disable-output- 
> > escaping
> > in a Cocoon pipeline.
> 
> This is the case when the transform is not the final serialization to  
> the output stream.

Yes, and that's ALWAYS the case in a Cocoon pipeline isn't it? The data
must be parsed into SAX events so that the pipeline serializer will
serialize it properly.

> If its a question of it being well formed xhtml coming out of the  
> template... A simple Java class can be created to assist in this area  
> using JTidy to process the string containing the html prior to  
> processing it into the outputstream.

You mean using JTidy as an XSLT extension function, passing a string and
returning a DOM back into the XSLT? That could work. Or JTidy could be
packaged into a Cocoon transformer of its own.

-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] news, javascript and Manakin

2008-03-19 Thread Conal Tuohy

On Wed, 2008-03-19 at 16:40 -0700, Mark Diggory wrote:
> This is why its my opinion not to go that deep into the system.  Skip  
> DRI altogether an write a document() include in the theme that  
> retrieved the feed.  Author a few xslt templates into the base xslt  
> of the theme to handle formating.

Transclusion of feeds in Manakin is problematic whether you do it in a
theme or in the aspect layer. Either way you have the problem of
handling escaped HTML markup. You can't just use disable-output-escaping
in a Cocoon pipeline.

Doing the transclusion on the client side in XSLT you could use d-o-e,
but on the client side you have another problem which is complying with
"cross-domain" security restrictions in the browser. That applies to
JavaScript as well as XSLT of course.

> Nobody, says it has to be perfect and support every possible case at  
> first. Thats the beauty of being Open Source, support the basic  
> formats Atom, RSS 2.0 RSS 1.0 with default assumptions and accept  
> fixes from there on.

> -Mark
> 
> On Mar 19, 2008, at 3:46 PM, Conal Tuohy wrote:
> 
> > IMHO news-sourced-from-RSS would best be implemented on the server  
> > side,
> > as an Aspect. It you had an Aspect that converted RSS (or Atom) feeds
> > into DRI then you could plug it in as a replacement to news.xml, and
> > still use any of the existing themes etc to render it.
> >
> > Coincidentally I've been doing voluntary work in the last week on a
> > website which is an aggregation of blogs. I used Sun's "Rome" library
> > which can parse and convert feeds of various formats (because there  
> > are
> > about 1 zillion different flavours of RSS at least). I used Rome to
> > parse and aggregate feeds and convert the result to Atom 1.0. Then I
> > wrote an XSLT to render that as HTML. I found Rome is still not quite
> > production quality (I used it anyway and just fixed the few bugs I
> > found).
> >
> > If you're considering processing feeds in XSLT, one thing which is  
> > worth
> > noting upfront is that sometimes feeds will contain quoted html  
> > markup,
> > e.g.
> >
> > <div style="font-weight: bold"><p>Blah
> > blah</p><div>
> >
> > Usually in XSLT you'd handle that with disable-output-escaping, but
> > that's not going to produce well-formed DRI XML is it? (NB d-o-e  
> > simply
> > has no effect in Cocoon). So it might be necessary to wheel in the
> > HTMLGenerator to convert each such snippet into well-formed XHTML, and
> > from there into DRI.
> >
> > Cheers
> >
> > Con
> >
> > On Wed, 2008-03-19 at 07:38 -0700, Mark Diggory wrote:
> >> I know where he's going with it though...
> >>
> >> Are there any generic XSLT libraries for rendering RSS feeds? Maybe
> >> the News.xmls should just be rss feeds, not DRI?
> >>
> >> -Mark
> >>
> >> On Mar 19, 2008, at 6:59 AM, Scott Phillips wrote:
> >>
> >>>
> >>> javascript would need to be at the theme layer. By default Manakin
> >>> will provide set the RSS feeds in the HTML header and most browsers
> >>> will put an icon at the end of the URL bar for them. If you would  
> >>> like
> >>> to change this behavior then you will need to customize it in a  
> >>> theme.
> >>>
> >>> Scott--
> >>>
> >>>
> >>> On Mar 19, 2008, at 6:08 AM, George Hamilton wrote:
> >>>
> >>>> Hello
> >>>>
> >>>> In the old JSP dspace we had some javascript embedded in the news
> >>>> html
> >>>> file for rendering an RSS feed.  Looking at the DRI Schema there
> >>>> doesn't
> >>>> appear to be an element for scripts.  Does anyone have advice on  
> >>>> how
> >>>> this can be done?
> >>>>
> >>>> Regards
> >>>>
> >>>> George
> > -- 
> > Conal Tuohy
> > New Zealand Electronic Text Centre
> > www.nzetc.org
> >
> 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] news, javascript and Manakin

2008-03-19 Thread Conal Tuohy
IMHO news-sourced-from-RSS would best be implemented on the server side,
as an Aspect. It you had an Aspect that converted RSS (or Atom) feeds
into DRI then you could plug it in as a replacement to news.xml, and
still use any of the existing themes etc to render it.

Coincidentally I've been doing voluntary work in the last week on a
website which is an aggregation of blogs. I used Sun's "Rome" library
which can parse and convert feeds of various formats (because there are
about 1 zillion different flavours of RSS at least). I used Rome to
parse and aggregate feeds and convert the result to Atom 1.0. Then I
wrote an XSLT to render that as HTML. I found Rome is still not quite
production quality (I used it anyway and just fixed the few bugs I
found).

If you're considering processing feeds in XSLT, one thing which is worth
noting upfront is that sometimes feeds will contain quoted html markup,
e.g.

<div style="font-weight: bold"><p>Blah
blah</p><div>

Usually in XSLT you'd handle that with disable-output-escaping, but
that's not going to produce well-formed DRI XML is it? (NB d-o-e simply
has no effect in Cocoon). So it might be necessary to wheel in the
HTMLGenerator to convert each such snippet into well-formed XHTML, and
from there into DRI.

Cheers

Con

On Wed, 2008-03-19 at 07:38 -0700, Mark Diggory wrote: 
> I know where he's going with it though...
> 
> Are there any generic XSLT libraries for rendering RSS feeds? Maybe  
> the News.xmls should just be rss feeds, not DRI?
> 
> -Mark
> 
> On Mar 19, 2008, at 6:59 AM, Scott Phillips wrote:
> 
> >
> > javascript would need to be at the theme layer. By default Manakin
> > will provide set the RSS feeds in the HTML header and most browsers
> > will put an icon at the end of the URL bar for them. If you would like
> > to change this behavior then you will need to customize it in a theme.
> >
> > Scott--
> >
> >
> > On Mar 19, 2008, at 6:08 AM, George Hamilton wrote:
> >
> >> Hello
> >>
> >> In the old JSP dspace we had some javascript embedded in the news  
> >> html
> >> file for rendering an RSS feed.  Looking at the DRI Schema there
> >> doesn't
> >> appear to be an element for scripts.  Does anyone have advice on how
> >> this can be done?
> >>
> >> Regards
> >>
> >> George
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Include a file in structural.xsl

2008-02-25 Thread Conal Tuohy
Hi Mika

xsl:include is for including other xslt stylesheets (i.e. as modules).

Instead, I believe you should use the xpath "document()" function:

http://localhost/feed.rss')"/>

(... or whatever the URL is).

This will apply templates in your stylesheet to the included file; by
writing templates to match the RSS elements you can style them as HTML.

Slightly more elegant in my opinion would be to include the RSS into
your DRI (and transforming it to the DRI schema elements such as "div"
"head", "list", "ref" etc.) by writing a Manakin Aspect. This would make
it easier to style the RSS as HTML consistently with the rest of your
Manakin Theme.

A few weeks ago I posted an example Aspect that adds extra data to the
DRI document:

http://sourceforge.net/mailarchive/forum.php?thread_name=1202163796.7811.30.camel%40localhost&forum_name=dspace-tech

Regards

Conal

On Mon, 2008-02-25 at 15:35 +0200, Mika Stenberg wrote:
> Hi,
> 
> Im hoping to include a newsfeed file as a part of our repository 
> frontpage. I was thinking of using xsl:include but it seems that its not 
> really working. So how should I do a simple html-file include in Manakin 
> XSL files?
> 
> Thanks,
> Mika
> 
> 
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] example: a Manakin Aspect to modify the breadcrumb trail

2008-02-04 Thread Conal Tuohy
On Mon, 2008-02-04 at 17:59 -0600, Dorothea Salo wrote:
> On Feb 4, 2008 4:23 PM, Conal Tuohy <[EMAIL PROTECTED]> wrote:
> > Recently there was a discussion here about programming Manakin aspects
> > in XSLT. I thought I'd post here a small example of something I did here
> > to show how it can be done.
> 
> Why would one program XSLT into an Aspect rather than a Theme?

I wrote the breadcrumb example as an Aspect because it's intended to
apply independently of Theme.

In general I think pretty much anything which could be done in an Aspect
probably should be, and Themes should be reserved for purely
presentational ... ah ... aspects. It's a question of Separation of
Concerns.
http://en.wikipedia.org/wiki/Separation_of_concerns

In our case (at Victoria University of Wellington) we only have one
theme where the breadcrumbs appear, so the additional breadcrumb could
have been added within the theme. But it would have been a hack. By
adding the breadcrumb in an Aspect, we can later change our Theme and
not have to revise the breadcrumb addition at all. Or we can revise our
breadcrumb structure without having to change the Theme at all. 

I'm making more changes to the content of the dri:options (the
navigation menu), which I'm also doing as an Aspect. This is entirely
independent of how we want to render that menu in HTML form.

Cheers

Con
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


[Dspace-tech] example: a Manakin Aspect to modify the breadcrumb trail

2008-02-04 Thread Conal Tuohy
Recently there was a discussion here about programming Manakin aspects
in XSLT. I thought I'd post here a small example of something I did here
to show how it can be done. I wanted to add a breadcrumb to the
breadcrumb trail (so that the first breadcrumb in the trail is the
University Library, with our DSpace repository as the second
breadcrumb).

I created a folder called "Trail" in the "aspects" folder, and added a
reference to it in the xmlui.xconf, after all the other aspects:




In the "Trail" folder I have two files: a sitemap and a simple XSLT:

Here's the sitemap of my new Aspect:



http://apache.org/cocoon/sitemap/1.0";>









And here is the modify-trail.xsl XSLT:


http://www.w3.org/1999/XSL/Transform";
xmlns:dri="http://di.tamu.edu/DRI/1.0/";>











http://www.victoria.ac.nz/library/";>Library
    
    




I hope someone finds this helpful!
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Manakin: namespace declarations in output?

2008-02-04 Thread Conal Tuohy
On Mon, 2008-02-04 at 14:39 -0600, Dorothea Salo wrote:
> On Feb 4, 2008 2:34 PM, Conal Tuohy <[EMAIL PROTECTED]> wrote:
> 
> > I believe there's a namespace cleanup transformer that at least some of
> > the themes use prior to HTML serialisation.
> 
> Oh? How would I recognize this thing?

My memory did serve me correctly - here's what I was thinking of:



It will appear in a pipeline like so:



> > BTW, in XSLT, the exclude-result-prefixes feature only prevents the
> > automatic propagation of namespace bindings and doesn't apply if your
> > XSLT uses xsl:copy to copy an element (because the namespace bindings
> > are attached to the element and come with it).
> 
> Yes, I figured this out today and did a sweep. All the copy-ofs I see
> are straight-up text nodes, though; they shouldn't carry a namespace
> along, should they?

Indeed not.

> The problem may have something to do with trying to do an xsl:apply
> templates with a select that marches down from the root instead of
> being relative to the current node. I'm testing this hypothesis now.

Where do the namespace declarations appear? i.e. on which elements? 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Manakin: namespace declarations in output?

2008-02-04 Thread Conal Tuohy
Hi Dorothea

I believe there's a namespace cleanup transformer that at least some of
the themes use prior to HTML serialisation.

BTW, in XSLT, the exclude-result-prefixes feature only prevents the
automatic propagation of namespace bindings and doesn't apply if your
XSLT uses xsl:copy to copy an element (because the namespace bindings
are attached to the element and come with it). 

Con

On Mon, 2008-02-04 at 09:26 -0600, Dorothea Salo wrote:
> A few of my Manakin-derived HTML pages have namespace declarations in
> them, and I can't figure out why, as there's nothing in the culprit
> namespace in the output and exclude-result-prefixes is duly on. The
> i18n namespace seems to be the commonest offender, though I am also
> seeing the DRI namespace declared where it shouldn't be. What might
> trigger this, and how can I make it stop? Do I need to give code
> examples or a URL?
> 
> Dorothea
> 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Debugging XSLT in Manakin

2007-12-20 Thread Conal Tuohy
Shame you don't get a line number, alright.

>From the message though it looks like you are accidentally using an
"attribute value template" (i.e. curly braces) in an attribute which
expects a location path, e.g.



... when you meant to type:



If I were you I'd look for any "select" attributes containing curly
braces. 

C

On Thu, 2007-12-20 at 08:33 -0600, Dorothea Salo wrote:
> > What information are you lacking?
> 
> Well, I've gotten the messages you mention when I forgot to rename ALL
> the occurrences of a particular new variable... but this is different,
> and it's kicking my rear. Sum total of error message:
> 
> javax.xml.transform.TransformerException: A location path was
> expected, but the following token was encountered: {
> 
> And no information as to WHERE it was expecting a "location path". I
> can't find any extraneous {'s anywhere, especially in the bit where I
> suspect the problem is. Googling about a bit, I suspect the answer can
> be found somewhere in the stack trace, but the full stack trace isn't
> returned to the Web, and the bit I need is buried too deep.
> 
> For what it's worth, what I'm trying to do is move community and
> collection logos out of the body of the collection and into the 
> containing the community/collection name. It's been surprisingly
> difficult to accomplish.
> 
> Dorothea
> 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Debugging XSLT in Manakin

2007-12-19 Thread Conal Tuohy
On Tue, 2007-12-18 at 15:18 -0600, Dorothea Salo wrote:
> If this is completely unworkable, feel free to scoff at me, but...

Not at all!

> Is there *any* way that Manakin can be nudged to give more information
> about XSLT problems in a theme?

What information are you lacking?

>  As it is, when I break something
> non-obviously (that is, not a gross XML well-formedness error), all I
> can do is guess wildly what I just broke. Given that every Manakin
> tweak means a Subversion commit, checkout, rebuild... this is
> uncommonly tiresome and time-consuming when things break often. (And I
> break stuff a lot.)

Are you editing Java code or just a theme with sitemaps and xslt? If the
latter, and you have a local installation, can I suggest you just hack
your theme on the live Manakin instance? It's a lot quicker and more
convenient. When you have something working you can copy it to your
development workspace and Do The Right Thing.

> Surely SAX knows where it is when a stylesheet blows up? Can it be
> persuaded to disgorge that information?

Yes it does; when something in the pipeline throws an exception Cocoon
should catch the exception and dump the Java stack to your browser with
a message.

I just tried it here and I got:
An error has occured
javax.xml.transform.TransformerException: Could not find variable with
the name of metadata
context:/file:/opt/apache/apache-tomcat-5.5.17/webapps/manakin/themes/embeddable/dri-to-xhtml.xsl
 - 86:8

... and a stacktrace. Is that the kind of thing you get?

BTW the resulting stack dump looks worse than it really is. The reason
is that the SAX pipeline is essentially a giant stack of Java method
calls (i.e. the pipeline generator calls the transformer, which calls
the serializer). Any XSL transforms in your theme are (depending on the
XSLT interpreter used) either interpreted by a Java XSLT interpreter or
are themselves compiled to Java byte code. In either case, some of your
XSLT code will be represented in that stack trace, so it can be worth a
look. Again, depending on your XSLT interpreter, error in your XSLT will
end up as Java errors, so an unitialised  can become a
java.lang.NullPointerException for instance. 



-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Reading other files in Manakin (was: Re: Desired hierarchical display of communities and collection list)

2007-11-26 Thread Conal Tuohy
Thanks Larry!

Looking at the XML which Manakin produces, I see that the file metadata
is specified in a  element from the METS vocabulary, and the file
type is specified only with a MIMETYPE attribute. There doesn't seem to
be a way in METS to provide more specific information than that (such as
is stored in the BitstreamFormat registry). AFAICS, it would be
necessary to embed some extra XML markup in a foreign (non-METS)
namespace. 

Con

On Mon, 2007-11-26 at 16:59 -0500, Larry Stone wrote:
> I haven't looked at the Manakin code, but the MIME media-type of a Bitstream
> must be coming from its associated BitstreamFormat -- so why not get
> the human-readable name from the BitstreamFormat as well?  There is no
> need to establish a separate map of MIME-type to user-friendly name
> when it already exists in teh BitstreamFormat registry.
> 
>   String friendly = bitstream.getFormat().getShortDescription();
> 
> One complication, or perhaps advantage, of using BSFs directly is that
> some of them have the same MIME-type,  so getting the friendly name
> from the BSF actually identifies the format more precisely -- e.g.
> XML-based formats might all have the MIME-type "text/xml", but distinct
> friendly names.  Thus, you should go to the Bitstream's BSF to get the
> friendly name rather than attempt to use the BSF registry as a map,
> because it might have multiple matches for one MIME-type.
> 
> -- Larry
> 
> > On Nov 21, 2007 10:06 PM, Conal Tuohy <[EMAIL PROTECTED]> wrote:
> > > On Wed, 2007-11-21 at 16:43 -0600, Dorothea Salo wrote:
> > > The mapping between media-types and friendly names could be introduced
> > > into the pipeline using a Manakin Aspect, and then utilised in a View,
> > > via XSLT.
> >
> > Aha. I can try to tackle this. What would be the closest existing code?
> >
> > > Alternatively, perhaps this is really just a case of i18n?
> >
> > I thought about that, but I can't quite make it work happily. Every
> > time an administrator adds a new bitstream format (something I assume
> > Manakin still has UI for?), DSpace itself would have to make an
> > automatic change to messages.xml, which is under most circumstances a
> > human-authored and source-controlled file. Automagically changing it
> > will make a mess of any installation that keeps its source in source
> > control, I would think.
> >
> > Dorothea
> >
> > --
> > Dorothea Salo[EMAIL PROTECTED]
> > Digital Repository Librarian  AIM: mindsatuw
> > University of Wisconsin
> > Rm 218, Memorial Library
> > (608) 262-5493
> >
> > -
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> > ___
> > DSpace-tech mailing list
> > DSpace-tech@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Facetted / faster browsing [was Development goals]

2007-11-22 Thread Conal Tuohy
Christophe, you might like to take a look at PKP Harvester, which uses
OAI-PMH to extract metadata from institutional repositories, and can be
searched (including by SRW), browsed, and harvested (via OAI-PMH). It
also provides RSS feeds as a format for search results.

For instance, see http://nzresearch.org.nz/

Regards

Conal

On Fri, 2007-11-23 at 05:29 +0100, Christophe Dupriez wrote:
> Hi MacKenzie, Mark and Jim!
> 
> Thanks for insisting on the idea of a client based interface!
> 
> DWELL:
>   I will explore Dwell further. I tried it with 
> http://simile.mit.edu/longwell/demo/libraries/ but it is rather slow 
> from here.
>   Is the inventory of values for a given facet evaluated locally, in 
> DSpace or in an intermediary server application?
>   I understood Dwell is based on OAI-PMH but there is no "Search" 
> request in OAI-PMH.
>   An extension has be defined for this:
> http://www.dlese.org/dds/services/oai2-0/odl_service_documentation.jsp
>   but I suppose it is not part of DSpace (am I wrong?).
>   OAI-PMH+Search(ODL) has similar capabilities than RSS and would ensure 
> better metadata transmission.
> 
> RSS:
> Mark+Jim advice opened my eyes on a simple fact: RSS standard(s) may be 
> used to represent a DSpace search result set (if I add a RSS flow 
> generation to DSpace search).
> The nice thing with RSS is the potential promise of  "subscription" for 
> searches where new records are regularly retrieved and highlighted.
> 
> RSS clients are not completely aware of their potential for databases 
> searches (and not only news feed) and could be improved to manage easily 
> simple ad hoc searches and not only "subscriptions" to searches.
> Some of them have the three frames interface I wish for my users to 
> browse DSpace results (like an e-mail management software).
> I made some experiments with RSSBandit (open-source: 
> http://www.rssbandit.org/ ) and I think it is a possible way to go.
> 
> Anybody digged in that direction?
> 
> Christophe
> 
> MacKenzie Smith a écrit :
> > Hi Mark,
> >   
> >> I've been saying for some time that, nice as the DSpace user interface
> >> is in many respects, it is not and should not be the only way to plumb
> >> a DSpace archive.  If it is (currently) difficult to get a particular
> >> search style put into DSpace, may I suggest trying a different
> >> approach.
> >>
> >> One could harvest metadata via the PMH responder, organize them any
> >> way one wishes, and search them in any desired way.
> >>   
> >> 
> > I can't resist pointing out that this is exactly what "DWell" does -- 
> > the faceted browsing
> > and search UI that is layered over DSpace via an OAI-PMH plugin for 
> > RDFized metadata.
> > See http://simile.mit.edu/wiki/Dwell or Richard Rodger's presentation on 
> > same at
> > http://www.aepic.it/conf/viewpaper.php?id=212&print=1&cf=11
> >
> > I think this is an excellent approach to building better DSpace UIs, and 
> > just leaves us
> > with the problem of the underlying data rigidity, which I hope we can 
> > address by relying
> > more on RDF or other rich metadata that is stored in the assetstore 
> > alongside the content
> > files. The current DSpace metadata tables are great for managing 
> > content, but suboptimal
> > for discovering what's in the repository (assuming we can get better 
> > discovery metadata
> > from outside the system, somehow).
> >
> > MacKenzie
> >
> >   
> 
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___ DSpace-tech mailing list 
> DSpace-tech@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Reading other files in Manakin (was: Re: Desired hierarchical display of communities and collection list)

2007-11-21 Thread Conal Tuohy
On Wed, 2007-11-21 at 16:43 -0600, Dorothea Salo wrote:
> (Subject changed to keep from hijacking the earlier thread.)
> 
> > For instance, the hierarchical structure of the collections could be
> > modelled in a simple XML or HTML document, and this hiearchy file could
> > be read by Manakin and used to add contextual information and links to
> > the web pages it generates.
> 
> What would be the smart way to do this? I'm thinking it might be a
> solution to the bitstream-format naming problem: make DSpace spit out
> an XML file with MIME types and the human-friendly representations,
> then pull that into one's Manakin theme.

The mapping between media-types and friendly names could be introduced
into the pipeline using a Manakin Aspect, and then utilised in a View,
via XSLT. 

Alternatively, perhaps this is really just a case of i18n?

C
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Desired hierarchical display of communities and collection list

2007-11-21 Thread Conal Tuohy
On Wed, 2007-11-21 at 16:12 +0530, Girija S wrote:
> Dear all,
> 
> I have also been wondering if this could be done in DSpace.  While 
> checking out some other repositories, I noticed that it has been done in 
> the Zurich Open Repository and Archive 
> http://www.zora.unizh.ch/zora/community-list which is maintained by Open 
> Repository (a service from Biomed Central).  I understand they use Dspace 
> too.  I wonder how this was done.  Would Manakin help in this? 

I think Manakin could help with this, yes.

For instance, the hierarchical structure of the collections could be
modelled in a simple XML or HTML document, and this hiearchy file could
be read by Manakin and used to add contextual information and links to
the web pages it generates.

I can't comment on the Zurich archive (except to note they don't appear
to be using Manakin).

> On Wed, 21 Nov 2007, Mika Stenberg wrote:
> 
> > I think arranging collections / communities isnt supported in DSpace.
> > They are automatically displayed alphabetically. We have several
> > collection that require a certain ordering, and are hoping that a
> > feature like this would be added to DSpace soon. Meanwhile you can go
> > around it by naming your collections like a) Collection 1 b) Collection 2.
> >
> > -Mika
> 
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Encoding URLs in Manakin

2007-11-07 Thread Conal Tuohy
Dorothea, as others have mentioned, you can either use Saxon as your
XPath processor (which implements XSLT 2 and therefore includes the
XPath function fn:escape-html-uri

http://www.w3.org/TR/xpath-functions/#func-escape-html-uri

To do this, you need to configure Saxon as an XSLT processor in the
Cocoon sitemap used by your Manakin theme.

Alternatively, you can add this escaping as a separate pipeline stage in
your theme, using Cocoon's EncodeURLTransformer:

http://cocoon.apache.org/2.1/userdocs/encodeurl-transformer.html

With this approach, your XSLT emits un-escaped URLs, and is followed by
an "encodeURL" pipeline stage which escapes the URLs, prior to sending
to the browser.

Cheers

Con

On Wed, 2007-11-07 at 15:16 -0600, Dorothea Salo wrote:
> Hi, all,
> 
> If I can divert a tiny bit of attention from the testathon... I'm
> trying to make author names on item-display pages clickable. The URL
> pattern for this is "browse-author-items?author=" plus the author's
> URL-encoded name -- which is the problem, as there doesn't seem to be
> any easy XSLT way to get URL encoding for a string.
> 
> Ideas? Or should I not worry about the encoding and just let the browser 
> worry?
> 
> Dorothea
> 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] ETD-MS management

2007-09-20 Thread Conal Tuohy
Hi Dorothea

On Thu, 2007-09-20 at 14:24 -0500, Dorothea Salo wrote:
> For those of us using DSpace 1.4+ to store electronic theses and 
> dissertations:
> 
> If you're using ETD-MS metadata, how are you managing your DSpace
> metadata registry? Are you placing the non-Dublin-Core ETD-MS metadata
> (e.g. degree information) inside the Dublin Core schema or in a
> separate one? 

At VUW we have created a separate schema to cover the ETD-MS fields
which can't really be expressed in DC (at least without a degree of
articulation which isn't possible within DSpace's essentially "flat"
metadata model)

We have used this URI for the schema's namespace:
http://www.ndltd.org/standards/metadata/current.html

The schema contains:
thesis.degree.discipline
thesis.degree.grantor
thesis.degree.level
thesis.degree.name

> If you use a separate one, are you putting the Dublin
> Core metadata used in ETD-MS inside the new schema, or are you mixing
> schemas on your ingest and display pages?

We are mixing schemas. We have retained the dc schema and actually added
2 others: one for ETD-MS, and another for all our purely local
requirements. e.g.
http://researcharchive.vuw.ac.nz/handle/10063/14?mode=full


> I'm about to go change my metadata registry to make ETD-MS work as
> part of the Manakin-based redesign I'm working on, and I'd like to do
> it in accord with best practices (or at least experience!).
> 
> Dorothea

Probably it would be a good idea to write up our experience as a topic
for the DSpace wiki.


-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Pdf problems

2007-09-20 Thread Conal Tuohy
Mika, you didn't say what the problem was exactly, so it's hard to
comment.

One problem I know of is that large PDF files may not display in Acrobat
Reader when used as a "plugin" to a browser. In this case, you get a
message from Acrobat saying that the file is damaged and couldn't be
opened. However, if you download the PDF and then open it in Acrobat
Reader then it works OK. If this is your problem, then you should be
aware that these problems are caused by bugs in the interface between
Acrobat Reader and the browsers in which it is embedded, and are not
bugs in DSpace. My guess would be that the bug is actually in Acrobat
Reader, in fact, since I have seen the same problem in quite different
browsers.

Although it's not really a bug in DSpace, there is a patch available to
work around the problem, by getting DSpace to send a hint to the browser
that the file should be downloaded (rather than displayed in a browser
plugin). So if this is your problem, you might like to look at this
patch:
http://tinyurl.com/2pr3u7

This is part of DSpace since 2007-07-20 (SVN revision 2073)





On Thu, 2007-09-20 at 12:57 +0300, Mika Stenberg wrote:
> Hi,
> 
> We are experiencing increasing difficulties in opening pdf- files via 
> Dspace / Manakin.  This is beginning to look like a serious problem 
> which affects the overall usability of the software. The problem exists 
> both in Manakin UI and Dspace UI.
> 
> If someone has any suggestions how to make pdf files open in browser, 
> please let me know.
> 
> You can see a demo of such problem at:
> http://hdl.handle.net/2455/131898
> 
> Thanks,
> Mika
> 
-- 
Conal Tuohy
New Zealand Electronic Text Centre
www.nzetc.org


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Sorting issues

2007-09-09 Thread Conal Tuohy
On Fri, 2007-09-07 at 16:25 +0200, Vlastimil Krejcir wrote:
> http://dl.ics.muni.cz:8080/manakin/browse-title?bottom=dml_cz%2F12638
> 
> Why the "Eine Klasse entarteter gewöhnlicher Differentialgleichungen und 
> das Kollokationsverfahren zu ihrer Lösung" or the "Über einige 
> Eigenschaften der Charakteristik der Schraubenenveloppe einer Kegelfläche" 
> is here?
> 

NB both these articles do have alternate titles in English; they are
being sorted in order of their English title, but with the German title
displayed in the list.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Coding special characters for batch ingestion

2007-08-27 Thread Conal Tuohy
On Mon, 2007-08-27 at 09:33 -0400, Mark H. Wood wrote:
> Thanks, all -- that helps a lot.
> 
> One additional problem I face is that I've been given no idea of which
> encoding(s) were used.  What fun.  Ever seen an Icelandic capital
> "Eth" used as a dash? :-/

Try an automated solution:
http://fredeaker.blogspot.com/2007/01/character-encoding-detection.html

Con

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech