Browse Source

Single loopZ processot, single guard processor.

Herbert Vojčík 10 years ago
parent
commit
88125ca7a1
3 changed files with 96 additions and 211 deletions
  1. 3 3
      example-todo/todo.html
  2. 61 132
      js/Trapped-Processors.js
  3. 32 76
      st/Trapped-Processors.st

+ 3 - 3
example-todo/todo.html

@@ -43,11 +43,11 @@
 <body>
 <h2 data-trap="#title"></h2>
 
-<div data-trap=": (guardXon (#todos #notNil))">
+<div data-trap=": (guard (#todos #notNil)) xontent" data-xontent>
     <span data-trap="#remaining"></span> of <span data-trap="#todos #size"></span> remaning
     [ <a href="" data-trap=": (signal archive) whenClicked">archive</a> ]
     <ul>
-        <script type="application/x-beacon" data-trap="#todos: loopXonZ" data-xontent="until end"></script>
+        <script type="application/x-beacon" data-trap="#todos: loopZ xontent" data-xontent="until end"></script>
         <li>
             <label>
                 <input type="checkbox" data-trap="done: inputChecked"/>
@@ -60,6 +60,6 @@
         <input type="submit" class="btn-primary" value="add"/>
     </form>
 </div>
-<p data-trap=": (guardXon (#todos #isNil))">Loading (fake 2 sec pause)...</p>
+<p data-trap=": (guard (#todos #isNil)) xontent" data-xontent>Loading (fake 2 sec pause)...</p>
 </body>
 </html>

+ 61 - 132
js/Trapped-Processors.js

@@ -209,8 +209,8 @@ referencedClasses: []
 smalltalk.TrappedProcessorGuardBase.klass);
 
 
-smalltalk.addClass('TrappedProcessorGuardProc', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
-smalltalk.TrappedProcessorGuardProc.comment="I am used to guard contents filling process of the brush I am installed on.\x0a\x0aI observe guard expression in the model,\x0aand when it changes to nil or false, I delete the brush contents;\x0aon the other hand, when it changes to non-nil and non-false,\x0aI run the rest on the chain, which should be one-time\x0athat sets up the contents,";
+smalltalk.addClass('TrappedProcessorGuard', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
+smalltalk.TrappedProcessorGuard.comment="I am used to guard contents filling process of the brush I am installed on.\x0a\x0aI observe guard expression in the model,\x0aand when it changes to nil or false, I delete the brush contents;\x0aon the other hand, when it changes to non-nil and non-false,\x0aI run the rest on the chain, which should be one-time\x0athat sets up the contents,";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "toView:",
@@ -231,50 +231,13 @@ _st($1)._xontent_(xon);
 $2=_st($1)._proceed();
 return $2;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorGuardProc)})},
+return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorGuard)})},
 args: ["aDataCarrier"],
 source: "toView: aDataCarrier\x0a\x09| frozen xon |\x0a\x09frozen := aDataCarrier copy.\x0a\x09xon := frozen xontent.\x0a\x09frozen target trapGuard: guardPath contents: [ :html | frozen copy target: html root; xontent: xon; proceed ]",
 messageSends: ["copy", "xontent", "trapGuard:contents:", "target", "target:", "root", "xontent:", "proceed"],
 referencedClasses: []
 }),
