| <!DOCTYPE html> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <html> |
| <head> |
| <script type="text/javascript" src="../Outline_js"></script> |
| <script type="text/javascript" src="../DOM_js"></script> |
| <script type="text/javascript" src="../util.js"></script> |
| <script type="text/javascript" src="../traversal.js"></script> |
| <script type="text/javascript" src="../types.js"></script> |
| <script type="text/javascript" src="../NodeSet.js"></script> |
| <script type="text/javascript" src="../init.js"></script> |
| <script type="text/javascript" src="../PostponedActions_js"></script> |
| <script type="text/javascript" src="nulleditor.js"></script> |
| <script type="text/javascript" src="PrettyPrinter.js"></script> |
| |
| <script type="text/javascript"> |
| |
| function debug(str) |
| { |
| console.log(str); |
| } |
| |
| |
| var nextSectionId = 0; |
| |
| var topLevelSections = new Array(); |
| |
| |
| function buildTree(level,maxLevel,nchildren,parent) |
| { |
| var heading = DOM_createElement(document,"H"+level); |
| var text = DOM_createTextNode(document,"Heading "+level); |
| DOM_appendChild(heading,text); |
| DOM_appendChild(document.body,heading); |
| |
| var id = "section"+(nextSectionId++); |
| var section = new Section(id,heading,level); |
| |
| if (parent == null) |
| topLevelSections.push(section); |
| else |
| parent.children.push(section); |
| |
| if (level <= maxLevel) { |
| for (var i = 0; i < nchildren; i++) { |
| buildTree(level+1,maxLevel,nchildren,section); |
| } |
| } |
| } |
| |
| function main() |
| { |
| // buildTree(1,3,3,null); |
| |
| Outline_init(); |
| PostponedActions_perform(); |
| |
| /* |
| var pretty = PrettyPrinter.getHTML(document.documentElement); |
| DOM_deleteAllChildren(document.body); |
| var pre = DOM_createElement(document,"PRE"); |
| var text = DOM_createTextNode(document,pretty); |
| DOM_appendChild(pre,text); |
| DOM_appendChild(document.body,pre); |
| */ |
| } |
| </script> |
| </head> |
| |
| <body onload="main()" style="margin: 0"> |
| |
| <h1>1 One</h1> |
| <h2>1.1 Two</h2> |
| <h2>1.2 Three</h2> |
| <h2>1.3 Four</h2> |
| <h2>1.4 Five</h2> |
| <h1>2 Six</h1> |
| <h5>2.1 Seven</h5> |
| <h5>2.2 Eight</h5> |
| <h2>2.3 Nine</h2> |
| <h2>2.4 Ten</h2> |
| <!-- |
| <h1>One</h1> |
| <h2>Two</h2> |
| <h2>Three</h2> |
| <h2>Four</h2> |
| <h2>Five</h2> |
| <h1>Six</h1> |
| <h5>Seven</h5> |
| <h5>Eight</h5> |
| <h2>Nine</h2> |
| <h2>Ten</h2> |
| <h1>Eleven</h1> |
| <h2>Twelve</h2> |
| <h3>Thirteen</h3> |
| <h3>Fourteen</h3> |
| <h3>Fifteen</h3> |
| <h2>Sixteen</h2> |
| <h3>Seventeen</h3> |
| <h3>Eighteen</h3> |
| <h3>Nineteen</h3> |
| <h2>Twenty</h2> |
| <h1>Twenty one</h1> |
| <h2>Twenty two</h2> |
| <h2>Twenty three</h2> |
| --> |
| |
| </body> |
| </html> |