Class SequenceNormalizerWithItemSeparator

  • All Implemented Interfaces:
    javax.xml.transform.Result, Receiver

    public class SequenceNormalizerWithItemSeparator
    extends SequenceNormalizer
    Implement the "sequence normalization" logic as defined in the XSLT 3.0/XQuery 3.0 serialization spec.

    This class is used only if an ItemSeparator is specified. In the absence of an ItemSeparator, the insertion of a single space performed by the ComplexContentOutputter serves the purpose.

    • Constructor Detail

      • SequenceNormalizerWithItemSeparator

        public SequenceNormalizerWithItemSeparator​(Receiver next,
                                                   java.lang.String separator)
    • Method Detail

      • startElement

        public void startElement​(NodeName elemName,
                                 SchemaType typeCode,
                                 Location location,
                                 int properties)
                          throws XPathException
        Notify the start of an element
        Specified by:
        startElement in interface Receiver
        Overrides:
        startElement in class SequenceNormalizer
        Parameters:
        elemName - integer code identifying the name of the element within the name pool.
        typeCode - integer code identifying the element's type within the name pool.
        location -
        properties - properties of the element node
        Throws:
        XPathException - if an error occurs
      • characters

        public void characters​(java.lang.CharSequence chars,
                               Location locationId,
                               int properties)
                        throws XPathException
        Character data
        Specified by:
        characters in interface Receiver
        Overrides:
        characters in class SequenceNormalizer
        Parameters:
        chars - The characters
        locationId - provides information such as line number and system ID.
        properties - Bit significant value. The following bits are defined:
        DISABLE_ESCAPING
        Disable escaping for this text node
        USE_CDATA
        Output as a CDATA section
        Throws:
        XPathException - if an error occurs
      • processingInstruction

        public void processingInstruction​(java.lang.String target,
                                          java.lang.CharSequence data,
                                          Location locationId,
                                          int properties)
                                   throws XPathException
        Processing Instruction
        Specified by:
        processingInstruction in interface Receiver
        Overrides:
        processingInstruction in class SequenceNormalizer
        Parameters:
        target - The PI name. This must be a legal name (it will not be checked).
        data - The data portion of the processing instruction
        locationId - provides information such as line number and system ID.
        properties - Additional information about the PI.
        Throws:
        XPathException - if an error occurs
      • comment

        public void comment​(java.lang.CharSequence chars,
                            Location locationId,
                            int properties)
                     throws XPathException
        Output a comment
        Specified by:
        comment in interface Receiver
        Overrides:
        comment in class SequenceNormalizer
        Parameters:
        chars - The content of the comment
        locationId - provides information such as line number and system ID.
        properties - Additional information about the comment.
        Throws:
        XPathException - if an error occurs
      • sep

        public void sep()
                 throws XPathException
        Output the separator, assuming we are at the top level and not at the start
        Throws:
        XPathException