/** * Make a builder for the selected tree model. * * @return an instance of the Builder for the chosen tree model * @since 8.4 */ public Builder makeBuilder() { Builder b = treeModel.makeBuilder(makePipelineConfiguration()); b.setTiming(config.isTiming()); b.setLineNumbering(config.isLineNumbering()); return b; }
/** * Make a builder for the selected tree model. * * @return an instance of the Builder for the chosen tree model * @since 8.4 */ public Builder makeBuilder() { Builder b = treeModel.makeBuilder(makePipelineConfiguration()); b.setTiming(config.isTiming()); b.setLineNumbering(config.isLineNumbering()); return b; }
/** * 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); }
/** * Get an {@link javax.xml.stream.XMLStreamWriter} that may be used to build the document programmatically. * * @return a newly constructed {@link BuildingStreamWriter}, which implements the <code>XMLStreamWriter</code> * interface. If schema validation has been requested for this <code>DocumentBuilder</code>, then the document constructed * using the <code>XMLStreamWriter</code> will be validated as it is written. * <p>If the stream of events supplied to the <code>XMLStreamWriter</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 BuildingStreamWriterImpl newBuildingStreamWriter() throws SaxonApiException { PipelineConfiguration pipe = config.makePipelineConfiguration(); Builder builder = treeModel.makeBuilder(pipe); builder.setLineNumbering(lineNumbering); Receiver r = builder; r = new NamespaceReducer(r); r = injectValidator(r, builder); return new BuildingStreamWriterImpl(r, builder); }
/** * Make a builder for the selected tree model. * * @return an instance of the Builder for the chosen tree model * @since 8.4 */ public Builder makeBuilder() { Builder b; if (treeModel==Builder.TINY_TREE) { b = new TinyBuilder(); } else { b = new TreeBuilder(); } b.setTiming(config.isTiming()); b.setLineNumbering(config.isLineNumbering()); b.setPipelineConfiguration(makePipelineConfiguration()); return b; }
/** * Make a builder for the selected tree model. * * @return an instance of the Builder for the chosen tree model * @since 8.4 */ public Builder makeBuilder() { Builder b; if (treeModel==Builder.TINY_TREE) { b = new TinyBuilder(); } else { b = new TreeBuilder(); } b.setTiming(config.isTiming()); b.setLineNumbering(config.isLineNumbering()); b.setPipelineConfiguration(makePipelineConfiguration()); return b; }
builder.setSystemId(baseURI.toASCIIString()); builder.setLineNumbering(lineNumbering); Receiver r = builder; r = new NamespaceReducer(r);
/** * Get an {@link javax.xml.stream.XMLStreamWriter} that may be used to build the document programmatically. * * @return a newly constructed {@link BuildingStreamWriter}, which implements the <code>XMLStreamWriter</code> * interface. If schema validation has been requested for this <code>DocumentBuilder</code>, then the document constructed * using the <code>XMLStreamWriter</code> will be validated as it is written. * <p>If the stream of events supplied to the <code>XMLStreamWriter</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 BuildingStreamWriterImpl newBuildingStreamWriter() throws SaxonApiException { PipelineConfiguration pipe = config.makePipelineConfiguration(); Builder builder = treeModel.makeBuilder(pipe); builder.setLineNumbering(lineNumbering); Receiver r = builder; r = new NamespaceReducer(r); if (schemaValidator != null) { r = schemaValidator.getReceiver(pipe, config.obtainDefaultSerializationProperties()); r.setPipelineConfiguration(pipe); if (r instanceof ProxyReceiver) { ((ProxyReceiver) r).setUnderlyingReceiver(builder); } } return new BuildingStreamWriterImpl(r, builder); }
if (config.isLineNumbering() || (source instanceof AugmentedSource && ((AugmentedSource)source).isLineNumbering())) { b.setLineNumbering(true);
Builder builder = treeModel.makeBuilder(pipe); builder.setTiming(isTiming()); builder.setLineNumbering(lineNumbering); builder.setPipelineConfiguration(pipe); builder.setSystemId(source.getSystemId());
Builder builder = treeModel.makeBuilder(pipe); builder.setTiming(isTiming()); builder.setLineNumbering(lineNumbering); builder.setPipelineConfiguration(pipe); builder.setSystemId(source.getSystemId());
if (config.isLineNumbering() || (source instanceof AugmentedSource && ((AugmentedSource)source).isLineNumbering())) { b.setLineNumbering(true);
if (config.isLineNumbering() || (source instanceof AugmentedSource && ((AugmentedSource)source).isLineNumbering())) { b.setLineNumbering(true);
lineNumbering = ((AugmentedSource)source).isLineNumbering(); b.setLineNumbering(lineNumbering);
lineNumbering = ((AugmentedSource)source).isLineNumbering(); b.setLineNumbering(lineNumbering);
builder.setLineNumbering(controller.getConfiguration().isLineNumbering());