/** * Create a {@link SerializationProperties} object holding the serialization properties explicitly declared * within this Serializer object (including any character map index), and not including any * defaults taken from the stylesheet or query. * * @return a newly-constructed {@code SerializationProperties} object holding the declared * serialization properties. Specifically, it holds the properties defined explicitly on this * {@code Serializer} object, and excludes any properties defined in named or unnamed * {@code xsl:output} declarations in the stylesheet, or the equivalent in XQuery. */ public SerializationProperties getSerializationProperties() { return new SerializationProperties(getLocallyDefinedProperties(), characterMap); }
/** * Create a {@link SerializationProperties} object holding the serialization properties explicitly declared * within this Serializer object (including any character map index), and not including any * defaults taken from the stylesheet or query. * * @return a newly-constructed {@code SerializationProperties} object holding the declared * serialization properties. Specifically, it holds the properties defined explicitly on this * {@code Serializer} object, and excludes any properties defined in named or unnamed * {@code xsl:output} declarations in the stylesheet, or the equivalent in XQuery. */ public SerializationProperties getSerializationProperties() { return new SerializationProperties(getLocallyDefinedProperties(), characterMap); }
private void serializeNodeToResult(XdmNode node, Result res) throws SaxonApiException { try { QueryResult.serialize(node.getUnderlyingNode(), res, getLocallyDefinedProperties()); } catch (XPathException e) { throw new SaxonApiException(e); } }
private void serializeNodeToResult(XdmNode node, Result res) throws SaxonApiException { try { QueryResult.serialize(node.getUnderlyingNode(), res, getLocallyDefinedProperties()); } catch (XPathException e) { throw new SaxonApiException(e); } }
/** * Serialize an arbitrary XdmValue to the selected output destination using this serializer. The supplied * sequence is first wrapped in a document node according to the rules given in section 2 (Sequence Normalization) of the * <a href="http://www.w3.org/TR/xslt-xquery-serialization/">XSLT/XQuery serialization specification</a>; the resulting * document nodes is then serialized using the serialization parameters defined in this serializer. * * @param value The value to be serialized * @throws IllegalStateException if no outputStream, Writer, or File has been supplied as the * destination for the serialized output, or if no Processor is associated with the serializer * @throws SaxonApiException if a serialization error or I/O error occurs * @since 9.3 */ public void serializeXdmValue(XdmValue value) throws SaxonApiException { if (value instanceof XdmNode) { serializeNode((XdmNode) value); } else { try { QueryResult.serializeSequence(value.getUnderlyingValue().iterate(), processor.getUnderlyingConfiguration(), result, getLocallyDefinedProperties()); } catch (XPathException e) { throw new SaxonApiException(e); } } closeAndNotify(); }
/** * Serialize an arbitrary XdmValue to the selected output destination using this serializer. The supplied * sequence is first wrapped in a document node according to the rules given in section 2 (Sequence Normalization) of the * <a href="http://www.w3.org/TR/xslt-xquery-serialization/">XSLT/XQuery serialization specification</a>; the resulting * document nodes is then serialized using the serialization parameters defined in this serializer. * * @param value The value to be serialized * @throws IllegalStateException if no outputStream, Writer, or File has been supplied as the * destination for the serialized output, or if no Processor is associated with the serializer * @throws SaxonApiException if a serialization error or I/O error occurs * @since 9.3 */ public void serializeXdmValue(XdmValue value) throws SaxonApiException { if (value instanceof XdmNode) { serializeNode((XdmNode) value); } else { try { QueryResult.serializeSequence(value.getUnderlyingValue().iterate(), processor.getUnderlyingConfiguration(), result, getLocallyDefinedProperties()); } catch (XPathException e) { throw new SaxonApiException(e); } } closeAndNotify(); }