/** * Start of event stream */ public void open() throws XPathException { builder.setSystemId(systemId); Receiver stripper = controller.makeStripper(builder); if (controller.isStylesheetStrippingTypeAnnotations()) { stripper = controller.getConfiguration().getAnnotationStripper(stripper); } setUnderlyingReceiver(stripper); nextReceiver.open(); }
/** * Start of event stream */ public void open() throws XPathException { builder.setSystemId(systemId); Receiver stripper = controller.makeStripper(builder); if (controller.isStylesheetStrippingTypeAnnotations()) { stripper = controller.getConfiguration().getAnnotationStripper(stripper); } setUnderlyingReceiver(stripper); nextReceiver.open(); }
/** * Get an {@link org.xml.sax.ContentHandler} that may be used to build the document programmatically. * * @return a newly constructed {@link BuildingContentHandler}, which implements the <code>ContentHandler</code> * interface. If schema validation has been requested for this <code>DocumentBuilder</code>, then the document constructed * using the <code>ContentHandler</code> will be validated as it is written. * <p>Note that the returned <code>ContentHandler</code> expects namespace scopes to be indicated * explicitly by calls to {@link org.xml.sax.ContentHandler#startPrefixMapping} and * {@link org.xml.sax.ContentHandler#endPrefixMapping}.</p> * <p>If the stream of events supplied to the <code>ContentHandler</code> does not constitute * a well formed (and namespace-well-formed) document, the effect is undefined; Saxon may fail * to detect the error, and construct an unusable tree. </p> * @throws SaxonApiException if any failure occurs * @since 9.3 */ public BuildingContentHandler newBuildingContentHandler() throws SaxonApiException { PipelineConfiguration pipe = config.makePipelineConfiguration(); Builder builder = treeModel.makeBuilder(pipe); if (baseURI != null) { builder.setSystemId(baseURI.toASCIIString()); } builder.setLineNumbering(lineNumbering); Receiver r = builder; r = new NamespaceReducer(r); r = injectValidator(r, builder); return new BuildingContentHandlerImpl(r, builder); }
/** * Make the handler to construct the XML tree representation for JSON * * @param context the context in which the result tree is to be built * @param staticBaseUri the static base URI, used for the base URI of the constructed tree * @param flags flags indicating the chosen options * @throws XPathException if initialization fails, for example because of problems loading the schema */ public JsonHandlerXML(XPathContext context, String staticBaseUri, int flags) throws XPathException { init(context, flags); builder = context.getController().makeBuilder(); builder.setSystemId(staticBaseUri); builder.setTiming(false); out = new NamespaceReducer(builder); out.open(); out.startDocument(0); }
/** * Make the handler to construct the XML tree representation for JSON * * @param context the context in which the result tree is to be built * @param staticBaseUri the static base URI, used for the base URI of the constructed tree * @param flags flags indicating the chosen options * @throws XPathException if initialization fails, for example because of problems loading the schema */ public JsonHandlerXML(XPathContext context, String staticBaseUri, int flags) throws XPathException { init(context, flags); builder = context.getController().makeBuilder(); builder.setSystemId(staticBaseUri); builder.setTiming(false); out = new NamespaceReducer(builder); out.open(); out.startDocument(0); }
Builder builder = treeModel.makeBuilder(pipe); if (baseURI != null) { builder.setSystemId(baseURI.toASCIIString());
/** * Start of event stream */ public void open() throws XPathException { builder = controller.makeBuilder(); setPipelineConfiguration(builder.getPipelineConfiguration()); builder.setSystemId(systemId); Receiver stripper = controller.makeStripper(builder); if (controller.getExecutable().stripsInputTypeAnnotations()) { stripper = controller.getConfiguration().getAnnotationStripper(stripper); } setUnderlyingReceiver(stripper); nextReceiver.open(); }
/** * Start of event stream */ public void open() throws XPathException { builder = controller.makeBuilder(); setPipelineConfiguration(builder.getPipelineConfiguration()); builder.setSystemId(systemId); Receiver stripper = controller.makeStripper(builder); if (controller.getExecutable().stripsInputTypeAnnotations()) { stripper = controller.getConfiguration().getAnnotationStripper(stripper); } setUnderlyingReceiver(stripper); nextReceiver.open(); }
/** * Start of event stream */ public void open() throws XPathException { builder = controller.makeBuilder(); setPipelineConfiguration(builder.getPipelineConfiguration()); builder.setSystemId(systemId); Receiver stripper = controller.makeStripper(builder); if (controller.getExecutable().stripsInputTypeAnnotations()) { stripper = controller.getConfiguration().getAnnotationStripper(stripper); } setUnderlyingReceiver(stripper); nextReceiver.open(); }
builder.setSystemId(sysId); final ExplicitLocation fixedLocation = new ExplicitLocation(sysId, -1, -1); ProxyReceiver filter = new ProxyReceiver(builder) {
builder.setLineNumbering(lineNumbering); builder.setPipelineConfiguration(pipe); builder.setSystemId(source.getSystemId()); Sender.send(source, new NamespaceReducer(builder), options);
builder.setLineNumbering(lineNumbering); builder.setPipelineConfiguration(pipe); builder.setSystemId(source.getSystemId()); Sender.send(source, new NamespaceReducer(builder), options);
/** * Create a TinyTree to hold a document or element node. * @throws net.sf.saxon.trans.XPathException */ private void createTree() throws XPathException { PipelineConfiguration pipe = getPipelineConfiguration(); builder = pipe.getController().makeBuilder(); builder.setPipelineConfiguration(pipe); builder.setSystemId(getSystemId()); builder.setTiming(false); NamespaceReducer reducer = new NamespaceReducer(); reducer.setUnderlyingReceiver(builder); reducer.setPipelineConfiguration(getPipelineConfiguration()); ComplexContentOutputter cco = new ComplexContentOutputter(); cco.setHostLanguage(getPipelineConfiguration().getHostLanguage()); cco.setPipelineConfiguration(getPipelineConfiguration()); cco.setReceiver(reducer); outputter = cco; outputter.setSystemId(systemId); outputter.setPipelineConfiguration(getPipelineConfiguration()); outputter.open(); }
builder.setSystemId(systemId); builder.setBaseURI(systemId); builder.setTiming(false);
builder.setSystemId(systemId); builder.setBaseURI(systemId); builder.setTiming(false);