Skip to content

Commit

Permalink
updating comments for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mckamey committed Feb 11, 2012
1 parent a80b561 commit 0d2a853
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
11 changes: 4 additions & 7 deletions jsonml-dom.js
@@ -1,18 +1,15 @@
/*
JsonML_DOM.js
jsonml-dom.js
DOM to JsonML utility
Created: 2007-02-15-2235
Modified: 2008-08-31-2206
Copyright (c)2006-2009 Stephen M. McKamey
Distributed under an open-source license: http://jsonml.org/license
Copyright (c)2006-2010 Stephen M. McKamey
Distributed under The MIT License: http://jsonml.org/license
*/

var JsonML;
if ("undefined" === typeof JsonML) {
JsonML = {};
}
var JsonML = JsonML || {};

/*JsonML*/ JsonML.parseDOM = function(/*DOM*/ elem, /*function*/ filter) {
if (!elem || !elem.nodeType) {
Expand Down
11 changes: 4 additions & 7 deletions jsonml-jbst.js
@@ -1,14 +1,14 @@
/*
JsonML_BST.js
jsonml-jbst.js
JsonML + Browser-Side Templating (JBST)
Created: 2008-07-28-2337
Modified: 2010-09-13-1952
Copyright (c)2006-2010 Stephen M. McKamey
Distributed under an open-source license: http://jsonml.org/license
Distributed under The MIT License: http://jsonml.org/license
This file creates a JsonML.BST type containing these methods:
This file creates a JsonML.BST type containing these methods:
// JBST + JSON => DOM
var dom = JsonML.BST(jbst).bind(data);
Expand Down Expand Up @@ -52,10 +52,7 @@
*/

/* namespace JsonML */
var JsonML;
if ("undefined" === typeof JsonML) {
JsonML = {};
}
var JsonML = JsonML || {};

JsonML.BST = (function(){

Expand Down
20 changes: 10 additions & 10 deletions jsonml.xslt
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
JsonML.xslt
jsonml.xslt
Created: 2006-11-15-0551
Modified: 2009-02-14-0927
Created: 2006-11-15-0551
Modified: 2009-02-14-0927
Released under an open-source license:
http://jsonml.org/License.htm
Copyright (c)2006-2009 Stephen M. McKamey
Distributed under The MIT License: http://jsonml.org/license
This transformation converts any XML document into JsonML.
It omits processing-instructions and comment-nodes.
To enable comment-nodes to be emitted as JavaScript comments,
uncomment the Comment() template.
This transformation converts any XML document into JsonML.
It omits processing-instructions and comment-nodes.
To enable comment-nodes to be emitted as JavaScript comments,
uncomment the Comment() template.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Expand Down
37 changes: 17 additions & 20 deletions jsonml2.js
@@ -1,37 +1,37 @@
/*global JSON */
/*
JsonML2.js
jsonml2.js
JsonML builder
Created: 2006-11-09-0116
Modified: 2010-09-13-1952
Copyright (c)2006-2010 Stephen M. McKamey
Distributed under an open-source license: http://jsonml.org/license
Distributed under The MIT License: http://jsonml.org/license
This file creates a global JsonML object containing these methods:
This file creates a global JsonML object containing these methods:
JsonML.parse(string|array, filter)
JsonML.parse(string|array, filter)
This method produces a tree of DOM elements from a JsonML tree. The
array must not contain any cyclical references.
This method produces a tree of DOM elements from a JsonML tree. The
array must not contain any cyclical references.
The optional filter parameter is a function which can filter and
transform the results. It receives each of the DOM nodes, and
its return value is used instead of the original value. If it
returns what it received, then structure is not modified. If it
returns undefined then the member is deleted.
The optional filter parameter is a function which can filter and
transform the results. It receives each of the DOM nodes, and
its return value is used instead of the original value. If it
returns what it received, then structure is not modified. If it
returns undefined then the member is deleted.
This is useful for binding unobtrusive JavaScript to the generated
DOM elements.
Example:
Example:
// Parses the structure. If an element has a specific CSS value then
// takes appropriate action: Remove from results, add special event
// handlers, or bind to a custom component.
// Parses the structure. If an element has a specific CSS value then
// takes appropriate action: Remove from results, add special event
// handlers, or bind to a custom component.
var myUI = JsonML.parse(myUITemplate, function (elem) {
var myUI = JsonML.parse(myUITemplate, function (elem) {
if (elem.className.indexOf("Remove-Me") >= 0) {
// this will remove from resulting DOM tree
return null;
Expand Down Expand Up @@ -90,10 +90,7 @@
array JsonML.getChildren(jml);
*/

var JsonML;
if ("undefined" === typeof JsonML) {
JsonML = {};
}
var JsonML = JsonML || {};

(function() {

Expand Down

0 comments on commit 0d2a853

Please sign in to comment.