diff --git a/lms/djangoapps/staticbook/views.py b/lms/djangoapps/staticbook/views.py
index 948e66b50c..cb15f5855e 100644
--- a/lms/djangoapps/staticbook/views.py
+++ b/lms/djangoapps/staticbook/views.py
@@ -2,12 +2,14 @@ from django.contrib.auth.decorators import login_required
from mitxmako.shortcuts import render_to_response
from courseware.courses import check_course
-
+from lxml import etree
@login_required
def index(request, course_id, page=0):
course = check_course(course_id)
- return render_to_response('staticbook.html', {'page': int(page), 'course': course})
+ raw_table_of_contents = open('lms/templates/book_toc.xml', 'r') # TODO: This will need to come from S3
+ table_of_contents = etree.parse(raw_table_of_contents).getroot()
+ return render_to_response('staticbook.html', {'page': int(page), 'course': course, 'table_of_contents': table_of_contents})
def index_shifted(request, course_id, page):
diff --git a/lms/templates/book_toc.html b/lms/templates/book_toc.html
deleted file mode 100644
index ed4794da65..0000000000
--- a/lms/templates/book_toc.html
+++ /dev/null
@@ -1,356 +0,0 @@
-
Contents ix
- Preamble i
-
-
- 1 The Circuit Abstraction 3
- 2 Resistive Networks 53
- 3 Network Theorems 119
- 4 Analysis of Nonlinear Circuits 193
- 5 The Digital Abstraction 243
- 6 The MOSFET Switch 285
- 7 The MOSFET Amplifier 331
- 8 The Small Signal Model 405
- 9 Energy Storage Elements 457
- 10 First-order Transients 503
- 11 Energy and Power in Digital Circuits 595
- 12 Transients in Second Order Circuits 625
- 13 Sinusoidal Steady State 703
- 14 Sinusoidal Steady State: Resonance 777
- 15 The Operational Amplifier Abstraction 837
- 16 Diodes 905
- A1 Maxwell's Equations and the LMD 927
- B Trigonometric Functions & Identities 941
- C Complex Numbers 947
- D Solving Simultaneous Linear Equations 957
-
-
- Answers to Selected Problems 959
- Figure Acknowledgments 971
- Index 973
diff --git a/lms/templates/book_toc.xml b/lms/templates/book_toc.xml
new file mode 100644
index 0000000000..88dc016905
--- /dev/null
+++ b/lms/templates/book_toc.xml
@@ -0,0 +1,413 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lms/templates/staticbook.html b/lms/templates/staticbook.html
index dbc5bb1cec..804676de97 100644
--- a/lms/templates/staticbook.html
+++ b/lms/templates/staticbook.html
@@ -4,6 +4,7 @@
<%block name="headextra">
<%static:css group='course'/>
+<%static:js group='courseware'/>
%block>
<%block name="js_extra">
@@ -71,7 +72,24 @@ $("#open_close_accordion a").click(function(){