Examples of QNameValue


Examples of org.exist.xquery.value.QNameValue

                }
                final String localPart = QName.extractLocalName(qnameString);
                final QName qn = new QName(localPart, uri);
                qn.setPrefix(prefix);
       
                final QNameValue result = new QNameValue(context, qn);
                if (context.getProfiler().isEnabled())
                    {context.getProfiler().end(this, "", result);}
               
                context.popInScopeNamespaces();
         
View Full Code Here

Examples of org.exist.xquery.value.QNameValue

        }

        if(!XMLChar.isValidName(qname.getLocalName()))
            {throw new XPathException(this, ErrorCodes.FOCA0002, "'" + qname.getLocalName() + "' is not a valid local name.");}

        final Sequence result = new QNameValue(context, qname);

        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
       
        return result;
View Full Code Here

Examples of org.exist.xquery.value.QNameValue

        final FunctionReference ref = (FunctionReference) args[0].itemAt(0);
        final QName qname = ref.getSignature().getName();
        if (qname == null || qname == InlineFunction.INLINE_FUNCTION_QNAME)
          {return Sequence.EMPTY_SEQUENCE;}
        else
          {return new QNameValue(context, qname);}
      } else {
        // isCalledAs("function-arity")
        final FunctionReference ref = (FunctionReference) args[0].itemAt(0);
        return new IntegerValue(ref.getSignature().getArgumentCount());
      }
View Full Code Here

Examples of org.exist.xquery.value.QNameValue

            contextSequence = rootNode.eval(null, null);
        }
        final Sequence[] args = getArguments(null, null);
       
        final Item item = args[0].itemAt(0);
        QNameValue qval;
        try {
            // attempt to convert the first argument to a QName
            qval = (QNameValue) item.convertTo(Type.QNAME);
        } catch (final XPathException e) {
            // wrong type: generate a diagnostic error
            throw new XPathException(this,
                    Messages.formatMessage(Error.FUNC_PARAM_TYPE,
                            new Object[] { "1", mySignature.toString(), null,
                            Type.getTypeName(Type.QNAME), Type.getTypeName(item.getType()) }
                    ));
        }
        final QName qname = qval.getQName();
       
        final AtomicValue comparisonCriterium = args[1].itemAt(0).atomize();
       
        Sequence result = Sequence.EMPTY_SEQUENCE;
View Full Code Here

Examples of org.exist.xquery.value.QNameValue

       
        Sequence result;
    if (args[0].isEmpty())
      {result = Sequence.EMPTY_SEQUENCE;}
        else {
        final QNameValue value = (QNameValue) args[0].itemAt(0);
        final QName qname = value.getQName();
        if (isCalledAs("prefix-from-QName")) {
          final String prefix = qname.getPrefix();
          if (prefix == null || prefix.length() == 0)
                    {result = Sequence.EMPTY_SEQUENCE;}
          else
View Full Code Here

Examples of org.pdf4j.saxon.value.QNameValue

                XPathException err = new XPathException("Malformed prefix in QName: '" + parts[0] + '\'');
                err.setErrorCode("FOCA0002");
                throw err;
            }
            return Literal.makeLiteral(
                    new QNameValue(parts[0], uri, parts[1], BuiltInAtomicType.QNAME, checker));
        } catch (QNameException e) {
            XPathException err = new XPathException(e.getMessage(), this);
            err.setErrorCode("FOCA0002");
            err.setLocator(this);
            throw err;
View Full Code Here

Examples of org.pdf4j.saxon.value.QNameValue

            if (parts[0].length() != 0 && !checker.isValidNCName(parts[0])) {
                XPathException err = new XPathException("Malformed prefix in QName: '" + parts[0] + '\'');
                err.setErrorCode("FORG0001");
                throw err;
            }
            return new QNameValue(parts[0], uri, parts[1], BuiltInAtomicType.QNAME, checker);
        } catch (QNameException e) {
            dynamicError(e.getMessage(), "FOCA0002", context);
            return null;
        } catch (XPathException err) {
            err.maybeSetLocation(this);
View Full Code Here

Examples of org.pdf4j.saxon.value.QNameValue

            case NODE_NAME:
                int nc = node.getNameCode();
                if (nc == -1) {
                    return null;
                }
                return new QNameValue(node.getNamePool(), nc);
            default:
                throw new UnsupportedOperationException("Unknown name operation");
        }
        return new StringValue(s);
    }
View Full Code Here

Examples of schema2template.model.QNameValue

     * @return list of style family names
     */
    public List<QNamed> getStyleFamilies(QNamed element) {
        List<QNamed> retval = new ArrayList<QNamed>();
        for (String family : mNameToFamiliesMap.get(element.getQName())) {
            retval.add(new QNameValue(family));
        }
        return retval;
    }
View Full Code Here

Examples of schema2template.model.QNameValue

    public SortedSet<QNamed> getStyleFamilies() {
        Iterator<List<String>> iter = mNameToFamiliesMap.values().iterator();
        List<QNamed> families = new ArrayList<QNamed>();
        while (iter.hasNext()) {
            for (String family : iter.next()) {
                families.add(new QNameValue(family));
            }
        }
        return new TreeSet<QNamed>(families);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.