Project

Profile

Help

Revision 88daed73

Added by Michael Kay almost 3 years ago

Fix bug #4132 (xsl:function/@name)

View differences:

latest9.9/hej/net/sf/saxon/om/NamePool.java
108 108
    public StructuredQName getUnprefixedQName(int nameCode) {
109 109
        int fp = nameCode & FP_MASK;
110 110
        if ((fp & USER_DEFINED_MASK) == 0) {
111
            return StandardNames.getStructuredQName(fp);
111
            return StandardNames.getUnprefixedQName(fp);
112 112
        }
113 113
        return integerToQName.get(fp);
114 114
    }
latest9.9/hej/net/sf/saxon/om/StandardNames.java
709 709
        return new StructuredQName(getPrefix(fingerprint), getURI(fingerprint), getLocalName(fingerprint));
710 710
    }
711 711

  
712
    /**
713
     * Get a unprefixed StructuredQName representing a system-defined name
714
     *
715
     * @param fingerprint the fingerprint of the name
716
     * @return a StructuredQName representing the system-defined name, with a URI and local name but no prefix
717
     */
718

  
719
    public static StructuredQName getUnprefixedQName(int fingerprint) {
720
        return new StructuredQName("", getURI(fingerprint), getLocalName(fingerprint));
721
    }
722

  
712 723
    /**
713 724
     * A commonly-used name held in static:
714 725
     */
latest9.9/hej/net/sf/saxon/style/XSLFunction.java
101 101
                            StructuredQName functionName = makeQName(nameAtt);
102 102
                            if (functionName.hasURI("")) {
103 103
                                functionName = new StructuredQName("saxon", NamespaceConstant.SAXON, functionName.getLocalPart());
104
                                compileError("Function name must be in a namespace", "XTSE0740");
104 105
                            }
105 106
                            setObjectName(functionName);
106 107
                        } catch (XPathException err) {
107 108
                            compileError(err);
108 109
                        }
110
                        break;
109 111
                    case "as":
110 112
                        asAtt = atts.getValue(a);
111 113
                        break;

Also available in: Unified diff