xsl-list
[Top] [All Lists]

Re: [xsl] Efficently transposing tokenized data

2008-11-05 01:53:56
Dear Michael and Dimitre,

Thank you both for your prompt responses. Both solutions are far better than 
what I had in mind, but the general problem highlights for me that not all XML 
structures are equal. I shall have to change things for future data.

Many thanks,

B.

Date: Tue, 4 Nov 2008 23:44:13 -0000
To: 
From: "Michael Kay" 
Subject: RE: [xsl] Efficently transposing tokenized data
Message-ID: <88158BB8B86E4502B2BD16BB48A759E0(_at_)Sealion>

I can suggest several approaches, but I don't guarantee that any of them
will perform better than doing the repeated (wasteful) tokenization.

(1) Do a preprocessing pass in which you split the data attribute into
multiple elements, then proceed "as normal".

(2) Do a preprocessing pass to compute a sequence of NxM strings in one big
sequence, then operate by indexing into this big sequence.

(3) Write a user-defined function that calls tokenize() but with
saxon:memo-function="yes", so that the results of tokenizing a node are
remembered when you tokenize the same node again.

I think I would probably go for (2) as it's simplest:
[...]


      Search 1000's of available singles in your area at the new Yahoo!7 
Dating. Get Started http://au.dating.yahoo.com/?cid=53151&pid=1011


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>