Skip to content
Browse files

updating comments for consistency

  • Loading branch information...
1 parent a80b561 commit 0d2a853103681491202ada9b1925f72318a0eb75 @mckamey committed
Showing with 35 additions and 44 deletions.
  1. +4 −7 jsonml-dom.js
  2. +4 −7 jsonml-jbst.js
  3. +10 −10 jsonml.xslt
  4. +17 −20 jsonml2.js
View
11 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) {
View
11 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);
@@ -52,10 +52,7 @@
*/
/* namespace JsonML */
-var JsonML;
-if ("undefined" === typeof JsonML) {
- JsonML = {};
-}
+var JsonML = JsonML || {};
JsonML.BST = (function(){
View
20 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">
View
37 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;
@@ -90,10 +90,7 @@
array JsonML.getChildren(jml);
*/
-var JsonML;
-if ("undefined" === typeof JsonML) {
- JsonML = {};
-}
+var JsonML = JsonML || {};
(function() {

0 comments on commit 0d2a853

Please sign in to comment.
Something went wrong with that request. Please try again.