Gary, if it is helpful, here is the code that displays the metadata fields
for a collection.

https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/themes/dri2xhtml/DIM-Handler.xsl#L794-L818

On Thu, Oct 20, 2016 at 6:04 PM, Gary Browne <gary.bro...@sydney.edu.au>
wrote:

> Also it may be that I'm not describing the issue correctly - I've attached
> a screen shot of the data that I want to manipulate. Basically I want to
> grab, say, the Short Description or Introductory Text, and place it where I
> like on the page. I can probably do this with CSS but would get messy
> pretty quickly. I thought there'd be a simple mechanism for this sort of
> thing with XMLUI.
>
> On Friday, October 21, 2016 at 9:40:26 AM UTC+11, Terry Brady wrote:
>>
>> Gary, on closer inspection, I see the issue you are encountering.
>>
>> Item mets.xml opens as XML: http://demo.dspace.org/xmlui//
>> metadata/handle/10673/3/mets.xml
>>
>> Collection mets.xml opens as HTML: http://demo.dspace.org/xmlui//
>> metadata/handle/10673/2/mets.xml
>>
>> This looks like a DSpace bug to me.  I wonder if someone else on the list
>> could suggest another approach.
>>
>> Terry
>>
>> On Thu, Oct 20, 2016 at 3:05 PM, Gary Browne <gary....@sydney.edu.au>
>> wrote:
>>
>>> Thanks Terry,
>>>
>>> I'm quite confused! I can get *all* the collection metadata with this:
>>>
>>> <xsl:variable name="collurl" select="//dri:referenceSet[@n=
>>> 'collection-viewer']//dri:reference[@type='DSpace Collection']/@url"/>
>>>
>>> But I can't work out how to get the individual pieces, like Introductory
>>> Text or Copyright Text (is this possible?).
>>>
>>> I don't know how to check if $collurl points to an XML object - any
>>> hints?
>>>
>>> Thanks a lot,
>>> Gary
>>>
>>> On Friday, October 21, 2016 at 3:03:25 AM UTC+11, Terry Brady wrote:
>>>>
>>>> Gary,
>>>>
>>>> Carefully check that the path set for $collurl points to an XML
>>>> object.  The sample code I gave you may require an additional root path.
>>>>
>>>> For code examples, you can look in the code base for examples where
>>>> "cocoon:" is found.  See https://github.com/DSpace/
>>>> DSpace/blob/master/dspace-xmlui/src/main/webapp/themes/Mirag
>>>> e/lib/xsl/core/page-structure.xsl#L468-L494
>>>>
>>>> This is old, but it might be helpful: http://www.slideshare
>>>> .net/tdonohue/making-dspace-xmlui-your-own
>>>>
>>>> The following wiki page has an overview of XMLUI, but it does not
>>>> explain how the "cocoon:" protocall works in xsl:document:
>>>> https://wiki.duraspace.org/display/DSDOC5x/XMLUI+Configurati
>>>> on+and+Customization.
>>>>
>>>> Terry
>>>>
>>>> On Wed, Oct 19, 2016 at 11:25 PM, Gary Browne <gary....@sydney.edu.au>
>>>> wrote:
>>>>
>>>>> Hi Terry,
>>>>>
>>>>> I'm getting some way to something here...but not quite. I can pull out
>>>>> the collection metadata as one big lump of text without any formatting (is
>>>>> there a way to retain any HTML tags in the metadata?).
>>>>>
>>>>> However,
>>>>>
>>>>> document(concat('cocoon:', $collurl))"/>
>>>>>
>>>>> doesn't give me anything.
>>>>>
>>>>> How did you work all this out? Is there some documentation I can
>>>>> follow somewhere, because I can't seem to find anything like this on the
>>>>> dspace wiki?
>>>>>
>>>>> Thanks again,
>>>>> Gary
>>>>>
>>>>>
>>>>> On Thursday, October 20, 2016 at 11:48:31 AM UTC+11, Gary Browne wrote:
>>>>>>
>>>>>> Hi Terry,
>>>>>>
>>>>>> Sorry I was unclear there - yes, you were correct in assuming I want
>>>>>> to access in XSLT theme code.
>>>>>>
>>>>>> Thanks for your pointers, I'll let you know how I get on with it.
>>>>>>
>>>>>> Cheers,
>>>>>> Gary
>>>>>>
>>>>>>
>>>>>> On Thursday, October 20, 2016 at 4:35:35 AM UTC+11, Terry Brady wrote:
>>>>>>>
>>>>>>> How do you want to access the metadata?  Through SQL or in some XSLT
>>>>>>> theme code?
>>>>>>>
>>>>>>> Assuming, want to do this in XMLUI theme code, here is the process.
>>>>>>>
>>>>>>>    - Item: http://demo.dspace.org/xmlui///handle/10673/3
>>>>>>>    - Look at the XML for this document: http://demo.dspace.o
>>>>>>>    rg/xmlui/handle/10673/3?XML
>>>>>>>    - The url to the collection metadata is here
>>>>>>>       - <xsl:variable name="collurl" select="//dri:referenceSet[@n=
>>>>>>>       'collection-viewer']//dri:reference[@type='DSpace
>>>>>>>       Collection']/@url"/>
>>>>>>>    - If you view source on the following URL, you will see the
>>>>>>>    metadata: http://demo.dspace.org/xmlui//metadata/handle/1067
>>>>>>>    3/2/mets.xml
>>>>>>>    - You can use the cocoon protocol to retrieve the metadata for
>>>>>>>    the collection
>>>>>>>       - <xsl:variable name="collmeta" select="document(concat('cocoon:',
>>>>>>>       $collurl))"/>
>>>>>>>
>>>>>>> There may be a bug in the code above, but this is the general
>>>>>>> approach to follow.
>>>>>>>
>>>>>>> Terry
>>>>>>>
>>>>>>> On Tue, Oct 18, 2016 at 5:07 PM, Gary Browne <gary....@sydney.edu.au
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> DSpace 5.5
>>>>>>>> XMLUI
>>>>>>>> Tomcat 7
>>>>>>>> Apache 2.2
>>>>>>>> PostGreSQL 9.2
>>>>>>>>
>>>>>>>> How can I access the collection metadata to use it in a template?
>>>>>>>> For example, if I want to display the collection introductory text or
>>>>>>>> copyright text elsewhere?
>>>>>>>>
>>>>>>>> Thanks a lot,
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "DSpace Technical Support" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to dspace-tech...@googlegroups.com.
>>>>>>>> To post to this group, send email to dspac...@googlegroups.com.
>>>>>>>> Visit this group at https://groups.google.com/group/dspace-tech.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Terry Brady
>>>>>>> Applications Programmer Analyst
>>>>>>> Georgetown University Library Information Technology
>>>>>>> http://georgetown-university-libraries.github.io/
>>>>>>> <https://www.library.georgetown.edu/lit/code>
>>>>>>> 425-298-5498 (Seattle, WA)
>>>>>>>
>>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "DSpace Technical Support" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to dspace-tech...@googlegroups.com.
>>>>> To post to this group, send email to dspac...@googlegroups.com.
>>>>> Visit this group at https://groups.google.com/group/dspace-tech.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Terry Brady
>>>> Applications Programmer Analyst
>>>> Georgetown University Library Information Technology
>>>> http://georgetown-university-libraries.github.io/
>>>> <https://www.library.georgetown.edu/lit/code>
>>>> 425-298-5498 (Seattle, WA)
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "DSpace Technical Support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to dspace-tech...@googlegroups.com.
>>> To post to this group, send email to dspac...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/dspace-tech.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Terry Brady
>> Applications Programmer Analyst
>> Georgetown University Library Information Technology
>> http://georgetown-university-libraries.github.io/
>> <https://www.library.georgetown.edu/lit/code>
>> 425-298-5498 (Seattle, WA)
>>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
http://georgetown-university-libraries.github.io/
<https://www.library.georgetown.edu/lit/code>
425-298-5498 (Seattle, WA)

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to