-smalltalk.TrappedProcessorGuardProc);
-
-
-
-smalltalk.addClass('TrappedProcessorGuardXon', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
-smalltalk.TrappedProcessorGuardXon.comment="I am used to guard contents of the brush I am installed on.\x0a\x0aI save the brush contents, then I observe guard expression in the model,\x0aand when it changes to nil or false, I delete the brush contents;\x0aon the other hand, when it changes to non-nil and non-false,\x0aI restore it from remembered state and interpret all contained\x0adata-trap attributes inside.";
-smalltalk.addMethod(
-smalltalk.method({
-selector: "toView:",
-category: 'data transformation',
-fn: function (aDataCarrier){
-var self=this;
-var frozen,xon;
-function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-frozen=_st(aDataCarrier)._copy();
-$ctx1.sendIdx["copy"]=1;
-xon=_st(frozen)._xontent();
-$ctx1.sendIdx["xontent"]=1;
-$1=_st(frozen)._target();
-$ctx1.sendIdx["target"]=1;
-_st($1)._trapGuard_contents_(self["@guardPath"],(function(html){
-var worker;
-return smalltalk.withContext(function($ctx2) {
-worker=_st(frozen)._copy();
-worker;
-_st(worker)._target_(_st(html)._root());
-_st(worker)._xontent_(xon);
-return _st(_st(_st(worker)._target())._asJQuery())._append_(_st(_st($Trapped())._current())._cloneAndInject_(_st(_st(worker)._xontent())._get_((0))));
-}, function($ctx2) {$ctx2.fillBlock({html:html,worker:worker},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorGuardXon)})},
-args: ["aDataCarrier"],
-source: "toView: aDataCarrier\x0a\x09| frozen xon |\x0a\x09frozen := aDataCarrier copy.\x0a\x09xon := frozen xontent.\x0a\x09frozen target trapGuard: guardPath contents: [ :html |\x0a\x09\x09| worker |\x0a\x09\x09worker := frozen copy.\x0a\x09\x09worker target: html root.\x0a\x09\x09worker xontent: xon.\x0a\x09\x09worker target asJQuery append: (Trapped current cloneAndInject: (worker xontent get: 0)) ]",
-messageSends: ["copy", "xontent", "trapGuard:contents:", "target", "target:", "root", "xontent:", "append:", "asJQuery", "cloneAndInject:", "current", "get:"],
-referencedClasses: ["Trapped"]
-}),
-smalltalk.TrappedProcessorGuardXon);
+smalltalk.TrappedProcessorGuard);
 
 
 
@@ -403,8 +366,8 @@ smalltalk.TrappedProcessorLoopBase);
 
 
 
-smalltalk.addClass('TrappedProcessorLoopProcZ', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
-smalltalk.TrappedProcessorLoopProcZ.comment="I am used to loop over data and repeat the contents filling process\x0aof the brush I am installed on.\x0a\x0aI observe the data in the model,\x0aand when it changes, I loop over it\x0aand run the rest of the processing chain\x0afor each element, putting the result _after_ my brush.\x0a\x0aMy brush itself should be as least visible as possible,\x0aas it only serve as a position flag (use for example\x0anoscript, ins or del).";
+smalltalk.addClass('TrappedProcessorLoopZ', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
+smalltalk.TrappedProcessorLoopZ.comment="I am used to loop over data and repeat the contents filling process\x0aof the brush I am installed on.\x0a\x0aI observe the data in the model,\x0aand when it changes, I loop over it\x0aand run the rest of the processing chain\x0afor each element, putting the result _after_ my brush.\x0a\x0aMy brush itself should be as least visible as possible,\x0aas it only serve as a position flag (use for example\x0ascript type=application/x-beacon, noscript, ins or del).";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "toView:",
@@ -425,50 +388,13 @@ _st($1)._xontent_(xon);
 $2=_st($1)._proceed();
 return $2;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorLoopProcZ)})},
+return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorLoopZ)})},
 args: ["aDataCarrier"],
 source: "toView: aDataCarrier\x0a\x09| frozen xon |\x0a\x09frozen := aDataCarrier copy.\x0a\x09xon := frozen xontent.\x0a\x09frozen target trapIter: #() after: [ :html | frozen copy target: html root; xontent: xon; proceed ]",
 messageSends: ["copy", "xontent", "trapIter:after:", "target", "target:", "root", "xontent:", "proceed"],
 referencedClasses: []
 }),
