Project

Profile

Help

Revision 0166b03e

Added by Michael Kay almost 13 years ago

Fix bug 2422244 (xs:IDREFS value not matching idref() function)

View differences:

latest9.1/bj/net/sf/saxon/trans/KeyManager.java
3 3
import net.sf.saxon.expr.*;
4 4
import net.sf.saxon.functions.SystemFunction;
5 5
import net.sf.saxon.functions.Tokenize;
6
import net.sf.saxon.functions.StringFn;
6 7
import net.sf.saxon.instruct.SlotManager;
7 8
import net.sf.saxon.om.*;
8 9
import net.sf.saxon.om.ListIterator;
......
105 106

  
106 107
    private void registerIdrefKey(Configuration config) {
107 108
        PatternFinder idref = IdrefTest.getInstance();
108
        Expression eval = new Atomizer(new ContextItemExpression(), config);
109
        //Expression eval = new Atomizer(new ContextItemExpression(), config);
109 110

  
110
        StringLiteral regex = new StringLiteral("\\s");
111
        Tokenize use = (Tokenize)SystemFunction.makeSystemFunction("tokenize", new Expression[]{eval, regex});
111
        StringFn sf = (StringFn)SystemFunction.makeSystemFunction(
112
                "string", new Expression[]{new ContextItemExpression()});
113
        StringLiteral regex = new StringLiteral("\\s+");
114
        Tokenize use = (Tokenize)SystemFunction.makeSystemFunction("tokenize", new Expression[]{sf, regex});
112 115
        KeyDefinition key = new KeyDefinition(idref, use, null, null);
113 116
        key.setIndexedItemType(BuiltInAtomicType.STRING);
114 117
        try {

Also available in: Unified diff