public SequenceReceiver makeSequenceNormalizer(Receiver receiver, Properties properties) { String method = properties.getProperty(OutputKeys.METHOD); if ("json".equals(method) || "adaptive".equals(method)) { return receiver instanceof SequenceReceiver ? (SequenceReceiver)receiver : new TreeReceiver(receiver); } else { PipelineConfiguration pipe = receiver.getPipelineConfiguration(); SequenceReceiver result; String separator = properties.getProperty(SaxonOutputKeys.ITEM_SEPARATOR); if (separator == null || "#absent".equals(separator)) { result = new SequenceNormalizerWithSpaceSeparator(receiver); } else { result = new SequenceNormalizerWithItemSeparator(receiver, separator); } result.setPipelineConfiguration(pipe); return result; } }
public SequenceReceiver makeSequenceNormalizer(Receiver receiver, Properties properties) { String method = properties.getProperty(OutputKeys.METHOD); if ("json".equals(method) || "adaptive".equals(method)) { return receiver instanceof SequenceReceiver ? (SequenceReceiver)receiver : new TreeReceiver(receiver); } else { PipelineConfiguration pipe = receiver.getPipelineConfiguration(); SequenceReceiver result; String separator = properties.getProperty(SaxonOutputKeys.ITEM_SEPARATOR); if (separator == null || "#absent".equals(separator)) { result = new SequenceNormalizerWithSpaceSeparator(receiver); } else { result = new SequenceNormalizerWithItemSeparator(receiver, separator); } result.setPipelineConfiguration(pipe); return result; } }
/** * Convenience method to create an appropriate SequenceNormalizer, based * on the item-separator appearing in the serialization parameters. If the * serialization parameters include a request for validation, then a validator * will also be inserted into the pipeline immediately after the SequenceNormalizer, * as required by the rules for {@code xsl:result-document}. * @param next the next {@code Receiver in the pipeline} * @return the new {@code SequenceNormalizer}, feeding into the supplied {@code Receiver}, * possibly via a new validating filter. */ public SequenceNormalizer makeSequenceNormalizer(Receiver next) { if (getValidationFactory() != null) { next = getValidationFactory().makeFilter(next); } String itemSeparator = properties.getProperty(SaxonOutputKeys.ITEM_SEPARATOR); return itemSeparator == null || "#absent".equals(itemSeparator) ? new SequenceNormalizerWithSpaceSeparator(next) : new SequenceNormalizerWithItemSeparator(next, itemSeparator); }
/** * Convenience method to create an appropriate SequenceNormalizer, based * on the item-separator appearing in the serialization parameters. If the * serialization parameters include a request for validation, then a validator * will also be inserted into the pipeline immediately after the SequenceNormalizer, * as required by the rules for {@code xsl:result-document}. * @param next the next {@code Receiver in the pipeline} * @return the new {@code SequenceNormalizer}, feeding into the supplied {@code Receiver}, * possibly via a new validating filter. */ public SequenceNormalizer makeSequenceNormalizer(Receiver next) { if (getValidationFactory() != null) { next = getValidationFactory().makeFilter(next); } String itemSeparator = properties.getProperty(SaxonOutputKeys.ITEM_SEPARATOR); return itemSeparator == null || "#absent".equals(itemSeparator) ? new SequenceNormalizerWithSpaceSeparator(next) : new SequenceNormalizerWithItemSeparator(next, itemSeparator); }