Package net.sf.saxon.value

Examples of net.sf.saxon.value.StringValue


        String s2 = sv.getStringValue();

        sv = (AtomicValue)argument[2].evaluateItem(context);
        String s3 = sv.getStringValue();

        return new StringValue(translate(s1, s2, s3));
    }
View Full Code Here


  throws TransformerConfigurationException {
      try {
        return AttributeValueTemplate.make(expression + (char)0, 0, (char)0, getLineNumber(), staticContext);
        } catch(XPathException err) {
            compileError(err);
            return new StringValue(expression);
        }
  }
View Full Code Here

            }
        if (node.getNodeKind() == Type.TEXT) {
            // handle literal text nodes by generating an xsl:text instruction
            Text text = new Text(false);
                try {
                    text.setSelect(new StringValue(node.getStringValue()));
                } catch (XPathException e) {
                    compileError(e);
                }
                text.setLocationId(allocateLocationId(getSystemId(), node.getLineNumber()));
                text.setParentExpression(inst);
View Full Code Here

        } else if (attributeName instanceof QNameValue) {
            // this is allowed in XQuery
            localName = ((QNameValue)nameValue).getLocalName();
            String namespaceURI = ((QNameValue)nameValue).getNamespaceURI();
            namespace = new StringValue(namespaceURI);
            if (namespaceURI.equals("")) {
                prefix = "";
            } else {
                // we need to allocate a prefix. Any one will do; if it's a duplicate,
                // a different one will be substituted
View Full Code Here

        NumericValue gp = (NumericValue)gp0.getPrimitiveValue();
        RegexIterator iter = c.getCurrentRegexIterator();
        if (iter == null) return null;
        String s = iter.getRegexGroup((int)gp.longValue());
        if (s == null) return null;
        return new StringValue(s);
    }
View Full Code Here

            elementName = makeAttributeValueTemplate(nameAtt);
            if (elementName instanceof StringValue) {
                if (!Name.isQName(nameAtt)) {
                    compileError("Element name is not a valid QName");
                    // to prevent duplicate error messages:
                    elementName = new StringValue("saxon-error-element");
                }
            }
        }

        if (namespaceAtt!=null) {
View Full Code Here

                dynamicError(
                        "The regular expression must not be one that matches a zero-length string", "FORX0003", c);
            }
        }
        String res = re.matcher(arg0.getStringValue()).replaceAll(arg2.getStringValue());
        return new StringValue(res);
    }
View Full Code Here

    }

    private static void addStringComponent(List components, String avt, int start, int end) {
        if (start < end) {
            components.add(new StringValue(avt.substring(start, end)));
        }
    }
View Full Code Here

        exp = new AtomicSequenceConverter(exp, Type.STRING_TYPE);

    StringJoin fn = (StringJoin)SystemFunction.makeSystemFunction("string-join", namePool);
    Expression[] args = new Expression[2];
    args[0] = exp;
    args[1] = new StringValue(" ");
    fn.setArguments(args);
        if (exp instanceof ComputedExpression) {
            fn.setLocationId(((ComputedExpression)exp).getLocationId());
        }
    return fn;
View Full Code Here

    }

    public Expression compile(Executable exec) throws TransformerConfigurationException {
        ProcessingInstruction inst = new ProcessingInstruction(name);
        compileContent(exec, inst);
        inst.setSeparator(new StringValue(select==null ? "" : " "));
        ExpressionTool.makeParentReferences(inst);
        return inst;
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.value.StringValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.