- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 14 Sep 2005 15:14:19 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/html/parser In directory hutz:/tmp/cvs-serv9389/html/parser Modified Files: AttributeList.java Attributes.java ContentModel.java ContentModelState.java DTD.java DTDConstants.java DTDInputStream.java DTDParser.java Element.java Entity.java HTMLOutputStream.java JmlParser.java Parser.java ParserException.java PublicMapping.java Tag.java TagStack.java UnknownTag.java Log Message: >From Jean-Guilhem Rouel (again!) Reformatting of code Fix for bug 774 [1] (even more warnings) Fix for bug 768 [2] Modification of the soap output format (each warning list and error list has the URI it refers to) [1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=774 [2] http://www.w3.org/Bugs/Public/show_bug.cgi?id=768 Index: JmlParser.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/JmlParser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- JmlParser.java 8 Apr 2002 21:22:41 -0000 1.2 +++ JmlParser.java 14 Sep 2005 15:14:17 -0000 1.3 @@ -12,37 +12,37 @@ /** * A Simple wrapper class to keep the original code clean and be able to access - * package-private variables and methods. + * package-private variables and methods. */ public class JmlParser extends Parser { static final String defaultDTD = "html2-net"; String dtdname; - + public JmlParser() throws ParserException { this(defaultDTD); } - + public JmlParser(String dtdn) throws ParserException { - + dtdname=dtdn; // Load properties URL url = null; java.io.InputStream f = null; DTD.props = new Properties(); - + try { // url = getClass().getResource("../parser/Parser.properties"); //vm980826 url = JmlParser.class.getResource("Parser.properties"); //plh050597 f = url.openStream(); DTD.props.load(f); } catch (Exception e) { - String msg = + String msg = "Failed to load properties (url=" + url +")" + "(msg=" + e.getMessage() + ")"; //vm970808 //vm980826 - throw new ParserException(msg); - + throw new ParserException(msg); + //vm970808 System.out.println("Failed to load properties..."); //vm970808 e.printStackTrace(); //vm970808 System.exit(1); @@ -51,7 +51,7 @@ f.close(); } catch (Exception e) {} } - + // load the right DTD DTD.props = new Properties(DTD.props); try { @@ -64,11 +64,11 @@ //vm970808 System.exit(1); } } - + // public void parse(InputStream in) { // parse(in, dtd); // } - + public void parseFile(String filename) throws ParserException { InputStream in; try { @@ -80,21 +80,21 @@ try { long tm = System.currentTimeMillis(); parse(in, dtd); - + tm = System.currentTimeMillis() - tm; System.out.println("[Parsed " +filename+ " in " + tm + "ms]"); } catch(Exception e) { throw new ParserException("Uncaught error while parsing"); - + //vm970808 System.out.println("uncaught error while parsing"); //vm970808 e.printStackTrace(); //vm970808 System.exit(1); } - + } catch (Exception e) { throw new ParserException("Failed to open: " + filename); //vm970808 - + //vm970808 e.printStackTrace(); //vm970808 System.out.println("failed to open: " + filename); //vm970808 System.exit(1); Index: DTDParser.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/DTDParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DTDParser.java 13 Mar 2002 19:58:37 -0000 1.1 +++ DTDParser.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)DTDParser.java 1.3 95/05/22 + * @(#)DTDParser.java 1.3 95/05/22 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -30,9 +30,9 @@ /* * List of bug fixes: - * FIX1 - vm - 97.07.16. Attempt to fix the bug where a declared attribute value + * FIX1 - vm - 97.07.16. Attempt to fix the bug where a declared attribute value * could not be a number. - + */ @@ -45,7 +45,7 @@ * @modified Vincent Mallet 97.07.16 */ -public +public class DTDParser implements DTDConstants { DTD dtd; DTDInputStream in; @@ -176,7 +176,7 @@ return; } break; - + case -1: error("eof.arg", "comment"); in.replace--; @@ -196,7 +196,7 @@ * folded to lowercase. Returns false if no identifier is found. */ boolean parseExtendedIdentifier(boolean lower) { - + switch (ch) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': @@ -206,25 +206,25 @@ if (lower) { ch = 'a' + (ch - 'A'); } - + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': break; - + case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': break; - + default: return false; } - + while (true) { addString(ch); - + switch (ch = in.read()) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': @@ -234,25 +234,25 @@ if (lower) { ch = 'a' + (ch - 'A'); } - + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': - + case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - + case '.': case '-': break; - + default: return true; } } } - + /** * Parse a list of identifiers. */ @@ -275,7 +275,7 @@ skipParameterSpace(); break; - + default: if (!parseExtendedIdentifier(lower)) { error("expected", "identifier"); @@ -375,7 +375,7 @@ skipParameterSpace(); break; - + default: if (!parseIdentifier(lower)) { error("expected", "identifier"); @@ -525,7 +525,7 @@ // str.getBytes(0, str.length(), data, 0); // 1.1 style byte data[] = str.getBytes(); - + // deprecated 1.1 - jml - 2/26/97. dtd.defineEntity(nm, type, data); } else { @@ -557,7 +557,7 @@ e.next = parseContentModel(); if (e.next.type == m.type) { e.next = (ContentModel)e.next.content; - } + } for (; e.next != null ; e = e.next); } while (ch == m.type); } else { @@ -583,7 +583,7 @@ } break; } - + switch (ch) { case '?': case '*': @@ -681,7 +681,7 @@ //@@if (!parseIdentifier(false)) { if (!parseExtendedIdentifier(false)) { // FIX1 - end - vm 970707 - error("invalid", "attribute value"); + error("invalid", "attribute value"); return; } @@ -747,7 +747,7 @@ if (ch == '#') { ch = in.read(); if (!parseIdentifier(true)) { - error("invalid", "attribute value"); + error("invalid", "attribute value"); return; } skipParameterSpace(); @@ -793,7 +793,7 @@ } } } - + /** * Parse an ignored section until ]]> is encountered. */ @@ -918,9 +918,9 @@ switch (ch) { case ']': return; - + case '<': - switch (ch = in.read()) { + switch (ch = in.read()) { case '!': switch (ch = in.read()) { case '[': @@ -938,13 +938,13 @@ if (str.equals("element")) { parseElementDeclaration(); - + } else if (str.equals("entity")) { parseEntityDeclaration(); - + } else if (str.equals("attlist")) { parseAttlistDeclaration(); - + } else if (str.equals("doctype")) { parseDocumentTypeDeclaration(); @@ -1003,17 +1003,17 @@ DTD parse(InputStream in, DTD dtd) { this.dtd = dtd; this.in = new DTDInputStream(in, dtd); - + // : int tm = System.nowMillis(); //??dk long tm = System.currentTimeMillis(); //??dk - + ch = this.in.read(); parseSection(); - + if (ch != -1) { error("premature"); } - + // tm = System.nowMillis() - tm; //??dk tm = System.currentTimeMillis() - tm; if (Boolean.getBoolean("html.parser.DTDParser.verbose")) // -vm 970731 Index: AttributeList.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/AttributeList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AttributeList.java 13 Mar 2002 19:58:37 -0000 1.1 +++ AttributeList.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)AttributeList.java 1.1 95/04/23 + * @(#)AttributeList.java 1.1 95/04/23 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -164,7 +164,7 @@ attributeTypes.put("conref", new Integer(CONREF)); attributeTypes.put("implied", new Integer(IMPLIED)); } - + static int name2type(String nm) { Integer i = (Integer)attributeTypes.get(nm); return (i == null) ? CDATA : i.intValue(); Index: DTDConstants.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/DTDConstants.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DTDConstants.java 13 Mar 2002 19:58:37 -0000 1.1 +++ DTDConstants.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)DTDConstants.java 1.1 95/04/23 + * @(#)DTDConstants.java 1.1 95/04/23 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * Index: Tag.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/Tag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Tag.java 13 Mar 2002 19:58:37 -0000 1.1 +++ Tag.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)Tag.java 1.2 95/05/03 + * @(#)Tag.java 1.2 95/05/03 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -26,7 +26,7 @@ */ public interface Tag { - + /** * Return true if the tag is a block tag and not * a flow tag. Index: Parser.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/Parser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Parser.java 12 Jan 2004 12:28:28 -0000 1.3 +++ Parser.java 14 Sep 2005 15:14:17 -0000 1.4 @@ -1,5 +1,5 @@ /* - * @(#)Parser.java 1.10 95/06/07 + * @(#)Parser.java 1.10 95/06/07 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -25,16 +25,16 @@ * DTD.findElement, instead of DTD.getElement * FIX2 - vm - 97.07.07. Fixed the bug which made the parser case sensitive - * when parsing a literal element and looking for an end tag (ie for + * when parsing a literal element and looking for an end tag (ie for * the <style> literal </style> ) * FIX3 - vm - 97.08.20. Added explicit casts to convert char to byte in three * places, to get the code 1.1 compliant. * FIX4 - vm - 97.08.27. The parser was said to treat "\r\n" as "\n". Well - * in fact it treated "\n\r" as "\n", so I added "\r\n"->\n. We should + * in fact it treated "\n\r" as "\n", so I added "\r\n"->\n. We should * probably remove the "\n\r"->\n. - + */ package html.parser; @@ -58,8 +58,8 @@ * This means that the implementation sometimes deviates from * the SGML specification in favor of HTML.<p> * - * The parser treats \r and \r\n as \n. Newlines after starttags - * and before end tags are ignore just as specified in the SGML/HTML + * The parser treats \r and \r\n as \n. Newlines after starttags + * and before end tags are ignore just as specified in the SGML/HTML * specification. <p> * * @version 1.10, 07 Jun 1995 @@ -358,7 +358,7 @@ * the document's body context */ void errorContext() throws IOException { //??dk - + //startErrorRecovery(); for (; (stack != null) && (stack.tag != dtd.body) ; stack = stack.next) { handleEndTag(stack.tag); @@ -426,7 +426,7 @@ /** * Parse identifier. Uppercase characters are folded - * to lowercase when lower is true. Returns falsed if + * to lowercase when lower is true. Returns falsed if * no identifier is found. [55] 346:17 */ boolean parseIdentifier(boolean lower) throws IOException { //??dk @@ -541,7 +541,7 @@ case '\r': ln++; - if ((ch = in.read()) == '\n') { //vm + if ((ch = in.read()) == '\n') { //vm ch = in.read(); } break; @@ -566,7 +566,7 @@ // str.getBytes(0, b.length, b, 0); // 1.1 style byte b[] = str.getBytes(); - + // deprecated 1.1 - jml - 12/10/96. return b; } @@ -635,13 +635,13 @@ // match end tag if ((i >= 0) && (text[i++] == '<') && (text[i] == '/')) { - + // FIX2 - start - vm 970707 //@@ while ((++i < textpos) && (text[i] == stack.elem.name.charAt(j++))) ; while ((++i < textpos) && (Character.toUpperCase((char)text[i]) == Character.toUpperCase(stack.elem.name.charAt(j++)))) ; // FIX2 - end - vm 970707 - + if (i == textpos) { textpos -= (stack.elem.name.length() + 2); if ((textpos > 0) && (text[textpos-1] == '\n')) { @@ -652,7 +652,7 @@ } } break; - + case '&': byte data[] = parseEntityReference(); if (textpos + data.length > text.length) { @@ -663,14 +663,14 @@ System.arraycopy(data, 0, text, textpos, data.length); textpos += data.length; continue; - + case '\n': ln++; if ((ch = in.read()) == '\r') { ch = in.read(); - } + } break; - + case '\r': ln++; if ((ch = in.read()) == '\n') { //vm @@ -683,7 +683,7 @@ ch = in.read(); break; } - + // output character if (textpos == text.length) { byte newtext[] = new byte[text.length * 2]; @@ -742,7 +742,7 @@ ch = in.read(); if (delim< 0) { return getString(0); - } + } break; case '>': @@ -807,7 +807,7 @@ case '-': ch = in.read(); - if ((ch = in.read()) == '-') { + if ((ch = in.read()) == '-') { ch = in.read(); parseComment(); strpos = 0; @@ -871,8 +871,8 @@ // ugly, but avoid two calls to getString String els = null; //FIX1 - end - jml - 5/7/97. - - + + switch (ch = in.read()) { case '!': // Parse comment. [92] 391:7 @@ -1116,7 +1116,7 @@ continue; } break; - + case -1: return; @@ -1210,7 +1210,7 @@ public synchronized void parse(InputStream in, DTD dtd) throws IOException, Exception { //??dk if (in == null) //vm970811 if the input is empty, just dont do anything. return; //vm970811 - + this.in = in; this.dtd = dtd; this.ln = 1; @@ -1234,11 +1234,11 @@ ch1 = in.read(); } // now it should have found '<' - + while (!ready) { ch1 = in.read(); ch2 = in.read(); // 'D' or '-' or else it's wrong - + if (ch1 != '!') { ready = true; } else { @@ -1268,12 +1268,12 @@ } } } - + in.reset(); - - + + // end of added part by Sijtsche de Jong - + boolean mustClose = true; try { @@ -1350,7 +1350,7 @@ System.exit(1); } else { break; - } + } } // p.verbose = true; if (dtd == null) { Index: UnknownTag.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/UnknownTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- UnknownTag.java 13 Mar 2002 19:58:37 -0000 1.1 +++ UnknownTag.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)UnknownTag.java 1.3 95/05/03 + * @(#)UnknownTag.java 1.3 95/05/03 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * Index: ContentModel.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/ContentModel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ContentModel.java 13 Mar 2002 19:58:37 -0000 1.1 +++ ContentModel.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)ContentModel.java 1.2 95/04/24 + * @(#)ContentModel.java 1.2 95/04/24 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * Index: Entity.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/Entity.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Entity.java 13 Mar 2002 19:58:37 -0000 1.1 +++ Entity.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)Entity.java 1.2 95/05/03 + * @(#)Entity.java 1.2 95/05/03 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -153,10 +153,10 @@ entityTypes.put("MD", new Integer(MD)); entityTypes.put("SYSTEM", new Integer(SYSTEM)); } - + static int name2type(String nm) { Integer i = (Integer)entityTypes.get(nm); return (i == null) ? CDATA : i.intValue(); } } - + Index: PublicMapping.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/PublicMapping.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PublicMapping.java 13 Mar 2002 19:58:37 -0000 1.1 +++ PublicMapping.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)PublicMapping.java 1.1 95/04/23 + * @(#)PublicMapping.java 1.1 95/04/23 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * Index: ContentModelState.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/ContentModelState.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ContentModelState.java 13 Mar 2002 19:58:37 -0000 1.1 +++ ContentModelState.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)ContentModelState.java 1.2 95/04/24 + * @(#)ContentModelState.java 1.2 95/04/24 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -84,7 +84,7 @@ case '&': { ContentModel m = (ContentModel)model.content; - + for (int i = 0 ; m != null ; i++, m = m.next) { if ((value & (1L << i)) == 0) { if (!m.empty()) { @@ -105,7 +105,7 @@ } return (next == null) || next.terminate(); } - + default: return false; } @@ -145,20 +145,20 @@ switch (model.type) { case '+': if (model.first(token)) { - return new ContentModelState(model.content, + return new ContentModelState(model.content, new ContentModelState(model, next, value + 1)).advance(token); } if (value != 0) { return next.advance(token); } break; - + case '*': if (model.first(token)) { return new ContentModelState(model.content, this).advance(token); } return next.advance(token); - + case '?': if (model.first(token)) { return new ContentModelState(model.content, next).advance(token); @@ -181,21 +181,21 @@ if (m.next == null) { return new ContentModelState(m, next).advance(token); } else { - return new ContentModelState(m, + return new ContentModelState(m, new ContentModelState(model, next, value + 1)).advance(token); } - } + } break; } case '&': { ContentModel m = (ContentModel)model.content; boolean complete = true; - + for (int i = 0 ; m != null ; i++, m = m.next) { if ((value & (1L << i)) == 0) { if (m.first(token)) { - return new ContentModelState(m, + return new ContentModelState(m, new ContentModelState(model, next, value | (1L << i))).advance(token); } if (!m.empty()) { @@ -205,10 +205,10 @@ } if (complete) { return next.advance(token); - } + } break; } - + default: if (model.content == token) { return next; Index: DTDInputStream.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/DTDInputStream.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DTDInputStream.java 13 Mar 2002 19:58:37 -0000 1.1 +++ DTDInputStream.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)DTDInputStream.java 1.1 95/04/23 + * @(#)DTDInputStream.java 1.1 95/04/23 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -92,7 +92,7 @@ stack.push(new Integer(ch)); stack.push(this.in); this.in = in; - try { //??dk + try { //??dk ch = in.read(); } catch (IOException e) { System.out.println("DTDInputStream::push : IOException"); @@ -196,7 +196,7 @@ } return '\n'; - + case -1: if (stack.size() > 0) { in = (InputStream)stack.pop(); Index: DTD.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/DTD.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DTD.java 13 Mar 2002 19:58:37 -0000 1.1 +++ DTD.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)DTD.java 1.8 95/06/07 + * @(#)DTD.java 1.8 95/06/07 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -102,7 +102,7 @@ * Get an element by name. * * @return null if the element does not exists - */ + */ public Element findElement(String name) { return (Element)elementHash.get(name); } @@ -139,7 +139,7 @@ byte data[] = {(byte)(ch & 0xFF)}; defineEntity(name, type, data); } - + /** * Define an element. */ Index: Attributes.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/Attributes.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Attributes.java 13 Mar 2002 19:58:37 -0000 1.1 +++ Attributes.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)Attributes.java 1.1 95/04/23 + * @(#)Attributes.java 1.1 95/04/23 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -116,8 +116,8 @@ /** * Get an int attribute value. */ - - public synchronized int getInt(String attrname, int def) + + public synchronized int getInt(String attrname, int def) throws NumberFormatException { String value = get(attrname); @@ -125,7 +125,7 @@ return def; return Integer.parseInt(value); } - + /** * Append an attribute value. */ Index: Element.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/Element.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Element.java 13 Mar 2002 19:58:37 -0000 1.1 +++ Element.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)Element.java 1.1 95/04/23 + * @(#)Element.java 1.1 95/04/23 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -139,7 +139,7 @@ * Print (for debugging only). */ public void print() { - System.out.print("<!ELEMENT " + name + + System.out.print("<!ELEMENT " + name + (oStart ? " O" : " -") + (oEnd ? " O " : " - ")); switch (type) { Index: TagStack.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/TagStack.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TagStack.java 13 Mar 2002 19:58:37 -0000 1.1 +++ TagStack.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)TagStack.java 1.3 95/05/01 + * @(#)TagStack.java 1.3 95/05/01 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -118,8 +118,8 @@ * Convert to a string. */ public String toString() { - return (next == null) ? - "<" + tag.getElement().getName() + ">" : + return (next == null) ? + "<" + tag.getElement().getName() + ">" : next + " <" + tag.getElement().getName() + ">"; } } Index: ParserException.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/ParserException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ParserException.java 8 Apr 2002 21:22:41 -0000 1.2 +++ ParserException.java 14 Sep 2005 15:14:17 -0000 1.3 @@ -16,14 +16,14 @@ * @version $Revision$ */ public class ParserException extends Exception { - + /** * Create a new ParserException */ public ParserException() { super(); } - + /** * Create a new ParserException * @param message the error message Index: HTMLOutputStream.java =================================================================== RCS file: /sources/public/2002/css-validator/html/parser/HTMLOutputStream.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HTMLOutputStream.java 13 Mar 2002 19:58:37 -0000 1.1 +++ HTMLOutputStream.java 14 Sep 2005 15:14:17 -0000 1.2 @@ -1,5 +1,5 @@ /* - * @(#)HTMLOutputStream.java 1.3 95/05/03 + * @(#)HTMLOutputStream.java 1.3 95/05/03 * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * @@ -102,7 +102,7 @@ } } } - + /** * Write a text character. */ @@ -132,7 +132,7 @@ void writeTag(Element elem, Attributes atts) throws IOException { //??dk write('<'); write(elem.getName()); - + if (atts != null) { int natts = atts.length(); for (int i = 0 ; i < natts ; i++) {
Received on Wednesday, 14 September 2005 15:16:19 UTC