XSLTsearch does NOT found scandinavian characters Options
Råtta
Posted: Thursday, August 07, 2008 2:49:34 PM
Rank: Newbie

Joined: 4/11/2008
Posts: 15
Location: finland
As the topic says, search on my page does not found words that contains öäå.

I've checked from the db that 'cmsContentXml' -table contains those letters nomally. At least i think so.

I think the problem is in the XSLTsearch that converts somewhere those letters maybe ä and ö chars.. Maybe?

work around with my company webpages
drobar
Posted: Thursday, August 07, 2008 2:56:56 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,693
Location: KY, USA
Yes, that's a limitation in the XSLTsearch 2.x because of the way TinyMCE (sometimes) expands characters.

As I have time to work on it I'm making XSLTsearch 3.0, which will resolve this problem, add full internationalization support by using dictionary items, and a few other new features. Given my current client schedule it will be a while before that is available, though.

In the short-term, Morten (I think it was Morten) made a forum post about this a while ago and came up with a quick hack that worked for him. I'll see if I can dig up a link to his post.

[EDIT: here's the link... http://forum.umbraco.org/yaf_postsm14638_XSLT-search-buggy-with-danish-letters.aspx... have I really been so long in getting the update finished?!?]

cheers,
doug.



MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
Petr Snobelt
Posted: Thursday, August 07, 2008 3:23:00 PM
Rank: Aficionado

Joined: 10/2/2007
Posts: 165
Location: Czech Republic
Hi,
you can change tinyMCE not to write entities

http://forum.umbraco.org/yaf_postst1604_TinyMCE-and-entity-encoding.aspx
Råtta
Posted: Friday, August 08, 2008 10:04:48 AM
Rank: Newbie

Joined: 4/11/2008
Posts: 15
Location: finland
Thanks!
Now it works.
I think that i'm umbracoforumholic. This forum is like drug to me.
Fast and correct answers and above all proficient people!

work around with my company webpages
tkahn
Posted: Friday, August 08, 2008 4:32:48 PM

Rank: Fanatic

Joined: 11/24/2006
Posts: 322
Location: Stockholm, Sweden
Råtta wrote:
Thanks!
Now it works.
I think that i'm umbracoforumholic. This forum is like drug to me.
Fast and correct answers and above all proficient people!


Which solution did you settle upon?
I have previously used the C#-hack...

/Thomas

Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
Råtta
Posted: Monday, August 11, 2008 7:53:51 AM
Rank: Newbie

Joined: 4/11/2008
Posts: 15
Location: finland
I followed drobars link and made a new C# method that replaces scandinavian letters. It might slow down the search, but my www-pages consist of only 42 pages.

work around with my company webpages
Råtta
Posted: Tuesday, August 12, 2008 7:51:47 AM
Rank: Newbie

Joined: 4/11/2008
Posts: 15
Location: finland
More about XSLTsearch:
This error is not so easy to localize because its appears only for some search phrases. But not at random. If I search "haku" the search give (always) on the result page next error "Error parsing XSLT file: \xslt\XSLTsearch.xslt"
AND MOREOVER
Phrase "asitek" or "ee" give me a good result but if I go to page 2 by clicking "Next >>" OR No.2 the same errortexts appears. Still by clicking No.3 XSLT returns correct result page. Phrase "sa" gives a good first page but second and third does not work.
I think this is wierd. Maybe because xslt is so far from me and my skills. I'm familiar with JS, HTML, C# and so on.



work around with my company webpages
Råtta
Posted: Thursday, August 14, 2008 11:07:13 AM
Rank: Newbie

Joined: 4/11/2008
Posts: 15
Location: finland
More specs:
there is a method called contextOfFind with 5 parameters in XSLTsearch
and it contains a line
Code:

string[] before = remaining.Substring(0, findIndex).Split(' ');

That line gives me an error because 'findIndex' is -1

[error]
Error parsing XSLT XSLTsearch.xslt
Length cannot be less than zero.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.Xml.Xsl.CompiledQuery.Script29.contextOfFind(String data, String find, Int32 wordsBefore, Int32 wordsAfter, Int32 maxChars)
[/error]



work around with my company webpages
Råtta
Posted: Thursday, August 14, 2008 11:56:50 AM
Rank: Newbie

Joined: 4/11/2008
Posts: 15
Location: finland
Before that
Code:
string[] before = remaining.Substring(0, findIndex).Split(' ');

line is method String.IndexOf(" ", findIndex);
witch returns -1 if the character not found.
EX. If the search phrase is beginning of the bodytext (?)

[msdn]The index position of value if that character is found, or -1 if it is not.[/msdn]

So there must be checking before that line
Code:

          if (findIndex == -1)
            break;


PS: My XSLT version is 2.1 and i've checked that newest is 2.7 so...

work around with my company webpages
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.