Resending for reference.  NESCent = Organization,  Dryad = Their Repository
Project

On Fri, May 20, 2011 at 4:11 PM, Mark Diggory <mdigg...@atmire.com> wrote:

> Our solution in Dryad (kudos to Kevin Clark) is embedded in the theme
> template....
>
>
> https://dryad.googlecode.com/svn/trunk/dryad/dspace/modules/xmlui/src/main/webapp/themes/Dryad/Dryad.xsl
> <https://dryad.googlecode.com/svn/trunk/dryad/dspace/modules/xmlui/src/main/webapp/themes/Dryad/Dryad.xsl>
> and supports writing your added pages in xhtml.
>
>
> https://dryad.googlecode.com/svn/trunk/dryad/dspace/modules/xmlui/src/main/webapp/themes/Dryad/pages/
>
>
> Relevant sections.... override both body and head sections of generated
> html... not sure if this works with fixes to 404 status codes... if so, a
> transformer could be added to test for the present of the file and insert
> its location into the pageMeta and a small amount of dri into the pipeline
> to elimminate the 404 condition in the DRI pipeline...  probibly be a better
> way to detect where to get the xhtml file from anyhow.
>
>
>       <!-- Overwriting the default DSpace dri:body template to check for 
> pages -->
>       <xsl:template match="dri:body">
>               <div id="ds-body">
>                       <xsl:if 
> test="$meta[@element='alert'][@qualifier='message']">
>                               <div id="ds-system-wide-alert">
>                                       <p>
>                                               <xsl:copy-of 
> select="$meta[@element='alert'][@qualifier='message']/node()"/>
>                                       </p>
>                               </div>
>                       </xsl:if>
>                       <xsl:choose>
>                               <xsl:when test="$doc">
>                                       <xsl:copy-of 
> select="$doc//div[@id='ds-body']/*"/>
>
>
>
> .....
>
>
>
> <title>
>                               <xsl:choose>
>                                       <xsl:when test="$doc">
>                                               <xsl:value-of 
> select="$doc/html/head/title"/>
>                                       </xsl:when>
>                                       <xsl:when test="$file_page_title">
>                                               
> <i18n:text>xmlui.dryad.page_title</i18n:text>
>                                               <xsl:value-of 
> select="//*[@id='org.datadryad.dspace.xmlui.aspect.browse.ItemViewer.div.item-view']/dri:head"/>
>                                       </xsl:when>
>                                       <xsl:when test="$pkg_page_title">
>                                               <xsl:copy-of 
> select="$pkg_page_title/node()"/>
>                                       </xsl:when>
>                                       <xsl:otherwise>
>                                               <xsl:text> </xsl:text>
>                                       </xsl:otherwise>
>                               </xsl:choose>
>                       </title>
>
> Mark
>
> On Fri, May 20, 2011 at 3:03 PM, Peter Dietz <pdiet...@gmail.com> wrote:
>
>> Hi André,
>>
>> I'm guessing that your XSLT is good, you're able to modify a page, and get
>> your changes to happen. However, if you are adding a new page that doesn't
>> exist, you'll get a problem with the sitemap not having a match for the new
>> page you created. The sitemaps (there are browseArtifacts, viewArtifacts,
>> searchArtifacts) match paths such as community-list or handle/**, but not
>> about/ so you'll end up with the error of Page Not Found, which is when it
>> doesn't match anything.
>>
>> The way I fix that for custom pages that we add, is to add an AboutUs.Java
>> file to generate some basic DRI, and configure the sitemap to use that Java
>> file for our about page.
>>
>> If you build your xsl to create a static page, that partially works, but
>> you also have to modify the 
>> sitemap<https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/dspace-xmlui-api/src/main/resources/aspects/BrowseArtifacts/sitemap.xmap#L82>
>>  to
>> add a rule to match the content you added. If there is no rule for the page
>> in the sitemap, then Page Not Found is the exception.
>>
>> See this gist for a sample of how to do this:
>> https://gist.github.com/842301
>>
>>
>>
>> Peter Dietz
>>
>>
>>
>>
>> On Fri, May 20, 2011 at 10:33 AM, Pottinger, Hardy J. <
>> pottinge...@umsystem.edu> wrote:
>>
>>> Hi, here are the missing links:
>>>
>>> DRI Schema Reference:
>>> https://wiki.duraspace.org/display/DSDOC/DRI+Schema+Reference
>>>
>>> Debugging XMLUI hints:
>>>
>>> https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial#Manakinthe
>>> metutorial-Debuggingatvariousstagesofthethemeapplicationpipeline<https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial#Manakinthemetutorial-Debuggingatvariousstagesofthethemeapplicationpipeline>(includes
>>> info on how to see the DRI behind any page) and I was right, it is
>>> super-simple, do it by... I'm copying from the page linked above):
>>>
>>> 1. prepending DRI/ to the beginning of the page url but after the context
>>> path, i.e. http://<manakin-url>/DRI/search
>>> 2. appending the XML parameter to the end of the URL, i.e.
>>> http://<manakin-url>/search?XML or
>>> http://<manakin-url>/search?query=texas&page=2&XML
>>>
>>> As long as I'm pasting links for XMLUI theme development, here are a few
>>> more I've collected:
>>>
>>>
>>> XML How to Guides:
>>> https://wiki.duraspace.org/display/DSPACE/XMLUI+How+To+Guides
>>> Slideshow: Making Dspace XMLUI Your Own:
>>> http://www.slideshare.net/tdonohue/making-dspace-xmlui-your-own
>>> Dryad repository's wiki of working notes on the XMLUI:
>>> http://code.google.com/p/dryad/wiki/ManakinReference
>>> How to create a new aspect for XMLUI:
>>> https://wiki.duraspace.org/display/DSPACE/Create+a+new+aspect+(Manakin)--
>>> a fantastic introduction to how DSpace approaches Cocoon development.
>>> JavaDocs for the XMLUI:
>>>
>>> http://projects.dspace.org/dspace-xmlui/dspace-xmlui-api/apidocs/index.html
>>>  -- especially look at the direct known subclasses of
>>> AbstractDSpaceTransformer
>>>
>>> Cocoon documentation, starting with an overview:
>>> http://cocoon.apache.org/2.1/userdocs/concepts/
>>>
>>>
>>> There are also a couple of useful PDFs floating around on the net, google
>>> for "ManakinDevelopersGuide.pdf" and "tdl-manakin-training.pdf", or
>>> perhaps the original authors can reply with cannonical links to either
>>> PDF.
>>>
>>> Anyone else have helpful info on XMLUI development, send it my way.
>>> Thanks!
>>>
>>> --
>>> HARDY POTTINGER <pottinge...@umsystem.edu>
>>> University of Missouri Library Systems
>>> http://lso.umsystem.edu/~pottingerhj/
>>> "No matter how far down the wrong road you've gone,
>>> turn back." --Turkish proverb
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 5/20/11 7:27 AM, "Pottinger, Hardy J." <pottinge...@umsystem.edu>
>>> wrote:
>>>
>>> >Hi, André, I'm sorry I'm not at my main computer, so I can't paste
>>> >example code or provide links, but the secret to success is going to be
>>> >encoding your markup in DRI. The title and breadcrumbs links can be put
>>> >in that way. To see an example, just look at the DRI behind any page (I
>>> >always forget how, but it involves adding something to the page's URL in
>>> >you browser, look it up in the wiki). There is also an excellent
>>> >reference on the entire DRI spec on the wiki. If you can, change your
>>> >whole markup over from straight HTML to DRI, add the markup for the
>>> title
>>> >and breadcrumbs, and see if that fixes things for you.
>>> >
>>> >--Hardy
>>> >
>>> >Sent from my iPad
>>> >
>>> >On May 20, 2011, at 7:12 AM, "André"
>>> ><andre.ass...@usp.br<mailto:andre.ass...@usp.br>> wrote:
>>> >
>>> >Dear all,
>>> >
>>> >We're trying to create some info pages to our XMLUI 1.7.0 repository
>>> >using the Mirage theme.
>>> >The problem probably resides in my poor knowledge of XSLT.
>>> >
>>> >1) We've sucessfully added links to the side menu, by adding a link
>>> >inside the <xsl:template match="dri:options">  eg:
>>> ><div id="ds-search-option" class="ds-option-set">
>>> ><a>
>>> ><xsl:attribute name="href">
>>> ><xsl:value-of select="/dri:document/dri:
>>>
>>> >meta/dri:pageMeta/dri:metadata[@element='contextPath'][not(@qualifier)]"/>
>>> ><xsl:text>/about</xsl:text>
>>> ></xsl:attribute>
>>> ><i18n:text>xmlui.dri2xhtml.structural.informacoes.sobre</i18n:text>
>>> ></a><br/>
>>> >[etc...]
>>> >
>>> >
>>> >2) We editted the Mirage.xsl overriding the <xsl:template
>>> >match="dri:body"> with conditionals for handling the call for the info
>>> >pages  eg:
>>> ><xsl:template match="dri:body">
>>> ><div id="ds-body">
>>> ><xsl:choose>
>>> ><xsl:when
>>>
>>> >test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request']
>>> >[@qualifier='URI']='about'">
>>> ><div>
>>> ><h1>ABOUT PAGE - THIS IS A SIMPLE TEST</h1>
>>> ><p>Lorem Ipsum dolor sit amet</p>
>>> ></div>
>>> ></xsl:when>
>>> ><xsl:otherwise>
>>> ><xsl:apply-templates />
>>> ></xsl:otherwise>
>>> >[etc...]
>>> >
>>> >
>>> >Question 1) Everything is ok, except for the page title. When we click
>>> >the "Communities and collections" link, the title of the browser
>>> >correctly shows "Communities", but with our page we get a "Page not
>>> >found" title, despite the fact that the contents are shown correctly.
>>> >Even when we include a html page instead of hardcoding it in the xsl
>>> (eg.
>>> >see code below), the contents are showing correctly but the <title> of
>>> >the html appears not to be interpreted.
>>> >
>>> ><xsl:when
>>>
>>> >test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request']
>>> >[@qualifier='URI']='about'">
>>> ><p><xsl:copy-of select="document('./Reference/lib/about.html')" /></p>
>>> ></xsl:when>
>>> >
>>> >
>>> >Question 2) The breadcrumbs also don't appear when accessing those info
>>> >pages we've created.
>>> >
>>> >
>>> >Any help will be very much appreciated.
>>> >
>>> >Thank you
>>> >Andre Assada
>>>
>>> >--------------------------------------------------------------------------
>>> >----
>>> >What Every C/C++ and Fortran developer Should Know!
>>> >Read this article and learn how Intel has extended the reach of its
>>> >next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> >developers boost performance applications - including clusters.
>>> >http://p.sf.net/sfu/intel-dev2devmay
>>> >_______________________________________________
>>> >DSpace-tech mailing list
>>> >DSpace-tech@lists.sourceforge.net<mailto:
>>> DSpace-tech@lists.sourceforge.net
>>> >>
>>> >https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>>
>>> >--------------------------------------------------------------------------
>>> >----
>>> >What Every C/C++ and Fortran developer Should Know!
>>> >Read this article and learn how Intel has extended the reach of its
>>> >next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> >developers boost performance applications - including clusters.
>>> >http://p.sf.net/sfu/intel-dev2devmay
>>> >_______________________________________________
>>> >DSpace-tech mailing list
>>> >DSpace-tech@lists.sourceforge.net
>>> >https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> What Every C/C++ and Fortran developer Should Know!
>>> Read this article and learn how Intel has extended the reach of its
>>> next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>> developers boost performance applications - including clusters.
>>> http://p.sf.net/sfu/intel-dev2devmay
>>> _______________________________________________
>>> DSpace-tech mailing list
>>> DSpace-tech@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> What Every C/C++ and Fortran developer Should Know!
>> Read this article and learn how Intel has extended the reach of its
>> next-generation tools to help Windows* and Linux* C/C++ and Fortran
>> developers boost performance applications - including clusters.
>> http://p.sf.net/sfu/intel-dev2devmay
>> _______________________________________________
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>
>>
>
>
> --
> Mark R. Diggory
> @mire - www.atmire.com
> 2888 Loker Avenue East - Suite 305 - Carlsbad - CA - 92010
> Technologielaan 9 - 3001 Heverlee - Belgium
>



-- 
Mark R. Diggory
@mire - www.atmire.com
2888 Loker Avenue East - Suite 305 - Carlsbad - CA - 92010
Esperantolaan 4 - Heverlee 3001 - Belgium
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to