Re: XSLT with maps

2015-07-24 Thread Sreekant Sreedharan
Yes I am fairly new to XSLT. I used the velocity response writer for some prototypes. I found it very intuitive. But the requirement for the app specifically rules it out and mandates the XSLT approach. I have finally got it working. Thanks to all your help. Here's what I got (a minor correction on

Re: XSLT with maps

2015-07-23 Thread Upayavira
0 1 Note, if you find XSLT hard (which, unfortunately, is common), you might find the Velocity response writer an easier, more conventional way to do it. You will be generating XML, but you'll be treating it much more as just text output. Upayavira On Thu, Jul 23, 2015, at 01:32

Re: XSLT with maps

2015-07-23 Thread Sreekant Sreedharan
That worked for most of my attributes. I have only one issue to fix. How would I convert boolean values to integers? For example: ... false to Is that possible as well? On that note, what version of XSLT should I assume SOLR supports? XSLT 1.0 or 2.0? Also, is it fair t

Re: XSLT with maps

2015-07-23 Thread Upayavira
you are correct, I should have said: On Thu, Jul 23, 2015, at 10:15 AM, Sreekant Sreedharan wrote: > Well, if you had a result say: > ... > > 589587B2B1CA4C4683FC106967E7C326 > EE3YYK > 31034 > > ... > > applying the template: > > > > > > > would result in the following XML:

Re: XSLT with maps

2015-07-23 Thread Sreekant Sreedharan
Well, if you had a result say: ... 589587B2B1CA4C4683FC106967E7C326 EE3YYK 31034 ... applying the template: would result in the following XML: This is because 'id' is not an attribute of 'doc'. It is not even the attribute of doc/str. It is a value of doc/str/@name. But the

Re: XSLT with maps

2015-07-22 Thread Upayavira
That's really simple, as I said earlier, it could just require: Upayavira On Wed, Jul 22, 2015, at 11:59 AM, Sreekant Sreedharan wrote: > Well I guess I oversimplified things. My goal is to transform a SOLR > response > that looks like: > > > ... > > >589587B2B1CA4C4683FC106967E7C3

Re: XSLT with maps

2015-07-22 Thread Sreekant Sreedharan
Well I guess I oversimplified things. My goal is to transform a SOLR response that looks like: ... 589587B2B1CA4C4683FC106967E7C326 into something that looks like Where the SOLR field 'id' is mapped to an attribute 'NewID' in the expected result. Is there a simpler way

Re: XSLT with maps

2015-07-22 Thread Upayavira
Hi, Personally, in XSLT, I'd try to be less clever... ... Dunno if that helps. Upayavira On Wed, Jul 22, 2015, at 11:17 AM, Sreekant Sreedharan wrote: > Hi, >I am using the SOLR XSLT response writer. My challenge is to convert >some > fields in the schema from