xsl-list
[Top] [All Lists]

Re: [xsl] Processing two documents, which order?

2011-04-07 11:15:30
On Thu, 07 Apr 2011 16:03:14 +0100
Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:


The regex is required as I see it to determine starting and ending
conditions for the 300 'words'? I don't see how one...
Could I build and hold 300 regexen for later use, is that what
you were thinking Mike?

I'm still unsure of the approach though.
1. Build the keys on the smaller list of words
2. ??? build the sequence of regexen?
3. then....
    AFAICT I'm still going to have to process the entire long
document with each regex in the sequence?


I would have expected to use a single fixed regex to tokenize the
text into words, and then compare each word with those in the lookup
list by using equality matching rather than regex matching.

Michael Kay
Saxonica


The larger document is fully marked up XML so I don't want to tokenize
the entire thing, though that might work on the template
matching text().

Given
      <property>absolute-position</property>
      <property>bottom</property>
      <property>left</property>
      <property>right</property>
      <property>top</property>
as the input... what would the keys look like?




regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

--~------------------------------------------------------------------
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>
--~--