Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
73ff070e
Commit
73ff070e
authored
10 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
HTML solutions file
parent
00080822
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sda1/Etest/solutions.html
+49
-0
49 additions, 0 deletions
Sda1/Etest/solutions.html
with
49 additions
and
0 deletions
Sda1/Etest/solutions.html
0 → 100644
+
49
−
0
View file @
73ff070e
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
Solutions
</title>
<meta
charset=
"UTF-8"
/>
</head>
<body><h1>
Test solutions
</h1><h2>
Test 3
</h2><h3>
Well-formed and
valid
</h3><p>
“well-formed” XML document instances obey the constraints of
well-formedness like:
</p><ul>
<li>
Proper nesting of elements
</li>
<li>
Exactly one root element
</li>
<li>
quoting of attribute values. (Unlike HTML in its SGML variant
allowing e.g.
<code>
<
img align=top
>
</code>
)
</li>
</ul><p>
“valid” XML document instances are “well-formed” and in
addition conform to a grammar being expressed as e.g. XML Schema, RelaxNG or
DTD.
</p><h3>
Doodle poll XML data
</h3><p><a
href=
"/ilias/data/iliasclient1/assessment/4018/1952/solution/doodle.zip"
>
doodle.zip
</a>
offers a solution.
</p><h2>
Test 4
</h2><p><a
href=
"/iliasData/goik/Xml2xml_Solutiondsadhiukfhsr65RRY_o/xml2xml_solution.zip"
>
xml2xml_solution.zip
</a>
contains an Eclipse project based reference implementation.
</p><h2>
Test
5
</h2><p><a
href=
"/iliasData/goik/book2html_Solution_idzhsfc5-6FFsfK/book2Html_solution.zip"
>
book2Html_solution.zip
</a>
contains an Eclipse project based reference implementation.
</p><h3>
XML book
instances
</h3><h2>
Test 6
</h2><h3>
Printing element names
</h3><p>
The
implemented method
<code>
startElement
</code>
has got wrong signature.
According to the Java 1.7 API documentation
<a
href=
"http://docs.oracle.com/javase/7/docs/api/org/xml/sax/helpers/DefaultHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)"
>
startElement
</a>
should have
<code>
org.xml.sax.Attributes
</code>
as its last argument. But in
the given code the last argument is of type
<code>
java.util.jar.Attributes
</code>
. Hence the handler does not redefine
the corresponding parent class method
<a
href=
"http://docs.oracle.com/javase/7/docs/api/org/xml/sax/helpers/DefaultHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)"
>
startElement
</a>
but instead adds an overloaded method. At runtime the SAX parser will call
the (dummy) method being defined in the parent class DefaultHandler thus
completely ignoring the intended implementation.
</p><p>
Replacing
<code>
import java.util.jar.Attributes
</code>
by
<code>
import
org.xml.sax.Attributes
</code>
solves the problem.
</p><p>
An
<code>
@Override
</code>
annotation would have flagged this apparent mistake
as a Java compile time error.
</p><h3>
SAX html creation (2 parts)
</h3><p><a
href=
"/iliasData/goik/sax_hahHzh66-99DDDwsq/jidHFced74_98GFWWs/saxmemo2html_solution.zip"
>
saxmemo2html_solution.zip
</a>
contains an Eclipse project based reference implementation.
</p><h2>
Test
7
</h2><h3>
Jdom tables, 2 parts
</h3><p><a
href=
"/iliasData/goik/jdomtable_Solution_65RRR_fkweFGjhuiz/jdomtable_solution.zip"
>
jdomtable_solution.zip
</a>
contains a Maven reference implementation.
</p></body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment