[Dspace-tech] news, javascript and Manakin

2008-03-19 Thread George Hamilton
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


-
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 Scott Phillips

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


 -
 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


-
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] DSpace/PostgreSQL error

2008-03-19 Thread Thornton, Susan M. (LARC-B702)[NCI INFORMATION SYSTEMS]
We are trying to bring up a new machine with Dspace 1.4.2 and PostgreSQL
8.2 (Solaris 10).  It looks like DSpace is configured correctly (the web
page will come up, but it gets an Internal Error).  We can query the
database at the command line level, but cannot get to the database in
PGAdminIII.

 

Here is the error we are getting.  Does anyone have any ideas?

Thanks,

Sue

 

p.s.  We also are not using Tomcat - we're using Sun's Webserver7.

 

ERROR

2008-03-19 12:27:01,215 INFO  org.dspace.core.ConfigurationManager @
DSpace logging installed using log4j.properties

2008-03-19 12:27:13,780 WARN  org.dspace.jsp @
anonymous:no_context:database_error:org.apache.commons.dbcp.SQLNestedExc
eption: Cannot get a connection, pool exhausted

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool exhausted

at
org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:183)

at
java.sql.DriverManager.getConnection(DriverManager.java:525)

at
java.sql.DriverManager.getConnection(DriverManager.java:193)

at
org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.j
ava:717)

at org.dspace.core.Context.init(Context.java:105)

at
org.dspace.app.webui.util.UIUtil.obtainContext(UIUtil.java:112)

at org.apache.jsp.index_jsp._jspService(Unknown Source)

at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917)

at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:373)

at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)

at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917)

at
org.apache.catalina.core.ApplicationFilterChain.servletService(Applicati
onFilterChain.java:398)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:277)

at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:255)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:188)

at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:586)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
56)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:187)

at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:586)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
56)

at
com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.
java:160)

Caused by: java.util.NoSuchElementException: Could not create a
validated object, cause: ERROR:  SET AUTOCOMMIT TO OFF is no longer
supported

 

at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjec
tPool.java:871)

at
org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175)

... 22 more

2008-03-19 12:27:14,301 WARN
org.dspace.app.webui.servlet.InternalErrorServlet @
:session_id=39E9BCA2F8A39B6FDFDB9430142A80D2:internal_error:-- URL Was:
http://dilithium.larc.nasa.gov/dspace/jsp/index.jsp

-- Method: GET

-- Parameters were:

 

java.lang.NullPointerException

at org.apache.jsp.error.internal_jsp._jspService(Unknown
Source)

at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917)

at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:373)

at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)

at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917)

at
org.apache.catalina.core.ApplicationFilterChain.servletService(Applicati
onFilterChain.java:398)

at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:792)

at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:472)

at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:353)

at
org.dspace.app.webui.util.JSPManager.showJSP(JSPManager.java:91)

at
org.dspace.app.webui.util.JSPManager.showInternalError(JSPManager.java:1
06)

at org.apache.jsp.index_jsp._jspService(Unknown Source)

at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917)

at

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

2008-03-19 Thread Dorothea Salo
On Wed, Mar 19, 2008 at 9:38 AM, Mark Diggory [EMAIL PROTECTED] 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?

I don't know about libraries, but there are several articles out there:

http://www.dotnetjunkies.com/Article/9FB56D07-4052-458C-B247-37C9E4B6D719.dcik
http://www.xml.com/pub/a/2003/01/02/tr.html (Bob duCharme, no less!)
http://greggman.com/headlines/2005/2005-01-16-xslt-rss.htm

I could probably hack something up... the danger is that RSS can be
something of a shifting target, so it's hard to guarantee that XSLT
will work with every horrible feed from every insane blog or other
tool there is.

I love the idea of using an RSS feed as news, though! LOVE IT.
Doubleplusbrilliant.

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 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 error - cant delete a collection

2008-03-19 Thread Mika Stenberg
When trying to delete a collection in Manakin 1.1a (DSpace 1.4.2) I get the
following. Whats wrong? Deletion works fine in JSPUI.

-Mika


--
An error has occured

org.apache.xpath.XPathException: Can not convert #BOOLEAN to a NodeList!

Cocoon stacktrace [hide]
Failed to process pipeline
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/aspects.xmap
- 132:31map:serialize type=xml
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/aspects.xmap
- 131:49map:transform type=DSpaceResourceManager
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/aspects.xmap
- 130:55map:generate type=file
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/ArtifactBrowser/sitemap.xmap
- 323:31map:serialize type=xml
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/ArtifactBrowser/sitemap.xmap
- 107:38map:transform type=Navigation
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/ArtifactBrowser/sitemap.xmap
- 95:19 map:generate
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/EPerson/sitemap.xmap
- 320:31map:serialize type=xml
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/EPerson/sitemap.xmap
- 136:38map:transform type=Navigation
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/EPerson/sitemap.xmap
- 125:19map:generate
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/Submission/sitemap.xmap
- 369:38map:serialize type=xml
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/Submission/sitemap.xmap
- 145:45map:transform type=Navigation
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/Submission/sitemap.xmap
- 142:26map:generate
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/Administrative/sitemap.xmap
- 797:31map:serialize type=xml
context:/file:/tmp/Jetty_0_0_0_0_8048_dikk.war__dikk__-ajb4mj/cocoon-files/Jetty_0_0_0_0_8048_dspace.war__dspace__n8dysb/cocoon-files/Jetty_0_0_0_0_8048_neuroportti.war__neuroportti__-uqjxql/cocoon-files/Jetty_0_0_0_0_8048_neuroweb.war__neuroweb__-o4ci37/webapp/aspects/Administrative/sitemap.xmap
- 632:60map:transform type=DeleteCollectionConfirm