-smalltalk.TrappedProcessorLoopProcZ);
-
-
-
-smalltalk.addClass('TrappedProcessorLoopXonZ', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
-smalltalk.TrappedProcessorLoopXonZ.comment="I am used to loop over data and repeat the contents\x0aof the brush I am installed on.\x0a\x0aI save the brush contents, then I observe the data in the model,\x0aand when it changes, I loop over it\x0aand restore the contents from remembered state\x0aand interpret all contained data-trap attributes inside\x0afor each element, putting the result _after_ my brush.\x0a\x0aMy brush itself should be as least visible as possible,\x0aas it only serve as a position flag (use for example\x0anoscript, ins or del).";
-smalltalk.addMethod(
-smalltalk.method({
-selector: "toView:",
-category: 'data transformation',
-fn: function (aDataCarrier){
-var self=this;
-var frozen,xon;
-function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-frozen=_st(aDataCarrier)._copy();
-$ctx1.sendIdx["copy"]=1;
-xon=_st(frozen)._xontent();
-$ctx1.sendIdx["xontent"]=1;
-$1=_st(frozen)._target();
-$ctx1.sendIdx["target"]=1;
-_st($1)._trapIter_after_([],(function(html){
-var worker;
-return smalltalk.withContext(function($ctx2) {
-worker=_st(frozen)._copy();
-worker;
-_st(worker)._target_(_st(html)._root());
-_st(worker)._xontent_(xon);
-return _st(_st(_st(worker)._target())._asJQuery())._append_(_st(_st($Trapped())._current())._cloneAndInject_(_st(_st(worker)._xontent())._get_((0))));
-}, function($ctx2) {$ctx2.fillBlock({html:html,worker:worker},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorLoopXonZ)})},
-args: ["aDataCarrier"],
-source: "toView: aDataCarrier\x0a\x09| frozen xon |\x0a\x09frozen := aDataCarrier copy.\x0a\x09xon := frozen xontent.\x0a\x09frozen target trapIter: #() after: [ :html |\x0a\x09\x09| worker |\x0a\x09\x09worker := frozen copy.\x0a\x09\x09worker target: html root.\x0a\x09\x09worker xontent: xon.\x0a\x09\x09worker target asJQuery append: (Trapped current cloneAndInject: (worker xontent get: 0)) ]",
-messageSends: ["copy", "xontent", "trapIter:after:", "target", "target:", "root", "xontent:", "append:", "asJQuery", "cloneAndInject:", "current", "get:"],
-referencedClasses: ["Trapped"]
-}),
-smalltalk.TrappedProcessorLoopXonZ);
+smalltalk.TrappedProcessorLoopZ);
 
 
 
@@ -861,6 +787,28 @@ referencedClasses: []
 }),
 smalltalk.TrappedProcessorWidget.klass);
 
