Java Doc for JspxSerializer.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » insync » markup » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.insync.markup 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.modules.visualweb.insync.markup.JspxSerializer

JspxSerializer
public class JspxSerializer extends BaseMarkupSerializer (Code)
Serialize a JSPX DOM. Similar to org.apache.xerces.serialize.XMLSerializer but follows JSPX (and some XHTML) rules; in particular, it will not mimimize <script></script> into <script/>. Unlike XHTML however is does not mash attribute names into lowercase since for example the "contentType" attribute needs to have an uppercase T.

This code reuses the XMLSerializer code, but it has to duplicate a couple of methods since the ability to conditionally minimize elements was not available in the methods that were hardcoded to emit /> at the end of empty elements. Some other methods that were referenced by these duplicated methods but were private were also inlined.



Field Summary
final protected static  booleanDEBUG
    
final protected static  StringPREFIX
    
protected  NamespaceSupportfLocalNSBinder
    
protected  NamespaceSupportfNSBinder
    
protected  booleanfNamespaces
     Controls whether namespace fixup should be performed during the serialization.
protected  SymbolTablefSymbolTable
    

Constructor Summary
public  JspxSerializer()
     Constructs a new serializer.
public  JspxSerializer(OutputFormat format)
     Constructs a new serializer.
public  JspxSerializer(Writer writer, OutputFormat format)
     Constructs a new serializer that writes to the specified writer using the specified output format.
public  JspxSerializer(OutputStream output, OutputFormat format)
     Constructs a new serializer that writes to the specified output stream using the specified output format.

Method Summary
public static  booleancanMinimizeTag(String tagName)
     Report whether the given tagName represents an XHTML element that can/must be minimized.
protected  voidcheckUnboundNamespacePrefixedNode(Node node)
     DOM Level 3: Check a node to determine if it contains unbound namespace prefixes.
public  voidendElement(String namespaceURI, String localName, String rawName)
    
public  voidendElement(String tagName)
    
public  voidendElementIO(String namespaceURI, String localName, String rawName)
    
protected  StringgetEntityRef(int ch)
    
protected  voidprintEscaped(String source)
    
final  voidprintHex(int ch)
    
protected  voidprintText(String text, boolean preserveSpace, boolean unescaped)
    
protected  voidprintText(char[] chars, int start, int length, boolean preserveSpace, boolean unescaped)
    
protected  voidprintXMLChar(int ch)
    
public  booleanreset()
    
protected  voidserializeElement(Element elem)
     Called to serialize a DOM element.
public  voidsetNamespaces(boolean namespaces)
     This methods turns on namespace fixup algorithm during DOM serialization.
public  voidsetOutputFormat(OutputFormat format)
    
protected  voidstartDocument(String rootTagName)
     Called to serialize the document's DOCTYPE by the root element. The document type declaration must name the root element, but the root element is only known when that element is serialized, and not at the start of the document.

This method will check if it has not been called before ( JspxSerializer._started ), will serialize the document type declaration, and will serialize all pre-root comments and PIs that were accumulated in the document (see JspxSerializer.serializePreRoot ).

public  voidstartElement(String namespaceURI, String localName, String rawName, Attributes attrs)
    
public  voidstartElement(String tagName, AttributeList attrs)
    

Field Detail
DEBUG
final protected static boolean DEBUG(Code)



PREFIX
final protected static String PREFIX(Code)



fLocalNSBinder
protected NamespaceSupport fLocalNSBinder(Code)
stores all namespace bindings on the current element



fNSBinder
protected NamespaceSupport fNSBinder(Code)
stores namespaces in scope



fNamespaces
protected boolean fNamespaces(Code)
Controls whether namespace fixup should be performed during the serialization. NOTE: if this field is set to true the following fields need to be initialized: fNSBinder, fLocalNSBinder, fSymbolTable, XMLSymbols.EMPTY_STRING, fXmlSymbol, fXmlnsSymbol



fSymbolTable
protected SymbolTable fSymbolTable(Code)
symbol table for serialization




Constructor Detail
JspxSerializer
public JspxSerializer()(Code)
Constructs a new serializer. The serializer cannot be used without calling JspxSerializer.setOutputCharStream or JspxSerializer.setOutputByteStream first.



JspxSerializer
public JspxSerializer(OutputFormat format)(Code)
Constructs a new serializer. The serializer cannot be used without calling JspxSerializer.setOutputCharStream or JspxSerializer.setOutputByteStream first.



JspxSerializer
public JspxSerializer(Writer writer, OutputFormat format)(Code)
Constructs a new serializer that writes to the specified writer using the specified output format. If format is null, will use a default output format.
Parameters:
  writer - The writer to use
Parameters:
  format - The output format to use, null for the default



JspxSerializer
public JspxSerializer(OutputStream output, OutputFormat format)(Code)
Constructs a new serializer that writes to the specified output stream using the specified output format. If format is null, will use a default output format.
Parameters:
  output - The output stream to use
Parameters:
  format - The output format to use, null for the default




Method Detail
canMinimizeTag
public static boolean canMinimizeTag(String tagName)(Code)
Report whether the given tagName represents an XHTML element that can/must be minimized. For example, "br" should always be minimized, whereas "textarea" should never be.
Parameters:
  tagName - the name of the tag to be checked. Should alwaysbe lowercase. true iff the tag should be minimized.



checkUnboundNamespacePrefixedNode
protected void checkUnboundNamespacePrefixedNode(Node node) throws IOException(Code)
DOM Level 3: Check a node to determine if it contains unbound namespace prefixes.
Parameters:
  node - The node to check for unbound namespace prefices



endElement
public void endElement(String namespaceURI, String localName, String rawName) throws SAXException(Code)



endElement
public void endElement(String tagName) throws SAXException(Code)



endElementIO
public void endElementIO(String namespaceURI, String localName, String rawName) throws IOException(Code)



getEntityRef
protected String getEntityRef(int ch)(Code)



printEscaped
protected void printEscaped(String source) throws IOException(Code)



printHex
final void printHex(int ch) throws IOException(Code)
Escapes chars



printText
protected void printText(String text, boolean preserveSpace, boolean unescaped) throws IOException(Code)



printText
protected void printText(char[] chars, int start, int length, boolean preserveSpace, boolean unescaped) throws IOException(Code)



printXMLChar
protected void printXMLChar(int ch) throws IOException(Code)
print text data



reset
public boolean reset()(Code)



serializeElement
protected void serializeElement(Element elem) throws IOException(Code)
Called to serialize a DOM element. Equivalent to calling JspxSerializer.startElement , JspxSerializer.endElement and serializing everything inbetween, but better optimized.



setNamespaces
public void setNamespaces(boolean namespaces)(Code)
This methods turns on namespace fixup algorithm during DOM serialization.
See Also:   org.w3c.dom.ls.DOMSerializer
Parameters:
  namespaces -



setOutputFormat
public void setOutputFormat(OutputFormat format)(Code)



startDocument
protected void startDocument(String rootTagName) throws IOException(Code)
Called to serialize the document's DOCTYPE by the root element. The document type declaration must name the root element, but the root element is only known when that element is serialized, and not at the start of the document.

This method will check if it has not been called before ( JspxSerializer._started ), will serialize the document type declaration, and will serialize all pre-root comments and PIs that were accumulated in the document (see JspxSerializer.serializePreRoot ). Pre-root will be serialized even if this is not the first root element of the document.




startElement
public void startElement(String namespaceURI, String localName, String rawName, Attributes attrs) throws SAXException(Code)



startElement
public void startElement(String tagName, AttributeList attrs) throws SAXException(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.