Package com.xmlmind.transproc

## Class Processor

- java.lang.Object
- - com.xmlmind.transproc.Processor

-     public class Processor
      extends Object

  Transclusion processor: processes a document containing elements having `trans:` attributes then removes all these `trans:` attributes.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `AUTO_SUFFIX_SEPARATOR` | Default automatic suffix separator.
    `static String[]` | `DOCBOOK5_ID_LIST` | DocBook 5 ID-list.
    `static String[]` | `DOCBOOK5_IDREF_LIST` | DocBook 5 IDREF-list.
    `static String` | `TRANS_NS_URI` | The URI of the DocBook transclusion namespace.
    `static String` | `XLINK_NS_URI` | The URI of the XML Linking Language (XLink).

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Processor()` | Equivalent to `Processor(null)`.
    `Processor​(Console c)` | Constructs a Processor using specified console to display its progress, warning, error, etc, messages.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getAutoSuffixSeparator()` | Returns the separator used for automatically generated suffixes.
    `ConsoleHelper` | `getConsole()` | Returns the console on which messages issued during preprocessing are to be displayed.
    `String[]` | `getIdList()` | Returns the ID-list used by this processor.
    `String[]` | `getIdRefList()` | Returns the IDREF-list used by this processor.
    `static void` | `main​(String[] args)` |
    `Boolean` | `process​(Document doc)` | Process specified document.
    `void` | `setAutoSuffixSeparator​(String separ)` | Specifies the separator used for automatically generated suffixes.
    `void` | `setConsole​(Console c)` | Specifies the console on which messages issued during processing are to be displayed.
    `void` | `setIdList​(String[] list)` | Specifies the ID-list used by this processor.
    `void` | `setIdRefList​(String[] list)` | Specifies the IDREF-list used by this processor.

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

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

- - ### Field Detail

    - #### TRANS_NS_URI

          public static final String TRANS_NS_URI

      The URI of the DocBook transclusion namespace.
      See Also:
        Constant Field Values

    - #### XLINK_NS_URI

          public static final String XLINK_NS_URI

      The URI of the XML Linking Language (XLink).
      See Also:
        Constant Field Values

    - #### DOCBOOK5_ID_LIST

          public static final String[] DOCBOOK5_ID_LIST

      DocBook 5 ID-list.

    - #### DOCBOOK5_IDREF_LIST

          public static final String[] DOCBOOK5_IDREF_LIST

      DocBook 5 IDREF-list.

    - #### AUTO_SUFFIX_SEPARATOR

          public static final String AUTO_SUFFIX_SEPARATOR

      Default automatic suffix separator.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Processor

          public Processor()

      Equivalent to `Processor(null)`.

    - #### Processor

          public Processor​(Console c)

      Constructs a Processor using specified console to display its progress, warning, error, etc, messages.
      Parameters:
        `c` - the console. May be `null`.
      See Also:
        `setConsole(com.xmlmind.util.Console)`

  - ### Method Detail

    - #### setConsole

          public void setConsole​(Console c)

      Specifies the console on which messages issued during processing are to be displayed.
      Parameters:
        `c` - the console; may be `null`, in which case messages are displayed on `System.err` and `System.out`
      See Also:
        `getConsole()`

    - #### getConsole

          public ConsoleHelper getConsole()

      Returns the console on which messages issued during preprocessing are to be displayed.
      See Also:
        `setConsole(com.xmlmind.util.Console)`

    - #### setIdList

          public void setIdList​(String[] list)

      Specifies the ID-list used by this processor.

      By default, it's `DOCBOOK5_ID_LIST`.

      See Also:
        `getIdList()`

    - #### getIdList

          public String[] getIdList()

      Returns the ID-list used by this processor.
      See Also:
        `setIdList(java.lang.String[])`

    - #### setIdRefList

          public void setIdRefList​(String[] list)

      Specifies the IDREF-list used by this processor.

      By default, it's `DOCBOOK5_IDREF_LIST`.

      See Also:
        `getIdRefList()`

    - #### getIdRefList

          public String[] getIdRefList()

      Returns the IDREF-list used by this processor.
      See Also:
        `setIdRefList(java.lang.String[])`

    - #### setAutoSuffixSeparator

          public void setAutoSuffixSeparator​(String separ)

      Specifies the separator used for automatically generated suffixes.

      By defaut, it's `AUTO_SUFFIX_SEPARATOR`.

    - #### getAutoSuffixSeparator

          public String getAutoSuffixSeparator()

      Returns the separator used for automatically generated suffixes.

    - #### process

          public Boolean process​(Document doc)

      Process specified document.
      Parameters:
        `doc` - to be processed
      Returns:
        `null` if the document has been left unchanged (no `trans:*` attributes in it); `Boolean.TRUE` if the document has been successfully processed; `Boolean.FALSE` otherwise

    - #### main

          public static void main​(String[] args)