xpath processing

2010-10-20 Thread pghorpade


I am trying to import mods xml data in solr using  the xml/http datasource

This does not work with XPathEntityProcessor of the data import handler
xpath="/mods/name/namepa...@type = 'date']"

I actually have 143 records with type attribute as 'date' for element  
namePart.


Thank you
Parinita


Re: xpath processing

2010-10-22 Thread pghorpade

Quoting pghorp...@ucla.edu:
Can someone help me please?


I am trying to import mods xml data in solr using  the xml/http datasource

This does not work with XPathEntityProcessor of the data import handler
xpath="/mods/name/namepa...@type = 'date']"

I actually have 143 records with type attribute as 'date' for  
element namePart.


Thank you
Parinita






Re: xpath processing

2010-10-22 Thread pghorpade






processor="FileListEntityProcessor" fileName=".*xml" recursive="true"  
baseDir="C:\data\sample_records\mods\starr">
processor="XPathEntityProcessor" url="${f.fileAbsolutePath}"  
stream="false" forEach="/mods"  
transformer="DateFormatTransformer,RegexTransformer,TemplateTransformer">
















Quoting Ken Stanley :


Parinita,

In its simplest form, what does your entity definition for DIH look like;
also, what does one record from your xml look like? We need more information
before we can really be of any help. :)

- Ken

It looked like something resembling white marble, which was
probably what it was: something resembling white marble.
-- Douglas Adams, "The Hitchhikers Guide to the Galaxy"


On Fri, Oct 22, 2010 at 8:00 PM,  wrote:


Quoting pghorp...@ucla.edu:
Can someone help me please?



I am trying to import mods xml data in solr using  the xml/http datasource

This does not work with XPathEntityProcessor of the data import handler
xpath="/mods/name/namepa...@type = 'date']"

I actually have 143 records with type attribute as 'date' for element
namePart.

Thank you
Parinita












Re: xpath processing

2010-11-02 Thread pghorpade



http://www.loc.gov/mods/v3";  
xmlns:xlink="http://www.w3.org/1999/xlink";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xsi:schemaLocation="http://www.loc.gov/mods/v3 
http://www.loc.gov/standards/mods/v3/mods-3-0.xsd";>


Any place I hang my hat is home


St. Louis woman
Any place I hang my hat is home


Free an' easy that's my style


Arlen, Harold
1905-1986

type="text">creator




Mercer, Johnny
1909-


Davison, R.


Bontemps, Arna Wendell
1902-1973


Cullen, Countee
1903-1946

notated music


type="code">nyu



New York

De Sylva, Brown & Henderson, Inc.
c1946
1946
monographic
1946
1946


type="code">eng



print
1 vocal score (5 p.) : ill. ; 31 cm.

music by Harold  
Arlen ; lyrics by Johnny Mercer.

For voice and piano.
Includes chord symbols.
Illustration by R. Davison.
First line: Free an' easy that's my style.
"Edward Gross presents St. Louis Woman ... Book by  
Arna Bontemps & Countee Cullen" -- Cover.

Publisher's advertising includes musical incipits.

Motion picture music
Excerpts
Vocal scores with piano

M1 .S8
1403-4 De Sylva, Brown  
Henderson, Inc.


Lilly Library, Indiana University  
Bloomington



authority="marcorg">IUL
encoding="marc">990316

LL-SSM-ALC4888



Above is my sample xml




processor="FileListEntityProcessor" fileName=".*xml" recursive="true"  
baseDir="C:\test_xml">
processor="XPathEntityProcessor" url="${f.fileAbsolutePath}"  
stream="false" forEach="/mods"  
transformer="DateFormatTransformer,RegexTransformer,TemplateTransformer">
















above is the data config file
The namePart element in the above xml may or may not have type attribute.
How can i get data from the namePart element which has no type attribute?
xpath="/mods/name/namepa...@type != 'date']" This is not working. I  
dont get any errors ,There is no namePart_keyword in the index.



Quoting Ken Stanley :


On Fri, Oct 22, 2010 at 11:52 PM,  wrote:


























The documentation says you don't need a dataSource for your
XPathEntityProcessor entity; in my configuration, I have mine set to the
name of the top-level FileListEntityProcessor. Everything else looks fine.
Can you provide one record from your data? Also, are you getting any errors
in your log?

- Ken