+
+smalltalk.addClass('TrappedProcessorXontent', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
+smalltalk.TrappedProcessorXontent.comment="I am used to show xontent of the brush I am installed on\x0a(see jQuery plugin Xontent for details).\x0a\x0aI clone xontent of the brush, put it into HTML\x0aand interpret all contained data-trap attributes.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "toView:",
+category: 'data transformation',
+fn: function (aDataCarrier){
+var self=this;
+function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(_st(aDataCarrier)._target())._asJQuery())._append_(_st(_st($Trapped())._current())._cloneAndInject_(_st(_st(aDataCarrier)._xontent())._get_((0))));
+_st(aDataCarrier)._proceed();
+return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorXontent)})},
+args: ["aDataCarrier"],
+source: "toView: aDataCarrier\x0a\x09aDataCarrier target asJQuery append: (Trapped current cloneAndInject: (aDataCarrier xontent get: 0)).\x0a\x09aDataCarrier proceed",
+messageSends: ["append:", "asJQuery", "target", "cloneAndInject:", "current", "get:", "xontent", "proceed"],
+referencedClasses: ["Trapped"]
+}),
+smalltalk.TrappedProcessorXontent);
+
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "modifyTarget",
@@ -1091,39 +1039,20 @@ smalltalk.TrappedProcessor.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "guardProc:",
-category: '*Trapped-Processors',
-fn: function (anArray){
-var self=this;
-function $TrappedProcessorGuardProc(){return smalltalk.TrappedProcessorGuardProc||(typeof TrappedProcessorGuardProc=="undefined"?nil:TrappedProcessorGuardProc)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($TrappedProcessorGuardProc())._new_(anArray);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"guardProc:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
-args: ["anArray"],
-source: "guardProc: anArray\x0a\x09^TrappedProcessorGuardProc new: anArray",
-messageSends: ["new:"],
-referencedClasses: ["TrappedProcessorGuardProc"]
-}),
-smalltalk.TrappedProcessor.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "guardXon:",
+selector: "guard:",
 category: '*Trapped-Processors',
 fn: function (anArray){
 var self=this;
-function $TrappedProcessorGuardXon(){return smalltalk.TrappedProcessorGuardXon||(typeof TrappedProcessorGuardXon=="undefined"?nil:TrappedProcessorGuardXon)}
+function $TrappedProcessorGuard(){return smalltalk.TrappedProcessorGuard||(typeof TrappedProcessorGuard=="undefined"?nil:TrappedProcessorGuard)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st($TrappedProcessorGuardXon())._new_(anArray);
+$1=_st($TrappedProcessorGuard())._new_(anArray);
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"guardXon:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
+}, function($ctx1) {$ctx1.fill(self,"guard:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
 args: ["anArray"],
-source: "guardXon: anArray\x0a\x09^TrappedProcessorGuardXon new: anArray",
+source: "guard: anArray\x0a\x09^TrappedProcessorGuard new: anArray",
 messageSends: ["new:"],
-referencedClasses: ["TrappedProcessorGuardXon"]
+referencedClasses: ["TrappedProcessorGuard"]
 }),
 smalltalk.TrappedProcessor.klass);
 
@@ -1167,39 +1096,20 @@ smalltalk.TrappedProcessor.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "loopProcZ",
-category: '*Trapped-Processors',
-fn: function (){
-var self=this;
-function $TrappedProcessorLoopProcZ(){return smalltalk.TrappedProcessorLoopProcZ||(typeof TrappedProcessorLoopProcZ=="undefined"?nil:TrappedProcessorLoopProcZ)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($TrappedProcessorLoopProcZ())._new();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"loopProcZ",{},smalltalk.TrappedProcessor.klass)})},
-args: [],
-source: "loopProcZ\x0a\x09^TrappedProcessorLoopProcZ new",
-messageSends: ["new"],
-referencedClasses: ["TrappedProcessorLoopProcZ"]
-}),
-smalltalk.TrappedProcessor.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "loopXonZ",
+selector: "loopZ",
 category: '*Trapped-Processors',
 fn: function (){
 var self=this;
-function $TrappedProcessorLoopXonZ(){return smalltalk.TrappedProcessorLoopXonZ||(typeof TrappedProcessorLoopXonZ=="undefined"?nil:TrappedProcessorLoopXonZ)}
+function $TrappedProcessorLoopZ(){return smalltalk.TrappedProcessorLoopZ||(typeof TrappedProcessorLoopZ=="undefined"?nil:TrappedProcessorLoopZ)}
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st($TrappedProcessorLoopXonZ())._new();
+$1=_st($TrappedProcessorLoopZ())._new();
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"loopXonZ",{},smalltalk.TrappedProcessor.klass)})},
+}, function($ctx1) {$ctx1.fill(self,"loopZ",{},smalltalk.TrappedProcessor.klass)})},
 args: [],
-source: "loopXonZ\x0a\x09^TrappedProcessorLoopXonZ new",
+source: "loopZ\x0a\x09^TrappedProcessorLoopZ new",
 messageSends: ["new"],
