By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

CSS with Java

P: n/a
Hello

I have a Java Application and I get an HTML File as input into this
Applikation. I should now check if it is a valid CSS2 Stylesheet with
certain propertiers. Is there a tool which i can use for that verification?
Hope you can help me thanks in advance

Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Michael Heinzel wrote:
Hello

I have a Java Application and I get an HTML File as input into this
Applikation. I should now check if it is a valid CSS2 Stylesheet with
certain propertiers. Is there a tool which i can use for that verification?
Hope you can help me thanks in advance


2 messages, both from Austria, same unusual problem. Is this a class
assignment for a computer course?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2

P: n/a
In article <bp*************@ID-135917.news.uni-berlin.de>,
"Michael Heinzel" <er*****@gmx.at> wrote:
I should now check if it is a valid CSS2 Stylesheet with
certain propertiers. Is there a tool which i can use for that verification?


See http://www.w3.org/Style/CSS/SAC/

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 20 '05 #3

P: n/a
> See http://www.w3.org/Style/CSS/SAC/

Thanks a lot for your help, no its not for a course its for a project

bye
Jul 20 '05 #4

P: n/a
> See http://www.w3.org/Style/CSS/SAC/
I have problems to start the parsing of a CSS file I always get a exception.
What is wrong?

This is my Main class:
import org.apache.batik.css.parser.*;

public class CSSTest {

public static void main(String[] args) {

Parser test = new Parser();

try {

test.parseStyleSheet("<STYLE type=\"text/css\">" +

" H1 { color: blue }</STYLE>");

}catch (Exception ex) {System.out.println(ex.toString());}

and then i always get the followin exception
org.w3c.css.sac.CSSException: Unable to make sense of URL for connection

Do you know what i have done wrong? Would be great if you could help me

Thanks
Jul 20 '05 #5

P: n/a
Michael Heinzel wrote:
See http://www.w3.org/Style/CSS/SAC/


This is my Main class: import org.apache.batik.css.parser.*;

test.parseStyleSheet("<STYLE type=\"text/css\">" +
" H1 { color: blue }</STYLE>");

}catch (Exception ex) {System.out.println(ex.toString());}

and then i always get the followin exception
org.w3c.css.sac.CSSException: Unable to make sense of URL for
connection


A three-minute scan of the class documentation seems to strongly
suggest that parseStyleSheet is expecting a URL or a bytestream (such
as from a URL connection), not an arbitrary string containing both
HTML and CSS markup.

--
Joel.

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.