diff --git a/ChangeLog b/ChangeLog index e0e97533..1913aa27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Jun 13 23:08:46 CEST 2001 Daniel Veillard + + * HTMLparser.[ch] HTMLtree.c: stored the inline/block property + of element and use it to avoid outputting formatting spaces at + the wrong place. Implemented the format parameter for HTML save. + * result/HTML/doc2.htm result/HTML/doc3.htm result/HTML/fp40.htm + result/HTML/script.html result/HTML/test2.html result/HTML/test3.html + result/HTML/wired.html: of course this impact the result of a + number of HTML tests + Thu Jun 14 09:49:09 CEST 2001 Daniel Veillard * HTMLtree.[ch]: started augmenting the HTML save API with diff --git a/HTMLparser.c b/HTMLparser.c index d2c1e6cf..b096d82e 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -351,100 +351,100 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) { * DTD: 1 means that this element is valid only in the Loose DTD * 2 means that this element is valid only in the Frameset DTD * - * Name,Start Tag,End Tag,Save End, Empty, Depr., DTD, Description + * Name,Start Tag,End Tag,Save End,Empty,Deprecated,DTD,inline,Description */ htmlElemDesc html40ElementTable[] = { -{ "a", 0, 0, 0, 0, 0, 0, "anchor " }, -{ "abbr", 0, 0, 0, 0, 0, 0, "abbreviated form" }, -{ "acronym", 0, 0, 0, 0, 0, 0, "" }, -{ "address", 0, 0, 0, 0, 0, 0, "information on author " }, -{ "applet", 0, 0, 0, 0, 1, 1, "java applet " }, -{ "area", 0, 2, 2, 1, 0, 0, "client-side image map area " }, -{ "b", 0, 3, 0, 0, 0, 0, "bold text style" }, -{ "base", 0, 2, 2, 1, 0, 0, "document base uri " }, -{ "basefont", 0, 2, 2, 1, 1, 1, "base font size " }, -{ "bdo", 0, 0, 0, 0, 0, 0, "i18n bidi over-ride " }, -{ "big", 0, 3, 0, 0, 0, 0, "large text style" }, -{ "blockquote", 0, 0, 0, 0, 0, 0, "long quotation " }, -{ "body", 1, 1, 0, 0, 0, 0, "document body " }, -{ "br", 0, 2, 2, 1, 0, 0, "forced line break " }, -{ "button", 0, 0, 0, 0, 0, 0, "push button " }, -{ "caption", 0, 0, 0, 0, 0, 0, "table caption " }, -{ "center", 0, 3, 0, 0, 1, 1, "shorthand for div align=center " }, -{ "cite", 0, 0, 0, 0, 0, 0, "citation" }, -{ "code", 0, 0, 0, 0, 0, 0, "computer code fragment" }, -{ "col", 0, 2, 2, 1, 0, 0, "table column " }, -{ "colgroup", 0, 1, 0, 0, 0, 0, "table column group " }, -{ "dd", 0, 1, 0, 0, 0, 0, "definition description " }, -{ "del", 0, 0, 0, 0, 0, 0, "deleted text " }, -{ "dfn", 0, 0, 0, 0, 0, 0, "instance definition" }, -{ "dir", 0, 0, 0, 0, 1, 1, "directory list" }, -{ "div", 0, 0, 0, 0, 0, 0, "generic language/style container"}, -{ "dl", 0, 0, 0, 0, 0, 0, "definition list " }, -{ "dt", 0, 1, 0, 0, 0, 0, "definition term " }, -{ "em", 0, 3, 0, 0, 0, 0, "emphasis" }, -{ "fieldset", 0, 0, 0, 0, 0, 0, "form control group " }, -{ "font", 0, 3, 0, 0, 1, 1, "local change to font " }, -{ "form", 0, 0, 0, 0, 0, 0, "interactive form " }, -{ "frame", 0, 2, 2, 1, 0, 2, "subwindow " }, -{ "frameset", 0, 0, 0, 0, 0, 2, "window subdivision" }, -{ "h1", 0, 0, 0, 0, 0, 0, "heading " }, -{ "h2", 0, 0, 0, 0, 0, 0, "heading " }, -{ "h3", 0, 0, 0, 0, 0, 0, "heading " }, -{ "h4", 0, 0, 0, 0, 0, 0, "heading " }, -{ "h5", 0, 0, 0, 0, 0, 0, "heading " }, -{ "h6", 0, 0, 0, 0, 0, 0, "heading " }, -{ "head", 1, 1, 0, 0, 0, 0, "document head " }, -{ "hr", 0, 2, 2, 1, 0, 0, "horizontal rule " }, -{ "html", 1, 1, 0, 0, 0, 0, "document root element " }, -{ "i", 0, 3, 0, 0, 0, 0, "italic text style" }, -{ "iframe", 0, 0, 0, 0, 0, 1, "inline subwindow " }, -{ "img", 0, 2, 2, 1, 0, 0, "embedded image " }, -{ "input", 0, 2, 2, 1, 0, 0, "form control " }, -{ "ins", 0, 0, 0, 0, 0, 0, "inserted text" }, -{ "isindex", 0, 2, 2, 1, 1, 1, "single line prompt " }, -{ "kbd", 0, 0, 0, 0, 0, 0, "text to be entered by the user" }, -{ "label", 0, 0, 0, 0, 0, 0, "form field label text " }, -{ "legend", 0, 0, 0, 0, 0, 0, "fieldset legend " }, -{ "li", 0, 1, 1, 0, 0, 0, "list item " }, -{ "link", 0, 2, 2, 1, 0, 0, "a media-independent link " }, -{ "map", 0, 0, 0, 0, 0, 0, "client-side image map " }, -{ "menu", 0, 0, 0, 0, 1, 1, "menu list " }, -{ "meta", 0, 2, 2, 1, 0, 0, "generic metainformation " }, -{ "noframes", 0, 0, 0, 0, 0, 2, "alternate content container for non frame-based rendering " }, -{ "noscript", 0, 0, 0, 0, 0, 0, "alternate content container for non script-based rendering " }, -{ "object", 0, 0, 0, 0, 0, 0, "generic embedded object " }, -{ "ol", 0, 0, 0, 0, 0, 0, "ordered list " }, -{ "optgroup", 0, 0, 0, 0, 0, 0, "option group " }, -{ "option", 0, 1, 0, 0, 0, 0, "selectable choice " }, -{ "p", 0, 1, 1, 0, 0, 0, "paragraph " }, -{ "param", 0, 2, 2, 1, 0, 0, "named property value " }, -{ "pre", 0, 0, 0, 0, 0, 0, "preformatted text " }, -{ "q", 0, 0, 0, 0, 0, 0, "short inline quotation " }, -{ "s", 0, 3, 0, 0, 1, 1, "strike-through text style" }, -{ "samp", 0, 0, 0, 0, 0, 0, "sample program output, scripts, etc." }, -{ "script", 0, 0, 0, 0, 0, 0, "script statements " }, -{ "select", 0, 0, 0, 0, 0, 0, "option selector " }, -{ "small", 0, 3, 0, 0, 0, 0, "small text style" }, -{ "span", 0, 0, 0, 0, 0, 0, "generic language/style container " }, -{ "strike", 0, 3, 0, 0, 1, 1, "strike-through text" }, -{ "strong", 0, 3, 0, 0, 0, 0, "strong emphasis" }, -{ "style", 0, 0, 0, 0, 0, 0, "style info " }, -{ "sub", 0, 3, 0, 0, 0, 0, "subscript" }, -{ "sup", 0, 3, 0, 0, 0, 0, "superscript " }, -{ "table", 0, 0, 0, 0, 0, 0, " " }, -{ "tbody", 1, 0, 0, 0, 0, 0, "table body " }, -{ "td", 0, 0, 0, 0, 0, 0, "table data cell" }, -{ "textarea", 0, 0, 0, 0, 0, 0, "multi-line text field " }, -{ "tfoot", 0, 1, 0, 0, 0, 0, "table footer " }, -{ "th", 0, 1, 0, 0, 0, 0, "table header cell" }, -{ "thead", 0, 1, 0, 0, 0, 0, "table header " }, -{ "title", 0, 0, 0, 0, 0, 0, "document title " }, -{ "tr", 0, 0, 0, 0, 0, 0, "table row " }, -{ "tt", 0, 3, 0, 0, 0, 0, "teletype or monospaced text style" }, -{ "u", 0, 3, 0, 0, 1, 1, "underlined text style" }, -{ "ul", 0, 0, 0, 0, 0, 0, "unordered list " }, -{ "var", 0, 0, 0, 0, 0, 0, "instance of a variable or program argument" }, +{ "a", 0, 0, 0, 0, 0, 0, 1, "anchor " }, +{ "abbr", 0, 0, 0, 0, 0, 0, 1, "abbreviated form" }, +{ "acronym", 0, 0, 0, 0, 0, 0, 1, "" }, +{ "address", 0, 0, 0, 0, 0, 0, 0, "information on author " }, +{ "applet", 0, 0, 0, 0, 1, 1, 2, "java applet " }, +{ "area", 0, 2, 2, 1, 0, 0, 0, "client-side image map area " }, +{ "b", 0, 3, 0, 0, 0, 0, 1, "bold text style" }, +{ "base", 0, 2, 2, 1, 0, 0, 0, "document base uri " }, +{ "basefont", 0, 2, 2, 1, 1, 1, 1, "base font size " }, +{ "bdo", 0, 0, 0, 0, 0, 0, 1, "i18n bidi over-ride " }, +{ "big", 0, 3, 0, 0, 0, 0, 1, "large text style" }, +{ "blockquote", 0, 0, 0, 0, 0, 0, 0, "long quotation " }, +{ "body", 1, 1, 0, 0, 0, 0, 0, "document body " }, +{ "br", 0, 2, 2, 1, 0, 0, 1, "forced line break " }, +{ "button", 0, 0, 0, 0, 0, 0, 2, "push button " }, +{ "caption", 0, 0, 0, 0, 0, 0, 0, "table caption " }, +{ "center", 0, 3, 0, 0, 1, 1, 0, "shorthand for div align=center " }, +{ "cite", 0, 0, 0, 0, 0, 0, 1, "citation" }, +{ "code", 0, 0, 0, 0, 0, 0, 1, "computer code fragment" }, +{ "col", 0, 2, 2, 1, 0, 0, 0, "table column " }, +{ "colgroup", 0, 1, 0, 0, 0, 0, 0, "table column group " }, +{ "dd", 0, 1, 0, 0, 0, 0, 0, "definition description " }, +{ "del", 0, 0, 0, 0, 0, 0, 2, "deleted text " }, +{ "dfn", 0, 0, 0, 0, 0, 0, 1, "instance definition" }, +{ "dir", 0, 0, 0, 0, 1, 1, 0, "directory list" }, +{ "div", 0, 0, 0, 0, 0, 0, 0, "generic language/style container"}, +{ "dl", 0, 0, 0, 0, 0, 0, 0, "definition list " }, +{ "dt", 0, 1, 0, 0, 0, 0, 0, "definition term " }, +{ "em", 0, 3, 0, 0, 0, 0, 1, "emphasis" }, +{ "fieldset", 0, 0, 0, 0, 0, 0, 0, "form control group " }, +{ "font", 0, 3, 0, 0, 1, 1, 1, "local change to font " }, +{ "form", 0, 0, 0, 0, 0, 0, 0, "interactive form " }, +{ "frame", 0, 2, 2, 1, 0, 2, 0, "subwindow " }, +{ "frameset", 0, 0, 0, 0, 0, 2, 0, "window subdivision" }, +{ "h1", 0, 0, 0, 0, 0, 0, 0, "heading " }, +{ "h2", 0, 0, 0, 0, 0, 0, 0, "heading " }, +{ "h3", 0, 0, 0, 0, 0, 0, 0, "heading " }, +{ "h4", 0, 0, 0, 0, 0, 0, 0, "heading " }, +{ "h5", 0, 0, 0, 0, 0, 0, 0, "heading " }, +{ "h6", 0, 0, 0, 0, 0, 0, 0, "heading " }, +{ "head", 1, 1, 0, 0, 0, 0, 0, "document head " }, +{ "hr", 0, 2, 2, 1, 0, 0, 0, "horizontal rule " }, +{ "html", 1, 1, 0, 0, 0, 0, 0, "document root element " }, +{ "i", 0, 3, 0, 0, 0, 0, 1, "italic text style" }, +{ "iframe", 0, 0, 0, 0, 0, 1, 2, "inline subwindow " }, +{ "img", 0, 2, 2, 1, 0, 0, 1, "embedded image " }, +{ "input", 0, 2, 2, 1, 0, 0, 1, "form control " }, +{ "ins", 0, 0, 0, 0, 0, 0, 2, "inserted text" }, +{ "isindex", 0, 2, 2, 1, 1, 1, 0, "single line prompt " }, +{ "kbd", 0, 0, 0, 0, 0, 0, 1, "text to be entered by the user" }, +{ "label", 0, 0, 0, 0, 0, 0, 1, "form field label text " }, +{ "legend", 0, 0, 0, 0, 0, 0, 0, "fieldset legend " }, +{ "li", 0, 1, 1, 0, 0, 0, 0, "list item " }, +{ "link", 0, 2, 2, 1, 0, 0, 0, "a media-independent link " }, +{ "map", 0, 0, 0, 0, 0, 0, 2, "client-side image map " }, +{ "menu", 0, 0, 0, 0, 1, 1, 0, "menu list " }, +{ "meta", 0, 2, 2, 1, 0, 0, 0, "generic metainformation " }, +{ "noframes", 0, 0, 0, 0, 0, 2, 0, "alternate content container for non frame-based rendering " }, +{ "noscript", 0, 0, 0, 0, 0, 0, 0, "alternate content container for non script-based rendering " }, +{ "object", 0, 0, 0, 0, 0, 0, 2, "generic embedded object " }, +{ "ol", 0, 0, 0, 0, 0, 0, 0, "ordered list " }, +{ "optgroup", 0, 0, 0, 0, 0, 0, 0, "option group " }, +{ "option", 0, 1, 0, 0, 0, 0, 0, "selectable choice " }, +{ "p", 0, 1, 1, 0, 0, 0, 0, "paragraph " }, +{ "param", 0, 2, 2, 1, 0, 0, 0, "named property value " }, +{ "pre", 0, 0, 0, 0, 0, 0, 0, "preformatted text " }, +{ "q", 0, 0, 0, 0, 0, 0, 1, "short inline quotation " }, +{ "s", 0, 3, 0, 0, 1, 1, 1, "strike-through text style" }, +{ "samp", 0, 0, 0, 0, 0, 0, 1, "sample program output, scripts, etc." }, +{ "script", 0, 0, 0, 0, 0, 0, 2, "script statements " }, +{ "select", 0, 0, 0, 0, 0, 0, 1, "option selector " }, +{ "small", 0, 3, 0, 0, 0, 0, 1, "small text style" }, +{ "span", 0, 0, 0, 0, 0, 0, 1, "generic language/style container " }, +{ "strike", 0, 3, 0, 0, 1, 1, 1, "strike-through text" }, +{ "strong", 0, 3, 0, 0, 0, 0, 1, "strong emphasis" }, +{ "style", 0, 0, 0, 0, 0, 0, 0, "style info " }, +{ "sub", 0, 3, 0, 0, 0, 0, 1, "subscript" }, +{ "sup", 0, 3, 0, 0, 0, 0, 1, "superscript " }, +{ "table", 0, 0, 0, 0, 0, 0, 0, " " }, +{ "tbody", 1, 0, 0, 0, 0, 0, 0, "table body " }, +{ "td", 0, 0, 0, 0, 0, 0, 0, "table data cell" }, +{ "textarea", 0, 0, 0, 0, 0, 0, 1, "multi-line text field " }, +{ "tfoot", 0, 1, 0, 0, 0, 0, 0, "table footer " }, +{ "th", 0, 1, 0, 0, 0, 0, 0, "table header cell" }, +{ "thead", 0, 1, 0, 0, 0, 0, 0, "table header " }, +{ "title", 0, 0, 0, 0, 0, 0, 0, "document title " }, +{ "tr", 0, 0, 0, 0, 0, 0, 0, "table row " }, +{ "tt", 0, 3, 0, 0, 0, 0, 1, "teletype or monospaced text style" }, +{ "u", 0, 3, 0, 0, 1, 1, 1, "underlined text style" }, +{ "ul", 0, 0, 0, 0, 0, 0, 0, "unordered list " }, +{ "var", 0, 0, 0, 0, 0, 0, 1, "instance of a variable or program argument" }, }; /* diff --git a/HTMLparser.h b/HTMLparser.h index b129175a..e7949189 100644 --- a/HTMLparser.h +++ b/HTMLparser.h @@ -34,12 +34,13 @@ typedef struct _htmlElemDesc htmlElemDesc; typedef htmlElemDesc *htmlElemDescPtr; struct _htmlElemDesc { const char *name; /* The tag name */ - char startTag; /* Whether the start tag can be implied */ - char endTag; /* Whether the end tag can be implied */ - char saveEndTag; /* Whether the end tag should be saved */ - char empty; /* Is this an empty element ? */ - char depr; /* Is this a deprecated element ? */ - char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ + char startTag; /* Whether the start tag can be implied */ + char endTag; /* Whether the end tag can be implied */ + char saveEndTag; /* Whether the end tag should be saved */ + char empty; /* Is this an empty element ? */ + char depr; /* Is this a deprecated element ? */ + char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ + char isinline; /* is this a block 0 or inline 1 element */ const char *desc; /* the description */ }; diff --git a/HTMLtree.c b/HTMLtree.c index 14c4260b..7554d172 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -527,7 +527,8 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, if ((info != NULL) && (info->empty)) { xmlBufferWriteChar(buf, ">"); - if (cur->next != NULL) { + if ((format) && (info != NULL) && (!info->isinline) && + (cur->next != NULL)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE)) xmlBufferWriteChar(buf, "\n"); @@ -544,7 +545,8 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, xmlBufferWriteCHAR(buf, cur->name); xmlBufferWriteChar(buf, ">"); } - if (cur->next != NULL) { + if ((format) && (info != NULL) && (!info->isinline) && + (cur->next != NULL)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE)) xmlBufferWriteChar(buf, "\n"); @@ -567,12 +569,14 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, } } if (cur->children != NULL) { - if ((cur->children->type != HTML_TEXT_NODE) && + if ((format) && (info != NULL) && (!info->isinline) && + (cur->children->type != HTML_TEXT_NODE) && (cur->children->type != HTML_ENTITY_REF_NODE) && (cur->children != cur->last)) xmlBufferWriteChar(buf, "\n"); htmlNodeListDump(buf, doc, cur->children, format); - if ((cur->last->type != HTML_TEXT_NODE) && + if ((format) && (info != NULL) && (!info->isinline) && + (cur->last->type != HTML_TEXT_NODE) && (cur->last->type != HTML_ENTITY_REF_NODE) && (cur->children != cur->last)) xmlBufferWriteChar(buf, "\n"); @@ -580,7 +584,8 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, xmlBufferWriteChar(buf, "name); xmlBufferWriteChar(buf, ">"); - if (cur->next != NULL) { + if ((format) && (info != NULL) && (!info->isinline) && + (cur->next != NULL)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE)) xmlBufferWriteChar(buf, "\n"); @@ -997,7 +1002,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, if ((info != NULL) && (info->empty)) { xmlOutputBufferWriteString(buf, ">"); - if (cur->next != NULL) { + if ((format) && (!info->isinline) && (cur->next != NULL)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE) && (cur->parent != NULL) && @@ -1016,7 +1021,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlOutputBufferWriteString(buf, (const char *)cur->name); xmlOutputBufferWriteString(buf, ">"); } - if (cur->next != NULL) { + if ((format) && (cur->next != NULL) && + (info != NULL) && (!info->isinline)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE) && (cur->parent != NULL) && @@ -1040,13 +1046,15 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, #endif } if (cur->children != NULL) { - if ((cur->children->type != HTML_TEXT_NODE) && + if ((format) && (info != NULL) && (!info->isinline) && + (cur->children->type != HTML_TEXT_NODE) && (cur->children->type != HTML_ENTITY_REF_NODE) && (cur->children != cur->last) && (!xmlStrEqual(cur->name, BAD_CAST "pre"))) xmlOutputBufferWriteString(buf, "\n"); htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format); - if ((cur->last->type != HTML_TEXT_NODE) && + if ((format) && (info != NULL) && (!info->isinline) && + (cur->last->type != HTML_TEXT_NODE) && (cur->last->type != HTML_ENTITY_REF_NODE) && (cur->children != cur->last) && (!xmlStrEqual(cur->name, BAD_CAST "pre"))) @@ -1055,7 +1063,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlOutputBufferWriteString(buf, "name); xmlOutputBufferWriteString(buf, ">"); - if (cur->next != NULL) { + if ((format) && (info != NULL) && (!info->isinline) && + (cur->next != NULL)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE) && (cur->parent != NULL) && diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h index b129175a..e7949189 100644 --- a/include/libxml/HTMLparser.h +++ b/include/libxml/HTMLparser.h @@ -34,12 +34,13 @@ typedef struct _htmlElemDesc htmlElemDesc; typedef htmlElemDesc *htmlElemDescPtr; struct _htmlElemDesc { const char *name; /* The tag name */ - char startTag; /* Whether the start tag can be implied */ - char endTag; /* Whether the end tag can be implied */ - char saveEndTag; /* Whether the end tag should be saved */ - char empty; /* Is this an empty element ? */ - char depr; /* Is this a deprecated element ? */ - char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ + char startTag; /* Whether the start tag can be implied */ + char endTag; /* Whether the end tag can be implied */ + char saveEndTag; /* Whether the end tag should be saved */ + char empty; /* Is this an empty element ? */ + char depr; /* Is this a deprecated element ? */ + char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ + char isinline; /* is this a block 0 or inline 1 element */ const char *desc; /* the description */ }; diff --git a/result/HTML/doc2.htm b/result/HTML/doc2.htm index 674044b3..0c929ec6 100644 --- a/result/HTML/doc2.htm +++ b/result/HTML/doc2.htm @@ -7,8 +7,7 @@ function NS_NullWindow(){this.window;} function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());} window.open=NS_NewOpen; - - + diff --git a/result/HTML/doc3.htm b/result/HTML/doc3.htm index 3ed7223c..d516ca9d 100644 --- a/result/HTML/doc3.htm +++ b/result/HTML/doc3.htm @@ -7,8 +7,7 @@ function NS_NullWindow(){this.window;} function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());} window.open=NS_NewOpen; - - +