-referencedClasses: ["TrappedProcessorLoopXonZ"]
+referencedClasses: ["TrappedProcessorLoopZ"]
 }),
 smalltalk.TrappedProcessor.klass);
 
@@ -1355,4 +1265,23 @@ referencedClasses: ["TrappedProcessorWidget"]
 }),
 smalltalk.TrappedProcessor.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "xontent",
+category: '*Trapped-Processors',
+fn: function (){
+var self=this;
+function $TrappedProcessorXontent(){return smalltalk.TrappedProcessorXontent||(typeof TrappedProcessorXontent=="undefined"?nil:TrappedProcessorXontent)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st($TrappedProcessorXontent())._new();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"xontent",{},smalltalk.TrappedProcessor.klass)})},
+args: [],
+source: "xontent\x0a\x09^TrappedProcessorXontent new",
+messageSends: ["new"],
+referencedClasses: ["TrappedProcessorXontent"]
+}),
+smalltalk.TrappedProcessor.klass);
+
 });

+ 32 - 76
st/Trapped-Processors.st

@@ -97,10 +97,10 @@ new: anArray
 		yourself
 ! !
 
-TrappedProcessorGuardBase subclass: #TrappedProcessorGuardProc
+TrappedProcessorGuardBase subclass: #TrappedProcessorGuard
 	instanceVariableNames: ''
 	package: 'Trapped-Processors'!
-!TrappedProcessorGuardProc commentStamp!
+!TrappedProcessorGuard commentStamp!
 I am used to guard contents filling process of the brush I am installed on.
 
 I observe guard expression in the model,
@@ -109,7 +109,7 @@ on the other hand, when it changes to non-nil and non-false,
 I run the rest on the chain, which should be one-time
 that sets up the contents,!
 
-!TrappedProcessorGuardProc methodsFor: 'data transformation'!
+!TrappedProcessorGuard methodsFor: 'data transformation'!
 
 toView: aDataCarrier
 	| frozen xon |
@@ -118,32 +118,6 @@ toView: aDataCarrier
 	frozen target trapGuard: guardPath contents: [ :html | frozen copy target: html root; xontent: xon; proceed ]
 ! !
 
-TrappedProcessorGuardBase subclass: #TrappedProcessorGuardXon
-	instanceVariableNames: ''
-	package: 'Trapped-Processors'!
-!TrappedProcessorGuardXon commentStamp!
-I am used to guard contents of the brush I am installed on.
-
-I save the brush contents, then I observe guard expression in the model,
-and when it changes to nil or false, I delete the brush contents;
-on the other hand, when it changes to non-nil and non-false,
-I restore it from remembered state and interpret all contained
-data-trap attributes inside.!
-
-!TrappedProcessorGuardXon methodsFor: 'data transformation'!
-
-toView: aDataCarrier
-	| frozen xon |
-	frozen := aDataCarrier copy.
-	xon := frozen xontent.
-	frozen target trapGuard: guardPath contents: [ :html |
-		| worker |
-		worker := frozen copy.
-		worker target: html root.
-		worker xontent: xon.
-		worker target asJQuery append: (Trapped current cloneAndInject: (worker xontent get: 0)) ]
-! !
-
 TrappedDataExpectingProcessor subclass: #TrappedProcessorInputChecked
 	instanceVariableNames: ''
 	package: 'Trapped-Processors'!
@@ -203,10 +177,10 @@ toView: aDataCarrier
 	self subclassResponsibility
 ! !
 
-TrappedProcessorLoopBase subclass: #TrappedProcessorLoopProcZ
+TrappedProcessorLoopBase subclass: #TrappedProcessorLoopZ
 	instanceVariableNames: ''
 	package: 'Trapped-Processors'!