Re: [Dspace-tech] DSpace/PostgreSQL error

2008-03-19 Thread Christian Voelker
Hello,

Am 19.03.2008 um 17:35 schrieb Thornton, Susan M. (LARC-B702)[NCI  
INFORMATION SYSTEMS]:

 We are trying to bring up a new machine with Dspace 1.4.2 and  
 PostgreSQL 8.2 (Solaris 10).  It looks like DSpace is configured  
 correctly (the web page will come up, but it gets an Internal  
 Error).  We can query the database at the command line level, but  
 cannot get to the database in PGAdminIII.

I dont use Solaris and I dont know for sure whether Postgres JDBC
driver accesses the database via Unix socket connection or TCP
(port 5432 IIRC), but this is where I would start my search for
problems. If you can connect via psql, than you have the proper
account information. Connecting by PgAdmin seems to go a different
way, probably the same way the JDBC driver tries without success.
You should be able to determine that by consulting your pg_hba.conf
file. I guess connection to localhost:5432 should be allowed for
All All which means every user to every db, but it would be
sufficient if it were allowed for the account you are using
accessing the dspace db. Maybe, localhost does not resolve
properly and you have to use the qualified host name?

If this is the wrong place, I would check whether your firewall
refuses permission. If access fails because of rules defined in
the pg_hba.conf, then the connection attempts should be visible
in the postgres logs. If they are not, then access might be
blocked before postgres can see it at all. Third thing to
double check is the version of the JDBC driver version in use.
If this does not help, post back your findings to the list.

Hope this helps, bye, Christian

 Here is the error we are getting.  Does anyone have any ideas?
 Thanks,
 Sue

 p.s.  We also are not using Tomcat – we’re using Sun’s Webserver7.

 ERROR
 2008-03-19 12:27:01,215 INFO  org.dspace.core.ConfigurationManager @  
 DSpace logging installed using log4j.properties
 2008-03-19 12:27:13,780 WARN  org.dspace.jsp @  
 anonymous:no_context:database_error:org 
 .apache.commons.dbcp.SQLNestedException:Cannot get a connection,  
 pool exhausted
 org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,  
 pool exhausted
 at  
 org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:183)




-
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] DSpace/PostgreSQL error

2008-03-19 Thread Reuben Pasquini
FYI - the postgres JDBC driver connects to
the database via TCP/IP.
You can test that your client machine
can access the database over 
TCP/IP with psql:

% psql --host hostname --port port -U whatever 

Good luck!
Reuben

 Christian Voelker [EMAIL PROTECTED] 3/19/2008 3:33 PM 
Hello,

Am 19.03.2008 um 17:35 schrieb Thornton, Susan M. (LARC-B702)[NCI  
INFORMATION SYSTEMS]:

 We are trying to bring up a new machine with Dspace 1.4.2 and  
 PostgreSQL 8.2 (Solaris 10).  It looks like DSpace is configured  
 correctly (the web page will come up, but it gets an Internal  
 Error).  We can query the database at the command line level, but  
 cannot get to the database in PGAdminIII.

I dont use Solaris and I dont know for sure whether Postgres JDBC
driver accesses the database via Unix socket connection or TCP
(port 5432 IIRC), but this is where I would start my search for
problems. If you can connect via psql, than you have the proper
account information. Connecting by PgAdmin seems to go a different
way, probably the same way the JDBC driver tries without success.
You should be able to determine that by consulting your pg_hba.conf
file. I guess connection to localhost:5432 should be allowed for
All All which means every user to every db, but it would be
sufficient if it were allowed for the account you are using
accessing the dspace db. Maybe, localhost does not resolve
properly and you have to use the qualified host name?

If this is the wrong place, I would check whether your firewall
refuses permission. If access fails because of rules defined in
the pg_hba.conf, then the connection attempts should be visible
in the postgres logs. If they are not, then access might be
blocked before postgres can see it at all. Third thing to
double check is the version of the JDBC driver version in use.
If this does not help, post back your findings to the list.

Hope this helps, bye, Christian

 Here is the error we are getting.  Does anyone have any ideas?
 Thanks,
 Sue

 p.s.  We also are not using Tomcat – we’re using Sun’s
Webserver7.

 ERROR
 2008-03-19 12:27:01,215 INFO  org.dspace.core.ConfigurationManager @ 

 DSpace logging installed using log4j.properties
 2008-03-19 12:27:13,780 WARN  org.dspace.jsp @  
 anonymous:no_context:database_error:org 
 .apache.commons.dbcp.SQLNestedException:Cannot get a connection,  
 pool exhausted
 org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, 

 pool exhausted
 at  

org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:183)




-
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

-
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.

lt;div style=font-weight: boldgt;lt;pgt;Blah
blahlt;/pgt;lt;divgt;

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] news, javascript and Manakin

2008-03-19 Thread Mark Diggory
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.

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.

 lt;div style=font-weight: boldgt;lt;pgt;Blah
 blahlt;/pgt;lt;divgt;

 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] 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.
 
  lt;div style=font-weight: boldgt;lt;pgt;Blah
  blahlt;/pgt;lt;divgt;
 
  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 Mark Diggory

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. 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

And well designed, it would be caching as well...

-Mark

-
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 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