W3C home > Mailing lists > Public > www-style@w3.org > September 2002

How to use SAC Parser to parse style attribute

From: Sam Cheung <sy_cheung2@yahoo.com>
Date: Wed, 28 Aug 2002 02:26:15 -0400 (EDT)
Message-ID: <20020828062614.11767.qmail@web14910.mail.yahoo.com>
To: www-style@w3.org



Hi, 

Could someone please tell me how to use SAC to
parse style attribute (e.g. <table
style="MARGIN-BOTTOM: 0px">).

I try parseStyleDeclaration() of the Parser, but I got
a NullPointerException (I use SteadyState as my CSS
Parser):

CSSStyleDeclaration style3 =
			parser.parseStyleDeclaration(
					new InputSource("MARGIN-BOTTOM: 0px"));

CSSStyleRule styleRule = (CSSStyleRule) rule;
		

ava.lang.NullPointerException
	at
com.steadystate.css.parser.SACParserTokenManager.getNextToken(SACParserTokenManager.java:3417)
	at
com.steadystate.css.parser.SACParser.jj_consume_token(SACParser.java:2450)
	at
com.steadystate.css.parser.SACParser.styleDeclaration(SACParser.java:1557)
	at
com.steadystate.css.parser.SACParser.parseStyleDeclaration(SACParser.java:72)
	at
com.steadystate.css.parser.CSSOMParser.parseStyleDeclaration(CSSOMParser.java:84)
	at
com.steadystate.css.parser.CSSOMParser.parseStyleDeclaration(CSSOMParser.java:74)
	at pir.css.TestDOM_1.main(TestDOM_1.java:140)


Thanks a lot for any suggestion.

Sam


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
Received on Wednesday, 4 September 2002 08:39:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:16 GMT