org.apache.xalan.transformer

## Class SerializerSwitcher

- java.lang.Object
- - org.apache.xalan.transformer.SerializerSwitcher

-     public class SerializerSwitcher
      extends java.lang.Object

  This is a helper class that decides if Xalan needs to switch serializers, based on the first output element.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SerializerSwitcher()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Serializer` | `switchSerializerIfHTML(java.lang.String ns, java.lang.String localName, java.util.Properties props, Serializer oldSerializer)` Switch to HTML serializer if element is HTML
    `static void` | `switchSerializerIfHTML(TransformerImpl transformer, java.lang.String ns, java.lang.String localName)` Switch to HTML serializer if element is HTML

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SerializerSwitcher

          public SerializerSwitcher()

  - ### Method Detail

    - #### switchSerializerIfHTML

          public static void switchSerializerIfHTML(TransformerImpl transformer,
                                                    java.lang.String ns,
                                                    java.lang.String localName)
                                             throws javax.xml.transform.TransformerException

      Switch to HTML serializer if element is HTML
      Parameters:
        `transformer` - Non-null transformer instance
        `ns` - Namespace URI of the element
        `localName` - Local part of name of element
      Throws:
        `javax.xml.transform.TransformerException`

    - #### switchSerializerIfHTML

          public static Serializer switchSerializerIfHTML(java.lang.String ns,
                                                          java.lang.String localName,
                                                          java.util.Properties props,
                                                          Serializer oldSerializer)
                                                   throws javax.xml.transform.TransformerException

      Switch to HTML serializer if element is HTML
      Parameters:
        `ns` - Namespace URI of the element
        `localName` - Local part of name of element
      Returns:
        new contentHandler.
      Throws:
        `javax.xml.transform.TransformerException`

Copyright © 2023 Apache XML Project. All Rights Reserved.