xml formatting results.

Post Reply
jgdoke
Posts: 167
Joined: Wed Jul 14, 2004 10:52 am

xml formatting results.

Post by jgdoke »

I have the xml results mostly formatted but need help determining if there is a way to have the search term highlighted in the result. The search term is hightlighted in the "Concise" result style.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

xml formatting results.

Post by mark »

The xml has the search term hilighted. What version of scripts? Do you see it hilighted using the default sample xml?
jgdoke
Posts: 167
Joined: Wed Jul 14, 2004 10:52 am

xml formatting results.

Post by jgdoke »

5.4.4 script version. I changed a test crawl to XSL stylesheet and saved it with apply settings. and then checked both live and test.
Since we updated the scripts on Friday I get this error using the default sample.

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
---------------------------------------------------

The value of the 'version' attribute may not be '5.4.4'.

If I take the default and change the top line from:
<xsl:stylesheet version="5.4.4" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
TO:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Then it works. and yes the highlighting works. I will have to go through my changes to see what I did to screw it up...
Thanks
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

xml formatting results.

Post by mark »

It would appear that IE doesn't like the 5.4.4 version in the stylesheet sometimes. The next release will fix that. For now edit the style sheet to change that as you have done.
jgdoke
Posts: 167
Joined: Wed Jul 14, 2004 10:52 am

xml formatting results.

Post by jgdoke »

Mark, One problem left. the default XML style sheet does not bold the "urldisplay" The XML is correct and shows <b> and </b> surrounding the word "logix" which is my search term. All other occurrences of "logix" are properly bolded.

<Result>
<Profile>www.ab.com</Profile>
<Num>5</Num>
<Id>42046b08a5</Id>
<ResultTitle>Take Control with <B>Logix</B>!</ResultTitle>
<Url>http://www.ab.com/logix/</Url>
<UrlDisplay>http://www.ab.com/<B>logix</B>/</UrlDisplay>
<RawRank>959</RawRank>
<ScaledRank>959</ScaledRank>
<PercentRank>95</PercentRank>
<DocSize>22K</DocSize>
<Depth>1</Depth>
<UrlSimilar>/texis/search?query=logix&pr=www.ab.com&prox=page&rorder=500&rprox=500&rdfreq=0&rwfreq=0&rlead=750&sufs=2&order=r&mode=&opts=&cq=&cmd=mlt&id=42046b08a5</UrlSimilar>
<UrlInfo>/texis/search?query=logix&pr=www.ab.com&prox=page&rorder=500&rprox=500&rdfreq=0&rwfreq=0&rlead=750&sufs=2&order=r&mode=&opts=&cq=&cmd=context&id=42046b08a5#hit1</UrlInfo>
<UrlParents>/texis/search?query=logix&pr=www.ab.com&prox=page&rorder=500&rprox=500&rdfreq=0&rwfreq=0&rlead=750&sufs=2&order=r&mode=&opts=&cq=&cmd=links&id=42046b08a5</UrlParents>
<Modified>2005-02-05 00:43:20</Modified>
<Abstract> <B>Logix</B> Platforms Take Control with <B>Logix</B> Platforms! As part of Rockwell Automation's Integrated Architecture, <B>Logix</B> platforms provide a single control architecture</Abstract>
<Charset>UTF-8</Charset>
</Result>
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

xml formatting results.

Post by mark »

Where the XSL says
<xsl:value-of select="UrlDisplay"/>
It needs to be "copy-of" instead of "value-of".
jgdoke
Posts: 167
Joined: Wed Jul 14, 2004 10:52 am

xml formatting results.

Post by jgdoke »

That did it! thanks

John
Post Reply