X-Git-Url: http://git.rot13.org/?p=webpac2;a=blobdiff_plain;f=web%2Fiwf%2Fiwfxml.js;h=48ad027edbd51f5bc5793f81f25df25541d8bc19;hp=6ac7746253b394019c46fdd31a70b9fa7196af2a;hb=fc5c73fcd97f9c6573e7407f688f52ce56ad98bc;hpb=27a4ecca6972847b63e09e4a9e2394c53d0af8a3 diff --git a/web/iwf/iwfxml.js b/web/iwf/iwfxml.js index 6ac7746..48ad027 100644 --- a/web/iwf/iwfxml.js +++ b/web/iwf/iwfxml.js @@ -1,40 +1,55 @@ -// ----------------------------------------------------------------------------- -// IWF - Interactive Website Framework. Javascript library for creating -// responsive thin client interfaces. -// -// Copyright (C) 2005 Brock Weaver brockweaver@gmail.com -// -// This library is free software; you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published -// by the Free Software Foundation; either version 2.1 of the License, or -// (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -// License for more details. +// -------------------------------------------------------------------------- +/// IWF - Interactive Website Framework. Javascript library for creating +/// responsive thin client interfaces. +/// +/// Copyright (C) 2005 Brock Weaver brockweaver@users.sourceforge.net +/// +/// This library is free software; you can redistribute it and/or modify +/// it under the terms of the GNU Lesser General Public License as published +/// by the Free Software Foundation; either version 2.1 of the License, or +/// (at your option) any later version. +/// +/// This library is distributed in the hope that it will be useful, but +/// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +/// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +/// License for more details. +/// +/// You should have received a copy of the GNU Lesser General Public License +/// along with this library; if not, write to the Free Software Foundation, +/// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/// +/// Brock Weaver +/// brockweaver@users.sourceforge.net +/// 1605 NW Maple Pl +/// Ankeny, IA 50021 +/// +//! http://iwf.sourceforge.net/ +// -------------------------------------------------------------------------- +//! NOTE: To minimize file size, strip all fluffy comments (except the LGPL, of course!) +//! using the following regex (global flag and multiline on): +//! ^\t*//([^/!].*|$) // -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, write to the Free Software Foundation, -// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// This reduces file size by about 30%, give or take. // -// Brock Weaver -// brockweaver@gmail.com -// 1605 NW Maple Pl -// Ankeny, IA 50021 -// ----------------------------------------------------------------------------- +//! To rip out only logging statements (commented or uncommented): +//! ^/{0,2}iwfLog.* +// -------------------------------------------------------------------------- // -------------------------------------------------------------------------- -// iwfxml.js +//! iwfxml.js // // Javascript-based xml parser // -// Dependencies: -// iwfcore.js +//! Dependencies: +//! iwfcore.js // -// Brock Weaver - brockweaver@sourceforge.net - iwf.sourceforge.net -// v 0.1 - 2005-06-05 -// Initial release. +//! Brock Weaver - brockweaver@users.sourceforge.net +//! v 0.2 - 2005-11-14 +//! core bug patch +// -------------------------------------------------------------------------- +//! Brock Weaver - brockweaver@users.sourceforge.net +//! v 0.1 - 2005-06-05 +//! Initial release. // -------------------------------------------------------------------------- // This class is meant to ease the burden of parsing xml. // Xml is parsed into sets of arrays, in a hierarchical format. @@ -99,11 +114,11 @@ iwfXmlDoc.prototype.outerXml = function(pretty){ // -------------------------------------------------------------------------- -// iwfXmlNode +//! iwfXmlNode // -// Brock Weaver - brockweaver@gmail.com -// v 0.1 - 2005-06-05 -// Initial release. +//! Brock Weaver - brockweaver@users.sourceforge.net +//! v 0.1 - 2005-06-05 +//! Initial release. // -------------------------------------------------------------------------- // This class is used to represent a single xml node. // All xml is kept except processing instructions. @@ -618,12 +633,12 @@ iwfXmlNode.prototype.rtrim = function(s){ // -------------------------------------------------------------------------- -// iwfWriter +//! iwfWriter // -// Brock Weaver - brockweaver@gmail.com +//! Brock Weaver - brockweaver@users.sourceforge.net // -// v 0.1 - 2005-06-05 -// Initial release. +//! v 0.1 - 2005-06-05 +//! Initial release. // -------------------------------------------------------------------------- // This class is meant to ease the creation of xml strings. // Note it is not a fully-compliant xml generator. @@ -724,7 +739,6 @@ iwfWriter.prototype.writeAttribute = function(name, val, quotes){ } else { // we're using quotes to delimit html attval = attval.replace(/'/gi, "\\'").replace(/"/gi, '"').replace(/>/gi, '>'); -// attval = attval.replace(/&/gi, '&').replace(/"/gi, '"').replace(//gi, '>'); } } else { attval = iwfXmlEncode(attval); @@ -789,9 +803,10 @@ iwfWriter.prototype.writeNodeClose = function(){ break; default: if (this._nodeOpened){ - // hack for + //! hack for or
switch(name){ case 'script': + case 'div': this.writeRaw(">"); break; default: