pmp.macro.lex
Class HTMLSpecialChars

java.lang.Object
  extended by pmp.AbstractMacro
      extended by pmp.macro.lex.HTMLSpecialChars

public class HTMLSpecialChars
extends AbstractMacro

Converts special characters to XML/HTML entities.

Recognized special characters:

Title: PMP: Macroprocessor

Description: Java macroprocessor

Copyright: Copyright (c) 2005

Version:
1.0
Author:
Luděk Hlaváček

Field Summary
static java.lang.String ENT_COMPAT
          Translate only double quotes.
static java.lang.String ENT_NOQUOTES
          Do not translate single or double quotes.
static java.lang.String ENT_QUOTES
          Translate both single and double quotes.
static int PARAMS_REQUIRED
           
 
Constructor Summary
HTMLSpecialChars()
           
 
Method Summary
 java.lang.String run(Macroprocessor mp, java.lang.String[] args)
          Main method of macro.
 
Methods inherited from class pmp.AbstractMacro
getRequiredParams, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMS_REQUIRED

public static final int PARAMS_REQUIRED
See Also:
Constant Field Values

ENT_COMPAT

public static final java.lang.String ENT_COMPAT
Translate only double quotes.

See Also:
Constant Field Values

ENT_NOQUOTES

public static final java.lang.String ENT_NOQUOTES
Do not translate single or double quotes.

See Also:
Constant Field Values

ENT_QUOTES

public static final java.lang.String ENT_QUOTES
Translate both single and double quotes.

See Also:
Constant Field Values
Constructor Detail

HTMLSpecialChars

public HTMLSpecialChars()
Method Detail

run

public java.lang.String run(Macroprocessor mp,
                            java.lang.String[] args)
Description copied from class: AbstractMacro
Main method of macro. This method is called when this macro is invoked. All subclasses must imlement this method

Specified by:
run in class AbstractMacro
Parameters:
mp - reference to Macroprocessor
args - parameters of macro. In args[0] is stored name of macro. Subclasses are free to modify this array.
Returns:
result of the macro as String