Exemplo n.º 1
0
        /// <summary>
        /// Return a Receiver. Saxon calls this method to obtain a Receiver, to which it then sends
        /// a sequence of events representing the content of an XML document.
        /// </summary>
        /// <returns>The receiver to which events are to be sent</returns>
        /// <param name="pipe">Pipe. The Saxon configuration. This is supplied so that the destination can
        /// use information from the configuration (for example, a reference to the name pool)
        /// to construct or configure the returned Receiver.</param>

        public override JReceiver GetReceiver(JPipelineConfiguration pipe)
        {
            builder = (treeModel == TreeModel.TinyTree ? (JBuilder) new JTinyBuilder(pipe) : (JBuilder) new JLinkedTreeBuilder(pipe));
            if (baseUri != null)
            {
                builder.setBaseURI(baseUri.ToString());
            }

            TreeProtector            protector = new TreeProtector(builder);
            JComplexContentOutputter cco       = new JComplexContentOutputter(pipe);
            JNamespaceReducer        reducer   = new JNamespaceReducer(protector);

            cco.setReceiver(reducer);
            return(cco);
        }
Exemplo n.º 2
0
        /// <summary>Reset the state of the <c>XdmDestination</c> so that it can be used to hold
        /// the result of another query or transformation.</summary>

        public void Reset()
        {
            builder = null;
        }