W3C home > Mailing lists > Public > www-validator-css@w3.org > July 2002

Validator and Mobile Profile (also building with JBuilder)

From: David Berry <david.t.berry@ntlworld.com>
Date: Thu, 4 Jul 2002 05:59:00 -0400 (EDT)
Message-ID: <3D241C64.6060105@ntlworld.com>
To: www-validator-css@w3.org




Ok new attempt to re-send from a different e-mail address as mail from
my work address david.berry@3glab.com does not seem to be getting through,
even though I have subscribed to the mailing list.

== Mobile Profile ==

What is the state of the mobile profile. I saw that its use was commented
out in the StyleSheetCom.java file. I was able to get it to work though with
just putting the code back in. I did also modify the Mobile.properties file so
that display used org.w3c.css.properties.CssDisplayCSS2.

== Getting the code to build ==

I have downloaded the CSS validator source code from the CVS
repository. I have managed to get it to build in JBuilder, using
JDK 1.4 though I did have to make a couple of changes as JBuilder
likes to suck in all of the java files included in the directory.

The changes were,

** org/w3c/css/util/InterruptedGetException.java **

Added package name to the top of this file, ie

package org.w3c.css.util;

** org/w3c/css/table/Css2Style.java **

Uncommented the lines containing the methods, getColumnSpan()
and getColumnSpanATSC(), as they were being called in
org/w3c/css/table/ColumnSpanATSC.java

I'm currently using version the version of Xerces supplied with JBuilder
and the Tomcat 3.2 servlet jar. I have also tried using Xerces 2.0.1
class files as downloaded from the apache web site.

I am passing the command line arguments, as

-Djava.protocol.handler.pkgs="org.w3c.www.protocol|sun.net.www.protocol"
-css2 http://www.w3c.org/

As found in the validator.bat file.

I have also tried dropping the -css2 and -the -Djava command. Every time
I try to run the application I get a null pointer exception. In
org.w3c.css.css.StyleSheetGenerator2.getDocumentName().

   From stepping through in the debugger the HtmlParser
encounters an XMLInputException when it is run.

It then calls through to notifyEnd for the HtmlParserListener in
StyleSheetCom. This ends up passing a null contenttype parameter
to generate the StyleSheetGenerator2 and gives a null pointer exception.
"contenttype" is declared in StyleSheetCom.java and only used in
noitifyEnd, but it is never set. I suspect that the parameter to
be passed here, is in fact "contentType" which is passed into
notifyEnd().

Stack trace is,

java.lang.NullPointerException
      at org.w3c.css.css.StyleSheetGenerator2.getDocumentName(StyleSheetGenerator2.java:397)
      at org.w3c.css.css.StyleSheetGenerator2.<init>(StyleSheetGenerator2.java:80)
      at org.w3c.css.css.StyleSheetCom.notifyEnd(StyleSheetCom.java:328)
      at html.tags.HtmlParser.run(HtmlParser.java:226)
      at org.w3c.css.css.StyleSheetCom.htmlRequest(StyleSheetCom.java:71)
      at org.w3c.css.css.StyleSheetCom.main(StyleSheetCom.java:254)

If I change contenttype to contentType it looks like everything runs
ok, plus the above listed changes to make it build.

Can someone let me know if the above changes are valid fixes?

== General questions on the repository ==

Are there some old java files directories in the repository that should
not be included in a build of the application. Hence my problem with building
the files in the table directory. Why were the methods commented out?

I'd also be interested in knowing which version is running on the W3C website,
and how it was built, including which versions of Xerces, servlet, and Sax
parser libraries for example. So that I can be sure of which versions of these
things I ought to be using.

Thanks for any help you can supply,

Cheers,
Dave

david.berry@3glab.com
david.t.berry@ntlworld.com
Received on Thursday, 11 July 2002 18:10:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:11 GMT