Source Code Cross Referenced for AttVal.java in  » IDE-Netbeans » visualweb.api.designer » org » w3c » tidy » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » org.w3c.tidy 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)AttVal.java   1.11 2000/08/16
003:         *
004:         */
005:
006:        package org.w3c.tidy;
007:
008:        /**
009:         *
010:         * Attribute/Value linked list node
011:         *
012:         * (c) 1998-2000 (W3C) MIT, INRIA, Keio University
013:         * See Tidy.java for the copyright notice.
014:         * Derived from <a href="http://www.w3.org/People/Raggett/tidy">
015:         * HTML Tidy Release 4 Aug 2000</a>
016:         *
017:         * @author  Dave Raggett <dsr@w3.org>
018:         * @author  Andy Quick <ac.quick@sympatico.ca> (translation to Java)
019:         * @version 1.0, 1999/05/22
020:         * @version 1.0.1, 1999/05/29
021:         * @version 1.1, 1999/06/18 Java Bean
022:         * @version 1.2, 1999/07/10 Tidy Release 7 Jul 1999
023:         * @version 1.3, 1999/07/30 Tidy Release 26 Jul 1999
024:         * @version 1.4, 1999/09/04 DOM support
025:         * @version 1.5, 1999/10/23 Tidy Release 27 Sep 1999
026:         * @version 1.6, 1999/11/01 Tidy Release 22 Oct 1999
027:         * @version 1.7, 1999/12/06 Tidy Release 30 Nov 1999
028:         * @version 1.8, 2000/01/22 Tidy Release 13 Jan 2000
029:         * @version 1.9, 2000/06/03 Tidy Release 30 Apr 2000
030:         * @version 1.10, 2000/07/22 Tidy Release 8 Jul 2000
031:         * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000
032:         */
033:
034:        public class AttVal extends Object implements  Cloneable {
035:
036:            public AttVal next;
037:            public Attribute dict;
038:            public Node asp;
039:            public Node php;
040:            public int delim;
041:            public String attribute;
042:            public String value;
043:
044:            public AttVal() {
045:                this .next = null;
046:                this .dict = null;
047:                this .asp = null;
048:                this .php = null;
049:                this .delim = 0;
050:                this .attribute = null;
051:                this .value = null;
052:            }
053:
054:            public AttVal(AttVal next, Attribute dict, int delim,
055:                    String attribute, String value) {
056:                this .next = next;
057:                this .dict = dict;
058:                this .asp = null;
059:                this .php = null;
060:                this .delim = delim;
061:                this .attribute = attribute;
062:                this .value = value;
063:            }
064:
065:            public AttVal(AttVal next, Attribute dict, Node asp, Node php,
066:                    int delim, String attribute, String value) {
067:                this .next = next;
068:                this .dict = dict;
069:                this .asp = asp;
070:                this .php = php;
071:                this .delim = delim;
072:                this .attribute = attribute;
073:                this .value = value;
074:            }
075:
076:            protected Object clone() {
077:                AttVal av = new AttVal();
078:                if (next != null) {
079:                    av.next = (AttVal) next.clone();
080:                }
081:                if (attribute != null)
082:                    av.attribute = attribute;
083:                if (value != null)
084:                    av.value = value;
085:                av.delim = delim;
086:                if (asp != null) {
087:                    av.asp = (Node) asp.clone();
088:                }
089:                if (php != null) {
090:                    av.php = (Node) php.clone();
091:                }
092:                av.dict = AttributeTable.getDefaultAttributeTable()
093:                        .findAttribute(this );
094:                return av;
095:            }
096:
097:            public boolean isBoolAttribute() {
098:                Attribute attribute = this .dict;
099:                if (attribute != null) {
100:                    if (attribute.attrchk == AttrCheckImpl.getCheckBool()) {
101:                        return true;
102:                    }
103:                }
104:
105:                return false;
106:            }
107:
108:            /* ignore unknown attributes for proprietary elements */
109:            public Attribute checkAttribute(Lexer lexer, Node node) {
110:                TagTable tt = lexer.configuration.tt;
111:
112:                if (this .asp == null && this .php == null)
113:                    this .checkUniqueAttribute(lexer, node);
114:
115:                Attribute attribute = this .dict;
116:                if (attribute != null) {
117:                    /* title is vers 2.0 for A and LINK otherwise vers 4.0 */
118:                    if (attribute == AttributeTable.attrTitle
119:                            && (node.tag == tt.tagA || node.tag == tt.tagLink))
120:                        lexer.versions &= Dict.VERS_ALL;
121:                    else if ((attribute.versions & Dict.VERS_XML) != 0) {
122:                        if (!(lexer.configuration.XmlTags || lexer.configuration.XmlOut))
123:                            Report.attrError(lexer, node, this .attribute,
124:                                    Report.XML_ATTRIBUTE_VALUE);
125:                    } else
126:                        lexer.versions &= attribute.versions;
127:
128:                    if (attribute.attrchk != null)
129:                        attribute.attrchk.check(lexer, node, this );
130:                } else if (!lexer.configuration.XmlTags
131:                        && !(node.tag == null)
132:                        && this .asp == null
133:                        && !(node.tag != null && ((node.tag.versions & Dict.VERS_PROPRIETARY) != 0)))
134:                    Report.attrError(lexer, node, this .attribute,
135:                            Report.UNKNOWN_ATTRIBUTE);
136:
137:                return attribute;
138:            }
139:
140:            /*
141:             the same attribute name can't be used
142:             more than once in each element
143:             */
144:            public void checkUniqueAttribute(Lexer lexer, Node node) {
145:                AttVal attr;
146:                int count = 0;
147:
148:                for (attr = this .next; attr != null; attr = attr.next) {
149:                    if (this .attribute != null
150:                            && attr.attribute != null
151:                            && attr.asp == null
152:                            && attr.php == null
153:                            && Lexer
154:                                    .wstrcasecmp(this .attribute, attr.attribute) == 0)
155:                        ++count;
156:                }
157:
158:                if (count > 0)
159:                    Report.attrError(lexer, node, this .attribute,
160:                            Report.REPEATED_ATTRIBUTE);
161:            }
162:
163:            /* --------------------- DOM ---------------------------- */
164:
165:            protected org.w3c.dom.Attr adapter = null;
166:
167:            protected org.w3c.dom.Attr getAdapter() {
168:                if (adapter == null) {
169:                    adapter = new DOMAttrImpl(this );
170:                }
171:                return adapter;
172:            }
173:            /* --------------------- END DOM ------------------------ */
174:
175:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.