Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

US Constitutional Amendments A large HTML outline conversion where text editor techniques and Regular Expressions prove their time saving powers. Or . . . practice

US Constitutional Amendments
A large HTML outline conversion where text editor techniques and Regular Expressions prove their time saving powers. Or... practice at techniques so you can be more productive in the future. If you struggled with HTML lists to make an outline then this is will be a monster you may not want to face at this time...
Create an HTML page
Use an XHTML doctype header:
Title the page (you should always have a document title.) Use the title Amendments to the Constitution of the USA. Also use a headline tag to title the page visually (in the body.) Also the required head, body, html tags. Search and find the phrase A well regulated Militia using your editor and make it bold (use strong not b, never use b.)
Validate the page then continue to the next task; better to not let problems build up!
Use this text file
this text file is the source text for the conversion.
HR (can be done in 1 search & replace)
Horizontal Rule line dividing the amendments from the title part of the page.
Search and Replace All Amendment with Amendment but add some new lines and HR to the replacement. A common technique! If this is new to you, this is as big as you learning to run! (slightly overstated.)
top link (can be done with 1 replace +2 html inserts)
Each amendment shall have a link labeled TOP at its bottom which jumps to the top of the page.
Verify if you are unsure of where you placed the A tag. Yes, you'll also need an anchor ID for the top of the page so the browser knows where to scroll to.(hint: look up A tag in a reference. )
Paste probably faster... but for practice-- do a search and replace! Since top links go at the end of each Amendment... So replace Amendment with itself again but add the html above the word in the replacement. The last Amendment will lack a link because there is no Amendment word at the bottom of the page so that one you will have to manually do. Common situation: replacing 100s in a single move but having to manually fix a few that didn't work; still saves labor!
External Links (5 inspections +5 replaces +2 intermediate replaces)
Every occurrence in the document of the branches of government: shall (absolute) LINK to consitutionClone.html and to the exact article in that page (scroll down) defining that particular part of our government:
Legislature
Judicial
Executive
President , VP
The exact place in the document can be found by right clicking it and inspecting the HTML to find IDs which are used in the URL to scroll down the page (or view HTML source or download the source html file and open it in your editor.)
FYI: Search and Replace can be done here without regular expressions. Be careful of vice-president and president because you could break your html... try doing a temporary word in the replace to work around president being part of vice-president then replace the temp word to get the VP back again.
FYI: Yes, the document is not formatted with these clearly indicated; you'll have to suffer a little reading of the constitution to figure out which Article is the right one then find the ID for it. You can find the ID right clicking to inspect the HTML because they have the anchor/scroll points in the document for their own table of contents.
Paragraphs (
inserts +1 replace)
Use paragraph tags for paragraphs (don't worry about the extra white space at the top.) Do not use multiple BR tags when a single P tag will do; that is, don't ever use two or more BR tags in a row (that is a sign you should have used a P tag.) Paste can save time here but replace can work also if you have the right situation... Such as replacing
and first going in and putting in an extra newline around the paragraphs because that is easier than fixing too many P tags inserted.
HTML Validate the page then continue to the next task; better to not let problems build up!(online uploading one or the browser plug-in; although big mistakes won't show up in the browser validator; which is more likely when you search and replace all to insert HTML.)
Outline Tags: The list tags used to make an outline (1 replace +2 inserts for main part)
Amendments shall be converted into a numbered outline (2 list levels on some amendments.) Example approximate look:
1. Amendment I
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof...
2. Amendment II (example)
1. Neither slavery nor involuntary servitude...
2. Congress shall have power to enforce this article...
Make sure you understand a numbered list 1st. before doing something big. Viewing the Source of a similar example html page (like this one ) can help you get started...
Regular Expressions to save time: Amendment\s+\w+(case sensitive) and replace it with HT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Are your goals SMART?

Answered: 1 week ago