Additional Fields XML namespace changed

dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

Additional Fields XML namespace changed

Post by dietric »

Do the changes in the 6.3.2 version of the scripts (Additional Fields XML namespace) require updating custom XSLT?
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Additional Fields XML namespace changed

Post by jason112 »

All functionality from the stock XSL (like Result, Title, Url, etc) remains unchanged, so if you've just made cosmetic changes then you don't need to update.

If you've added XSL to access any Additional Fields that you've defined in your profile, then there are two small changes that will be necessary.

* the Additional Fields namespace needs to be declared at the top of your XSL file if it's not already, like this:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:u="http://www.thunderstone.com/ws/ThunderstoneSearch/1.0/">

* any place where you reference your additional field, you need to use the prefix from the previous declaration (in this case, 'u').

so this
<xsl:value-of select="myField"/>
becomes this
<xsl:value-of select="u:myField"/>
dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

Additional Fields XML namespace changed

Post by dietric »

Were there any changes in the format that is acepted for date type fields? I'm getting some errors during the walk now that I had not seen before:

015 /usr/local/morph3/texis/scripts/dowalk(storepage) 4399: garbled time: 15 Nov 2006 05:00:00 GMT in the function expect while processing url http://www.modernmedicine.com/modernmed ... ail/497285

100 /usr/local/morph3/texis/scripts/dowalk(storepage) 4399: Date Wed, 15 Nov 2006 05:00:00 GMT Wed, 15 Nov 2006 05:00:00 GMT is invalid while processing url http://www.modernmedicine.com/modernmed ... ail/497285

015 /usr/local/morph3/texis/scripts/dowalk(storepage) 4399: garbled time: 09 Sep 2008 18:29:06 GMT in the function expect while processing url http://www.modernmedicine.com/modernmed ... ail/544367
dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

Additional Fields XML namespace changed

Post by dietric »

Do you have an example how this can actually work using XSLT transformation?
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Additional Fields XML namespace changed

Post by mark »

For the date, it looks like you're getting the date multiple times from the same document. Are you getting it using data from field? Can you make the search more specific so it only gets one copy?

For the example, I don't know what you want an example of. Jason gave examples of what he was suggesting.
dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

Additional Fields XML namespace changed

Post by dietric »

I don't think I'm getting the date multiple times, I'm copying it over once using the Additional field Settings in the Walk settings.
As for the example provided by Jason, that does not work when applied to the customized default XSLT you provide. Do you want me to open a ticket for that?


Thanks
-ds
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Additional Fields XML namespace changed

Post by jason112 »

It is getting the date multiple times, although it seems to be the appliance's fault. I was able to get the same error you did, and when I created a parametric field of type "text" instead of "date", it was set to this:

mydate: Wed, 15 Nov 2006 05:00:00 GMT Wed, 15 Nov 2006 05:00:00 GMT

The HTML page doesn't seem to be setting last-modified twice, I'll look in to why this is happenning.


As for the XSL stuff, do you have additional fields that are filled in properly and outputted? When you tried my example, did you change the name of the variable to the appropriate user field?
dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

Additional Fields XML namespace changed

Post by dietric »

Yes, I do have proper additional fields:

<Result>
....
<Abstract>Clinic; and associate professor of surgery at the Cleveland Clinic Lerner College of <B>Medicine</B> at Case Western Reserve University, Cleveland, Ohio. He has nothing to disclose in</Abstract>
<Charset>UTF-8</Charset>
<u:last_modified>Invalid</u:last_modified>
<u:emsContentType>ArticleStandard</u:emsContentType>
<u:byline><span class="article-source">Source: <b><i>Contemporary Pediatrics</i></b></span>,

<span class="article-date">10/1/2006</span><br /></u:byline>
</Result>

I can point you to a test profile I set up on one of our appliances if that helps. I can use the custom namespace using a XSLT built from scratch (which I'd like to avoid), but it does not work with the modified default XSLT if I use it like this:

<span class="excerpt"><xsl:copy-of select="Abstract"/> ...</span><br />
<xsl:value-of select="u:byline" disable-output-escaping="yes"/>
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Additional Fields XML namespace changed

Post by jason112 »

When using the modified default XSLT, did you add a declaration for the u: prefix?
dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

Additional Fields XML namespace changed

Post by dietric »

Yes.
Post Reply