CSS with Java

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Heinzel

    CSS with Java

    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



  • Brian

    #2
    Re: CSS with Java

    Michael Heinzel wrote:[color=blue]
    > 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[/color]

    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

    Comment

    • Henri Sivonen

      #3
      Re: CSS with Java

      In article <bp5acd$1ljhbq$ 1@ID-135917.news.uni-berlin.de>,
      "Michael Heinzel" <ernte23@gmx.at > wrote:
      [color=blue]
      > 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?[/color]

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

      --
      Henri Sivonen
      hsivonen@iki.fi

      Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

      Comment

      • Michael Heinzel

        #4
        Re: CSS with Java

        > 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


        Comment

        • Michael Heinzel

          #5
          Re: CSS with Java

          > 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.bati k.css.parser.*;

          public class CSSTest {

          public static void main(String[] args) {

          Parser test = new Parser();

          try {

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

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

          }catch (Exception ex) {System.out.pri ntln(ex.toStrin g());}

          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


          Comment

          • Joel Shepherd

            #6
            Re: CSS with Java

            Michael Heinzel wrote:[color=blue][color=green]
            >> See http://www.w3.org/Style/CSS/SAC/[/color]
            >
            > This is my Main class: import org.apache.bati k.css.parser.*;
            >
            > test.parseStyle Sheet("<STYLE type=\"text/css\">" +
            > " H1 { color: blue }</STYLE>");
            >
            > }catch (Exception ex) {System.out.pri ntln(ex.toStrin g());}
            >
            > and then i always get the followin exception
            > org.w3c.css.sac .CSSException: Unable to make sense of URL for
            > connection[/color]

            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.

            Comment

            Working...