Package org.exist.xquery

Examples of org.exist.xquery.XQueryContext.declareVariable()


    }
    context.setStaticallyKnownDocuments(new XmldbURI[] { XmldbURI.create(
        path).append(AtomProtocol.FEED_DOCUMENT_NAME) });

    try {
      context.declareVariable("id", id);
      final Sequence resultSequence = xquery.execute(feedQuery, null);
      if (resultSequence.isEmpty()) {
        throw new BadRequestException("No topic was found.");
      }
View Full Code Here


               
                //setup the http context if known
                if(serializer.httpContext != null)
                {
                  if(serializer.httpContext.getRequest() != null)
                    {context.declareVariable(RequestModule.PREFIX + ":request", serializer.httpContext.getRequest());}
                 
                  if(serializer.httpContext.getResponse() != null)
                    {context.declareVariable(ResponseModule.PREFIX + ":response", serializer.httpContext.getResponse());}
                 
                  if(serializer.httpContext.getSession() != null)
View Full Code Here

                {
                  if(serializer.httpContext.getRequest() != null)
                    {context.declareVariable(RequestModule.PREFIX + ":request", serializer.httpContext.getRequest());}
                 
                  if(serializer.httpContext.getResponse() != null)
                    {context.declareVariable(ResponseModule.PREFIX + ":response", serializer.httpContext.getResponse());}
                 
                  if(serializer.httpContext.getSession() != null)
                    {context.declareVariable(SessionModule.PREFIX + ":session", serializer.httpContext.getSession());}
                }
               
View Full Code Here

                 
                  if(serializer.httpContext.getResponse() != null)
                    {context.declareVariable(ResponseModule.PREFIX + ":response", serializer.httpContext.getResponse());}
                 
                  if(serializer.httpContext.getSession() != null)
                    {context.declareVariable(SessionModule.PREFIX + ":session", serializer.httpContext.getSession());}
                }
               
                //TODO: change these to putting the XmldbURI in, but we need to warn users!
                if(document!=null){
                    context.declareVariable("xinclude:current-doc", document.getFileURI().toString());
View Full Code Here

                    {context.declareVariable(SessionModule.PREFIX + ":session", serializer.httpContext.getSession());}
                }
               
                //TODO: change these to putting the XmldbURI in, but we need to warn users!
                if(document!=null){
                    context.declareVariable("xinclude:current-doc", document.getFileURI().toString());
                    context.declareVariable("xinclude:current-collection", document.getCollection().getURI().toString());
                }
               
                if (xpointer != null) {
                    if(doc != null)
View Full Code Here

                }
               
                //TODO: change these to putting the XmldbURI in, but we need to warn users!
                if(document!=null){
                    context.declareVariable("xinclude:current-doc", document.getFileURI().toString());
                    context.declareVariable("xinclude:current-collection", document.getCollection().getURI().toString());
                }
               
                if (xpointer != null) {
                    if(doc != null)
                        {context.setStaticallyKnownDocuments(new XmldbURI[] { doc.getURI() } );}
View Full Code Here

                }

                // pass parameters as variables
                if (params != null) {
                    for (final Map.Entry<String, String> entry : params.entrySet()) {
                        context.declareVariable(entry.getKey(), entry.getValue());
                    }
                }

                if(compiled == null) {
                    try {
View Full Code Here

            CompiledXQuery compiled =null;
            final XQuery xquery = broker.getXQueryService();
            final XQueryContext context = xquery.newContext(AccessContext.INTERNAL_PREFIX_LOOKUP);
           
            if(collection!=null){
                context.declareVariable(COLLECTION, collection);
            }
           
            if(namespace!=null){
                context.declareVariable(TARGETNAMESPACE, namespace);
            }
View Full Code Here

            if(collection!=null){
                context.declareVariable(COLLECTION, collection);
            }
           
            if(namespace!=null){
                context.declareVariable(TARGETNAMESPACE, namespace);
            }
           
            if(publicId!=null){
                context.declareVariable(PUBLICID, publicId);
            }
View Full Code Here

            if(namespace!=null){
                context.declareVariable(TARGETNAMESPACE, namespace);
            }
           
            if(publicId!=null){
                context.declareVariable(PUBLICID, publicId);
            }
           
            if(catalogPath!=null){
                context.declareVariable(CATALOG, catalogPath);
            }
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.