org.apache.cocoon.components.language.markup.xsp
Class XSLTExtension

java.lang.Object
  extended by org.apache.cocoon.components.language.markup.xsp.XSLTExtension

public class XSLTExtension
extends Object

This class is used as a XSLT extension class. It is used by the XSP generation stylesheet to escape XML characters to make a valid Java strings.

Version:
CVS $Id: XSLTExtension.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Vadim Gritsenko

Constructor Summary
XSLTExtension()
           
 
Method Summary
 String escape(String string)
           
 String escapeJava(String string)
          This method used by Java XSP core logicsheet.
static String escapeJavaString(String string)
          Escapes '"' and '\' characters in a String (add a '\' before them) so that it can be inserted in java source + quote special characters as UTF-8
static String escapeString(String string)
          Quote special characters as UTF-8 TC: It's code duplication but that way we don't have to iterate through the StringBuffer twice
 String prefix(String string)
          Counts amount of spaces in the input line from the beginning to the first new line symbol and returns a string with this amount of spaces.
 String suffix(String string)
          Counts amount of spaces in the input line from the end to the last new line symbol and returns a string with this amount of spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLTExtension

public XSLTExtension()
Method Detail

escapeJavaString

public static String escapeJavaString(String string)
Escapes '"' and '\' characters in a String (add a '\' before them) so that it can be inserted in java source + quote special characters as UTF-8


escapeString

public static String escapeString(String string)
Quote special characters as UTF-8 TC: It's code duplication but that way we don't have to iterate through the StringBuffer twice


escape

public String escape(String string)
See Also:
escapeString(String)

escapeJava

public String escapeJava(String string)
This method used by Java XSP core logicsheet.

See Also:
escapeJavaString(String)

prefix

public String prefix(String string)
Counts amount of spaces in the input line from the beginning to the first new line symbol and returns a string with this amount of spaces. Used by the Python XSP core logicsheet.


suffix

public String suffix(String string)
Counts amount of spaces in the input line from the end to the last new line symbol and returns a string with this amount of spaces. Used by the Python XSP core logicsheet.



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.