Java Doc for Parser.java in  » IDE-Netbeans » visualweb.api.designer » org » w3c » css » sac » 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.w3c.css.sac 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.css.sac.Parser

Parser
public interface Parser (Code)
Basic interface for CSS (Simple API for CSS) parsers.

All CSS parsers must implement this basic interface: it allows applications to register handlers for different types of events and to initiate a parse from a URI, or a character stream.

All CSS parsers must also implement a zero-argument constructor (though other constructors are also allowed).

CSS parsers are reusable but not re-entrant: the application may reuse a parser object (possibly with a different input source) once the first parse has completed successfully, but it may not invoke the parse() methods recursively within a parse.


version:
   $Revision$
author:
   Philippe Le Hegaret
See Also:   DocumentHandler
See Also:   ErrorHandler
See Also:   InputSource




Method Summary
public  StringgetParserVersion()
     Returns a string about which CSS language is supported by this parser.
public  booleanparsePriority(InputSource source)
     Parse a CSS priority value (e.g.
public  LexicalUnitparsePropertyValue(InputSource source)
     Parse a CSS property value.
public  voidparseRule(InputSource source)
     Parse a CSS rule.
public  SelectorListparseSelectors(InputSource source)
     Parse a comma separated list of selectors.
public  voidparseStyleDeclaration(InputSource source)
     Parse a CSS style declaration (without '{' and '}').
public  voidparseStyleSheet(InputSource source)
     Parse a CSS document.

The application can use this method to instruct the CSS parser to begin parsing an CSS document from any valid input source (a character stream, a byte stream, or a URI).

Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional CSS document).

public  voidparseStyleSheet(String uri)
     Parse a CSS document from a URI.

This method is a shortcut for the common case of reading a document from a URI.

public  voidsetConditionFactory(ConditionFactory conditionFactory)
    
public  voidsetDocumentHandler(DocumentHandler handler)
     Allow an application to register a document event handler.
public  voidsetErrorHandler(ErrorHandler handler)
     Allow an application to register an error event handler.
public  voidsetLocale(Locale locale)
     Allow an application to request a locale for errors and warnings.

CSS parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a CSS exception.

public  voidsetSelectorFactory(SelectorFactory selectorFactory)
    



Method Detail
getParserVersion
public String getParserVersion()(Code)
Returns a string about which CSS language is supported by this parser. For CSS Level 1, it returns "CSS1", for CSS Level 2, it returns "CSS2". For CSS Level 3, it returns "CSS3", etc. Note that a "CSSx" parser can return lexical unit other than those allowed by CSS Level x but this usage is not recommended.



parsePriority
public boolean parsePriority(InputSource source) throws CSSException, IOException(Code)
Parse a CSS priority value (e.g. "!important").
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



parsePropertyValue
public LexicalUnit parsePropertyValue(InputSource source) throws CSSException, IOException(Code)
Parse a CSS property value.
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



parseRule
public void parseRule(InputSource source) throws CSSException, IOException(Code)
Parse a CSS rule.
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



parseSelectors
public SelectorList parseSelectors(InputSource source) throws CSSException, IOException(Code)
Parse a comma separated list of selectors.
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



parseStyleDeclaration
public void parseStyleDeclaration(InputSource source) throws CSSException, IOException(Code)
Parse a CSS style declaration (without '{' and '}').
Parameters:
  styleValue - The declaration.
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



parseStyleSheet
public void parseStyleSheet(InputSource source) throws CSSException, IOException(Code)
Parse a CSS document.

The application can use this method to instruct the CSS parser to begin parsing an CSS document from any valid input source (a character stream, a byte stream, or a URI).

Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional CSS document). Once a parse is complete, an application may reuse the same Parser object, possibly with a different input source.


Parameters:
  source - The input source for the top-level of theCSS document.
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.
See Also:   InputSource
See Also:   Parser.parseStyleSheet(java.lang.String)
See Also:   Parser.setDocumentHandler
See Also:   Parser.setErrorHandler



parseStyleSheet
public void parseStyleSheet(String uri) throws CSSException, IOException(Code)
Parse a CSS document from a URI.

This method is a shortcut for the common case of reading a document from a URI. It is the exact equivalent of the following:

 parse(new InputSource(uri));
 

The URI must be fully resolved by the application before it is passed to the parser.


Parameters:
  uri - The URI.
exception:
  CSSException - Any CSS exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.
See Also:   Parser.parseStyleSheet(InputSource)
See Also:   



setConditionFactory
public void setConditionFactory(ConditionFactory conditionFactory)(Code)



setDocumentHandler
public void setDocumentHandler(DocumentHandler handler)(Code)
Allow an application to register a document event handler.

If the application does not register a document handler, all document events reported by the CSS parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

Applications may register a new or different handler in the middle of a parse, and the CSS parser must begin using the new handler immediately.


Parameters:
  handler - The document handler.
See Also:   DocumentHandler



setErrorHandler
public void setErrorHandler(ErrorHandler handler)(Code)
Allow an application to register an error event handler.

If the application does not register an error event handler, all error events reported by the CSS parser will be silently ignored, except for fatalError, which will throw a CSSException (this is the default behaviour implemented by HandlerBase).

Applications may register a new or different handler in the middle of a parse, and the CSS parser must begin using the new handler immediately.


Parameters:
  handler - The error handler.
See Also:   ErrorHandler
See Also:   CSSException



setLocale
public void setLocale(Locale locale) throws CSSException(Code)
Allow an application to request a locale for errors and warnings.

CSS parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a CSS exception. Applications may not request a locale change in the middle of a parse.


Parameters:
  locale - A Java Locale object.
exception:
  CSSException - Throws an exception(using the previous or default locale) if the requested locale is not supported.
See Also:   CSSException
See Also:   CSSParseException



setSelectorFactory
public void setSelectorFactory(SelectorFactory selectorFactory)(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.