2 <?xml-stylesheet href="docbook.css" type="text/css"?>
3 <!DOCTYPE Book System "file:///E|/Program%20Files/SoftQuad/XMetaL/Rules/docbook.dtd">
4 <Book xmlns:html="http://www.w3.org/1999/xhtml">
5 <Title>The Book</Title>
7 <Title>Chapter 1.</Title>
8 <Para>Yada yada <html:img src="mzcolor.gif"/> yada.</Para>
14 var type = node.nodeType;
15 if (type == Node.ELEMENT_NODE) {
18 dump("\<" + node.tagName);
20 // dump the attributes if any
21 attributes = node.attributes;
22 if (null != attributes) {
23 var countAttrs = attributes.length;
25 while(index < countAttrs) {
26 att = attributes[index];
28 dump(" " + att.name + "=" + att.value);
34 // recursively dump the children
35 if (node.hasChildNodes()) {
40 var children = node.childNodes;
41 var length = children.length;
43 while(count < length) {
44 child = children[count];
48 dump("</" + node.tagName + ">");
57 // if it's a piece of text just dump the text
58 else if (type == Node.TEXT_NODE) {
63 list(document.documentElement);