Just to follow up on using 'getDatastreamText' method, I think
unfortunately it does what it says on the tin ie. just gets the
Datastream text.  So being able to Parse/transform like I originally
intended probably isn't possible.  


Just to confirm this, I've executed the Update in DEBUG mode, and the
fedoragsearch.log has the following:-

DEBUG 2010-01-13 14:41:07,748 (GTransformer)
xsltName=config/index/DemoOnSolr/foxmlToSolr
INFO 2010-01-13 14:41:07,913 (GenericOperationsImpl) getDatastreamText
pid=hull:756 repositoryName=DemoAtDtu dsId=descMetadata
fedoraSoap=http://localhost:8080/fedora/services fedoraUser=fedoraUser
fedoraPass=fedoraPass trustStorePath=TRUSTSTOREPATH
trustStorePass=TRUSTSTOREPASS
DEBUG 2010-01-13 14:41:08,056 (GTransformer) xsltName=config/textFromXml
DEBUG 2010-01-13 14:41:08,063 (GenericOperationsImpl) getDatastreamText
pid=hull:756 dsId=descMetadata mimetype=text/xml dsBuffer=


  

    An investigation of the factors....

  

  

    Lamb, Simon

    

      creator

    

  

  

    Lamb, Simon

    

      Thesis advisor

    

  

  

    Duck, Donald

    

      Thesis advisor

...
..
.

Etc.. 

Is there any other method to parse and transform XML in a 'auth
protected' managed datastream using FedoraGSearch?      

Thanks again,
Simon

   

-----Original Message-----
From: Simon W Lamb [mailto:[email protected]] 
Sent: 13 January 2010 09:02
To: [email protected]; [email protected]
Subject: Re: [Fedora-commons-users]
fedoragsearch:example-of-xml-not-inlineAuthentication

I did wonder about using that method,  I just wasn't sure if the text
would be parsed as XML (to allow Xpath transformations etc..).  I'll
give it a try and let you all know.  

Thanks,
Simon 

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: 12 January 2010 16:49
To: [email protected]
Subject: Re: [Fedora-commons-users] fedoragsearch:
example-of-xml-not-inlineAuthentication

Why not try the excellent machinery provided in

xmlns:exts="xalan://dk.defxws.fedoragsearch.server.GenericOperationsImpl
"

?

E.g.

exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP,
$FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)

---
A. Soroka
Digital Research and Scholarship R & D
the University of Virginia Library



On Jan 11, 2010, at 10:55 AM, Simon W Lamb wrote:

> Hi there,
>  
> I am running into a problem when trying to index XML in Managed
Datastreams.  I am using the example in the demoFoxmlTOLucene.xslt,
which describes the following method for accessing non-inline XML:-
>  
> <xsl:template name="example-of-xml-not-inline">
>                                     <IndexField IFname="uva.access"
index="ANALYZED" store="YES" termVector="NO">
>                                                 <xsl:value-of
select="document(concat('http://localhost:8080/fedora/get/', $PID,
'/RIGHTS1'))/uvalibadmin:admin/uvalibadmin:adminrights/uvalibadmin:polic
y/uvalibadmin:access"/>
>                                     </IndexField>
>             </xsl:template>
>  
>  
> In my configuration of fedoragsearch, I'm indexing to a Solr backend,
rather than just the native Lucene index.  An example of my XSL from
foxmlToSolr.xslt is :-
>  
> <!-- rightsMetadata datastream template --> 
>             <xsl:template name="rightsMetadata">
>                         <xsl:variable name="rightsMetadata"
select="document(concat('http://localhost:8080/fedora/get/', $PID,
'/rightsMetadata'))/rightsMetadata"/>
>                        
>                         <xsl:if test="rightsMetadata/copyright/human">
>                                     <xsl:for-each
select="rightsMetadata/copyright/human">
>                                                 <field>
>
<xsl:attribute name="name">rights_display</xsl:attribute>
>
<xsl:value-of select="text()"/>
>                                                 </field>
>                                     </xsl:for-each>
>                         </xsl:if>
>  
> When I try to index the Repository, I am getting the following errors
for each of the managed datastreams:-
>  
> SystemId Unknown; Line #123; Column #134; Can not load requested doc:
Server returned HTTP response code: 401 for URL:
http://localhost:8080/fedora/get/hull:756/descMetadata
> SystemId Unknown; Line #276; Column #146; Can not load requested doc:
Server returned HTTP response code: 401 for URL:
http://localhost:8080/fedora/get/hull:756/contentMetadata
> SystemId Unknown; Line #292; Column #143; Can not load requested doc:
Server returned HTTP response code: 401 for URL:
http://localhost:8080/fedora/get/hull:756/rightsMetadata
>  
> It appears that Fedora user credentials are not being passed by the
XSLT Transformation engine,  however I can't work out if this a
configuration or coding problem.  I have checked my
fedoragsearch.properties which has the credentials for the SOAP side of
things,  repository.properties also has the correct username/password
credentials. 
>  
> I even tried editing the XSL by putting the credentials inline on the
URL in the following form: -
>  
>
http://fedorauser:fedorap...@localhost:8080/fedora/get/hull:756/descMeta
data
>  
> This also resulted in a 401 HTTP code.   I also checked using wget to
make sure something silly wasn't happening at the server level, the
datastreams were downloaded correctly.   
>  
> I'm curious whether other people successfully used this method to
access Managed Datastreams with API-A/API-M authentication switched on?
If so, where am I going wrong? FedoraGSearch is working perfectly apart
from this issue. 
>  
> Many thanks,
> Simon Lamb
> Software Developer
> Academic Services || IT Systems || The University of Hull T. +44 (0) 
> 1482 462076 [email protected]|| www.hull.ac.uk/acs Customer Support. 
> +44 (0) 1482 462010 || [email protected]  ||
www.hull.ac.uk/help
>  
>
************************************************************************
*****************
> To view the terms under which this email is distributed, please go
tohttp://www.hull.ac.uk/legal/email_disclaimer.html
>
************************************************************************
*****************-------------------------------------------------------
-----------------------
> This SF.Net email is sponsored by the Verizon Developer Community Take

> advantage of Verizon's best-in-class app development support A 
> streamlined, 14 day to market process makes app distribution fast
and easy
> Join now and get one step closer to millions of Verizon customers 
> http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users


------------------------------------------------------------------------
------
This SF.Net email is sponsored by the Verizon Developer Community Take
advantage of Verizon's best-in-class app development support A
streamlined, 14 day to market process makes app distribution fast and
easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
*****************************************************************************************
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*****************************************************************************************
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to