Java Doc for XSPExpressionParser.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » language » markup » xsp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.language.markup.xsp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.components.language.markup.xsp.XSPExpressionParser

All known Subclasses:   org.apache.cocoon.components.language.markup.xsp.XSPExpressionFilter,
XSPExpressionParser
public class XSPExpressionParser (Code)
Parse XSP expressions. Expressions are embedded in attribute="value" and text elements and are expanded by the org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage.PreProcessFilter PreProcessFilter and have the form {#expression}. To prevent interpolation, use {##quote}, which results in the text {#quote}. An exception is thrown if the closing brace is missing.

The parser has a rudimentary understanding of expressions concerning nested braces and braces inside quoted strings and character constants. All valid Java, Javascript, and Python expressions can be used.

Example: <h1>Hello {#user.getName()}</h1> <img or src="image_{#image.getId()}"/>


version:
   SVN $Id: XSPExpressionParser.java 433543 2006-08-22 06:22:54Z crossley $


Inner Class :public static interface Handler
Inner Class :abstract protected static class State
Inner Class :protected static class QuotedState extends State

Field Summary
final protected static  StateEXPRESSION_CHAR_STATE
     The parser has encountered '\'' in EXPRESSION_STATE to start a character constant.
final protected static  StateEXPRESSION_SHELL_STATE
     The parser has encountered '`' (Backtick, ASCII 0x60) in EXPRESSION_STATE to start a Python string constant.
final protected static  StateEXPRESSION_STATE
     The parser is parsing an expression.
final protected static  StateEXPRESSION_STRING_STATE
     The parser has encountered '"' in EXPRESSION_STATE to start a string constant.
final protected static  StateLBRACE_STATE
     The parser has encountered '{' in TEXT_STATE .
final protected static  StateTEXT_HASH_STATE
     The parser has encountered '#' in LBRACE_STATE .
final protected static  StateTEXT_STATE
     The parser is parsing text.

Constructor Summary
public  XSPExpressionParser(Handler handler)
     Create a new XSPExpressionParser .

Method Summary
protected  voidappend(char ch)
    
public  voidconsume(String chars)
     Parses a character sequence.
public  voidconsume(char[] chars, int start, int length)
     Parses part of a character array.
protected  intdecrNesting()
    
public  voidflush(Locator locator, String description)
    
protected  StringgetExpression()
    
protected  StategetState()
    
protected  voidhandleExpression()
    
protected  voidhandleText()
    
protected  voidincrNesting()
    
protected  voidinitExpression()
    
protected  booleanisEscaped()
    
protected  voidsetEscaped(boolean escaped)
    
protected  voidsetState(State state)
    

Field Detail
EXPRESSION_CHAR_STATE
final protected static State EXPRESSION_CHAR_STATE(Code)
The parser has encountered '\'' in EXPRESSION_STATE to start a character constant.



EXPRESSION_SHELL_STATE
final protected static State EXPRESSION_SHELL_STATE(Code)
The parser has encountered '`' (Backtick, ASCII 0x60) in EXPRESSION_STATE to start a Python string constant.



EXPRESSION_STATE
final protected static State EXPRESSION_STATE(Code)
The parser is parsing an expression.



EXPRESSION_STRING_STATE
final protected static State EXPRESSION_STRING_STATE(Code)
The parser has encountered '"' in EXPRESSION_STATE to start a string constant.



LBRACE_STATE
final protected static State LBRACE_STATE(Code)
The parser has encountered '{' in TEXT_STATE .



TEXT_HASH_STATE
final protected static State TEXT_HASH_STATE(Code)
The parser has encountered '#' in LBRACE_STATE .



TEXT_STATE
final protected static State TEXT_STATE(Code)
The parser is parsing text.




Constructor Detail
XSPExpressionParser
public XSPExpressionParser(Handler handler)(Code)
Create a new XSPExpressionParser .
Parameters:
  handler - The handler for parsed text and expression fragments.




Method Detail
append
protected void append(char ch)(Code)



consume
public void consume(String chars) throws SAXException(Code)
Parses a character sequence.
Parameters:
  chars - The character sequence to parse
throws:
  SAXException - If there is an error in the sequence.



consume
public void consume(char[] chars, int start, int length) throws SAXException(Code)
Parses part of a character array.
Parameters:
  chars - The characters
Parameters:
  start - The start position in the character array
Parameters:
  length - The number of characters to parse
throws:
  SAXException - If there is an error in the sequence.



decrNesting
protected int decrNesting()(Code)



flush
public void flush(Locator locator, String description) throws SAXException(Code)
Flushes the parser
Parameters:
  locator - The SAX locator to determine the current parse position
Parameters:
  description - The description of the current parse context
throws:
  SAXException - If there is an error in the parsed text.A wrapped LocatedException contains the location of the parse error.



getExpression
protected String getExpression()(Code)



getState
protected State getState()(Code)



handleExpression
protected void handleExpression() throws SAXException(Code)



handleText
protected void handleText() throws SAXException(Code)



incrNesting
protected void incrNesting()(Code)



initExpression
protected void initExpression()(Code)



isEscaped
protected boolean isEscaped()(Code)



setEscaped
protected void setEscaped(boolean escaped)(Code)



setState
protected void setState(State state)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w_w__w._j__a__va2s__._c___o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.