-!TrappedProcessorLoopProcZ commentStamp!
+!TrappedProcessorLoopZ commentStamp!
 I am used to loop over data and repeat the contents filling process
 of the brush I am installed on.
 
@@ -217,9 +191,9 @@ for each element, putting the result _after_ my brush.
 
 My brush itself should be as least visible as possible,
 as it only serve as a position flag (use for example
-noscript, ins or del).!
+script type=application/x-beacon, noscript, ins or del).!
 
-!TrappedProcessorLoopProcZ methodsFor: 'data transformation'!
+!TrappedProcessorLoopZ methodsFor: 'data transformation'!
 
 toView: aDataCarrier
 	| frozen xon |
@@ -228,37 +202,6 @@ toView: aDataCarrier
 	frozen target trapIter: #() after: [ :html | frozen copy target: html root; xontent: xon; proceed ]
 ! !
 
-TrappedProcessorLoopBase subclass: #TrappedProcessorLoopXonZ
-	instanceVariableNames: ''
-	package: 'Trapped-Processors'!
-!TrappedProcessorLoopXonZ commentStamp!
-I am used to loop over data and repeat the contents
-of the brush I am installed on.
-
-I save the brush contents, then I observe the data in the model,
-and when it changes, I loop over it
-and restore the contents from remembered state
-and interpret all contained data-trap attributes inside
-for each element, putting the result _after_ my brush.
-
-My brush itself should be as least visible as possible,
-as it only serve as a position flag (use for example
-noscript, ins or del).!
-
-!TrappedProcessorLoopXonZ methodsFor: 'data transformation'!
-
-toView: aDataCarrier
-	| frozen xon |
-	frozen := aDataCarrier copy.
-	xon := frozen xontent.
-	frozen target trapIter: #() after: [ :html |
-		| worker |
-		worker := frozen copy.
-		worker target: html root.
-		worker xontent: xon.
-		worker target asJQuery append: (Trapped current cloneAndInject: (worker xontent get: 0)) ]
-! !
-
 TrappedProcessor subclass: #TrappedProcessorReplace
 	instanceVariableNames: 'left right'
 	package: 'Trapped-Processors'!
@@ -444,6 +387,23 @@ new: aString
 		yourself
 ! !
 
+TrappedProcessor subclass: #TrappedProcessorXontent
+	instanceVariableNames: ''
+	package: 'Trapped-Processors'!
+!TrappedProcessorXontent commentStamp!
+I am used to show xontent of the brush I am installed on
+(see jQuery plugin Xontent for details).
+
+I clone xontent of the brush, put it into HTML
+and interpret all contained data-trap attributes.!
+
+!TrappedProcessorXontent methodsFor: 'data transformation'!
+
+toView: aDataCarrier
+	aDataCarrier target asJQuery append: (Trapped current cloneAndInject: (aDataCarrier xontent get: 0)).
+	aDataCarrier proceed
+! !
+
 !TrappedDataCarrier methodsFor: '*Trapped-Processors'!
 
 modifyTarget
@@ -501,12 +461,8 @@ deuric
 	^TrappedProcessorUriComponentDecode new
 !
 
-guardProc: anArray
-	^TrappedProcessorGuardProc new: anArray
-!
-
-guardXon: anArray
-	^TrappedProcessorGuardXon new: anArray
+guard: anArray
+	^TrappedProcessorGuard new: anArray
 !
 
 inputChecked
@@ -517,12 +473,8 @@ inputValue
 	^TrappedProcessorInputValue new
 !
 
-loopProcZ
-	^TrappedProcessorLoopProcZ new
-!
-
-loopXonZ
-	^TrappedProcessorLoopXonZ new
+loopZ
+	^TrappedProcessorLoopZ new
 !
 
 path
@@ -555,5 +507,9 @@ whenSubmitted
 
 widget: aString
 	^TrappedProcessorWidget new: aString
+!
+
+xontent
+	^TrappedProcessorXontent new
 ! !