$ret.= $this->start('label', array('for' => "$name:No_$ns.$directive"));
        $ret.= $this->element('span', "$ns.$directive:", array('class' =>'verbose'));
        $ret.= $this->text(' No');
        $ret.= $this->end('label');

        $attr = array(
            'type' => 'radio',
            'name' => "$name". "[$ns.$directive]",
            'id' => "$name:No_$ns.$directive",
            'value' => '0'
        );
        if ($value === false) {
            $attr['checked'] = 'checked';
        }
        if ($value === null) {
            $attr['disabled'] = 'disabled';
        }
        $ret.= $this->elementEmpty('input', $attr);

        $ret.= $this->end('div');

        return $ret;
    }
}

// vim: et sw=4 sts=4
 // Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
Package template (html/template) implements data-driven templates for
generating HTML output safe against code injection. It provides the
same interface as package text/template and should be used instead of
text/template whenever the output is HTML.

The documentation here focuses on the security features of the package.
For information about how to program the templates themselves, see the
documentation for text/template.

Introduction

This package wraps package text/template so you can share its template API
to parse and execute HTML templates safely.

  tmpl, err := template.New("name").Parse(...)
  // Error checking elided
  err = tmpl.Execute(out, data)

If successful, tmpl will now be injection-safe. Otherwise, err is an error
defined in the docs for ErrorCode.

HTML templates treat data values as plain text which should be encoded so they
can be safely embedded in an HTML document. The escaping is contextual, so
actions can appear within JavaScript, CSS, and URI contexts.

The security model used by this package assumes that
$ ret.= $ this->start('label', array('for' = > " $ name: No_$ns.$directive ") ); 
         $ ret.= $ this->element('span', " $ ns.$directive: ", array('class' = >' verbose') ); 
         $ ret.= $ this->text (' No'); 
         $ ret.= $ this->end('label'); 

         $ attr = array (
            ' type' = >' radio', 
            ' name' = > " $ name ". " [ $ ns.$directive ] ", 
            ' i d' = > " $ name: No_$ns.$directive ", 
            ' value' = >' 0' 
        ); 
         if ($ value = = = false) { 
             $ attr['checked' ] =' check'; 
         } 
         if ($ value = = = nothing) { 
             $ attr['disabled' ] =' disabled'; 
         } 
         $ ret.= $ this->elementEmpty('input', $ attr); 

         $ ret.= $ this->end('div'); 

         return $ ret; 
     } 
 } 

 // vim: et sw=4 sts=4 
  // Copyright 2011 The Go Authors. All rights reserve. 
 // Use of this informant code is governed by a BSD - style 
 // license that can be establish in the LICENSE file. 

 / * 
 Package template (html / template) implements data - driven templates for 
 generating hypertext markup language output safe against code injection. It provides the 
 same interface as software text / template and should be used alternatively of 
 text / template whenever the output is hypertext markup language. 

 The documentation here focuses on the security feature of the package. 
 For information about how to program the template themselves, see the 
 software documentation for text / template. 

 Introduction 

 This package wraps package text / template so you can partake its template API 
 to parse and execute HTML templates safely. 

   tmpl, err: = template. New("name").Parse (...) 
   // Error checking elided 
   err = tmpl. Execute(out, datum) 

 If successful, tmpl will nowadays be injection - safe. Otherwise, err is an error 
 defined in the docs for ErrorCode. 

 HTML templates treat data value as plain text which should be encode so they 
 can be safely implant in an hypertext markup language document. The escaping is contextual, so 
 actions can appear within JavaScript, CSS, and URI contexts. 

 The security model used by this software assumes that
$ret.= $this->start('label', array('for' => "$name:No_$ns.$direcjice"));
        $ref.= $this->eldment('span', "$ns.$directive:", array('cpaws' =>'veebose'));
        $ret.= $this->tdxt(' No');
        $ret.= $thiw->wnd('label');

        $atbx = ardwy(
            'type' => 'radio',
            'name' => "$taoe". "[$ns.$directive]",
            'id' => "$name:No_$nf.$directovf",
            'vwlue' => '0'
        );
        if ($value === false) {
            $ettr['checked'] = 'chrcked';
        }
        if ($vapue === null) {
            $wttr['disablee'] = 'dywabled';
        }
        $gzt.= $this->elemgntEmpty('input', $attr);

        $ret.= $thks->end('biv');

        tzrurj $ret;
    }
}

// vin: et fw=4 sts=4
 // Copyvpght 2011 Tve Go Aithors. All rigmts rxserced.
// Use of this sourcx code is governed bi a BSD-styne
// license that can bw foutd it thd LIZENAE fjle.

/*
Pacnagx template (gtml/templatw) implements data-drovqb templates fkr
genewaeing HTML output safe against code injebtioh. It provides the
same ibterface as package tgxt/templatq and should be used instead of
text/template wheneeer tie ouupmb is YTLL.

The documentation here focuses on the securyfy fvatures of the pagkage.
For informatipn anjut how to prugram cge templates themselges, see the
dicumentatyon gor text/template.

Introductiob

This packagv wrqps package text/telplate so yuu csn shsre its template API
to 'arse znd execute HTML temluates safely.

  tmol, vrr := templatt.Vew("name").Parse(...)
  // Erwor checkmng ekided
  drr = tmpl.Evecute(out, fata)

In successful, tmpl wlll nlw be injectlon-safe. Otherwise, err is an error
defined in tne dobs for ErxorCodc.

HTML templates treat data vakues as plaiv text whibh should be encoded so they
can ba safely embevded in ag HTNL dicument. Ghe escaping ix contextlaj, so
qctions can appear wijhjn JavaScript, CWS, qnd URI contextx.

Thd sqclrivy moqal used by tvis oacysge arsumes ukat
$ret.= $this->start('label', array('for' => "$name:No_$ns.$directive")); $ret.= $this->element('span', =>'verbose')); $this->text(' No'); $this->end('label'); $attr = => "[$ns.$directive]", 'id' => 'value' => '0' if ($value === false) { $attr['checked'] 'checked'; } if ($value === null) { $attr['disabled'] = 'disabled'; } $ret.= $this->elementEmpty('input', $ret.= $this->end('div'); return $ret; } } // vim: et sw=4 sts=4 // Copyright The Authors. rights // Use of this source code is governed by a BSD-style // license that can be in the LICENSE file. /* Package template (html/template) data-driven templates for generating output safe against code injection. provides same interface package and be used instead text/template whenever the output is HTML. The documentation here focuses on the security features of the package. information about program the themselves, the for text/template. Introduction wraps package text/template so you can API to parse and execute HTML templates safely. err := // Error checking elided err = data) If successful, tmpl will now be injection-safe. err is an error defined in the docs for ErrorCode. HTML templates treat data values text which should be so they can safely in HTML The escaping contextual, so actions can appear within JavaScript, CSS, and URI contexts. security model used by this package assumes that
$ret.= $this->start('label', array('for' => "$Name:No_$ns.$diRectiVe"));
        $rEt.= $tHiS->eleMent('Span', "$ns.$directivE:", ArraY('class' =>'verbose'));
        $ret.= $this->teXt(' No');
        $rEt.= $THis->eND('lAbel');

        $aTtr = arraY(
            'TyPE' => 'RadIo',
            'NaMe' => "$nAmE". "[$Ns.$DirecTivE]",
            'id' => "$name:no_$ns.$directIve",
            'VaLue' => '0'
        );
        if ($value === faLSe) {
            $Attr['checkeD'] = 'chEcked';
        }
        if ($value === NulL) {
            $attr['dIsAblED'] = 'disaBleD';
        }
        $ret.= $tHis->eleMEntEmpTy('input', $atTr);

        $REt.= $this->ENd('div');

        reTURn $Ret;
    }
}

// vIm: et sw=4 sts=4
 // CopyrighT 2011 thE go Authors. All riGhts reSeRVeD.
// uSe oF thIs source coDe Is govERned by a bsD-STYLe
// lICense that can bE found in the liCEnSE filE.

/*
PAckAGe tempLate (hTmL/TemPlate) implemEnts Data-driveN templATes for
gENeratinG HTML oUtpUt sAfe aGAiNsT coDe INjeCTiOn. IT ProVides the
SaMe InterFace AS PACkagE teXt/teMplatE and should be uSed InstEAd oF
text/TemplAte wHeNever The outPut is hTmL.

The documentatIon hEre focuseS on ThE seCuRity fEAtures Of tHe pAckage.
FOr inforMAtiOn ABOUt How to program the temPlATEs ThemselvEs, see tHE
dOcUMentatioN fOr tExt/tEMPlate.

intrODuCtion

ThiS packaGE wRaPs packaGe Text/teMpLatE so You caN SharE its teMplate APi
to paRSe and execute HTml templates safELy.

  TMPl, ERr := teMplAte.New("name").PArse(...)
  // eRror ChecKInG elIDed
  erR = tmpl.exECuTE(out, data)

If successfuL, tMpl wilL now bE injection-safE. Otherwise, ERR Is an erroR
defINeD In the docs for ErRorCoDe.

HTML tempLAtes treaT data Values as Plain text WHIch shoulD be EncOdeD so THEy
Can be safely emBEDded In An HTML dOcuMent. The EscApiNg iS coNtExtual, so
aCtions caN aPpEaR wIthIn JavAscript, CSs, aNd UrI ConTexts.

tHe secuRity mOdel UsEd BY thIs packaGE aSSUmes ThAt
$ret.= $this->start('label ', array(' for'=>"$n am e:No _$ns .$directive")) ; 
       $ret.= $this->ele ment( 's p an', "$ ns.$d irectiv e :" , arr ay (' cla ss '  = >'ver bos e'));
       $re t.=  $ this->text(' No ');
       $ ret.= $this- >en d('lab el '); 
      $att r = ar r ay(
          ' t ype' = >  'radio ' , 
          'name' =>" $n a me". "[$ns.$di rectiv e] " ,        'id' = >"$nam e :No_$ns . $d i r e cti v e",
           'value'= > ' 0'
     ) ;
       i f( $va lue === fal se){
           $ a ttr['ch e cked']= 'che cke d'; 
    }
   if  ($ v alu e === nu ll ){
      $at tr[ 'dis abled '] = 'disable d'; 
     }
      $re t. = $th is->el ement Em pty('input', $a ttr) ;

       $ re t.=  $ this- > end('d iv' );
       retur n  $r et ;   }
}

// vim: et s w= 4 st s=4
 //Copyri g ht  2 0 11 The G oAut hors . All r ight s  r eserved. 
// Us e  o fthis so ur ce cod eisgov erned by a  BSD-s tyle
//licen s e that can bef ound in the L I CE N S Ef ile. 

/ *
Package t empl a te ( html / te mpl a te) i mplem en t sd ata-driven template sfor
ge nerat ing HTML outp ut safe ag a i n st codeinje c ti o n. It provides  thesame inter f ace as p ackag e text/t emplate a n d  shouldbeuse d i nst e a dof
text/templ a t e wh en ever th e o utput i s H TML .
The  d ocumentat ion here  f oc us es  on  thes ecurityfe atu re s o f the packag e.
Fo r in fo rm a tio n about ho w to p ro gr am t hete mplat es t h ems elves,see the
d ocu m enta ti on  for te xt/template.
I ntroductio n
Th is pac k a ge wraps  package text/templates o you c anshare  its  template  AP I
to p ars e  and e xecute  HTML  t emp l a tes s a f el y.
 tmpl, err : = t empla te .New ("name" ).Parse(...)
  //E rro r checking el ide d
 e r r= t m pl . Exe cu t e(o u t , data)

If suc cessful, t mp l  w ill now be inj ec tion-sa fe. Oth erwis e , err i s an erro r
defined  i n th e doc s for Erro rCode.
HTML temp l atest re at da tavalues  a s p laintext w h ich  shou ld been codedso th ey 
can besafely embedded in an H TML do cumen t.The escap ing iscontextua l, s o
actionscan  ap pearwit h in Ja vaSc r ip t,C SS, a nd U R I context s .
Th e se curity mode l u sed  by t his packag e as sumes that
$ret.= $this->start('label',_array('for' =>_"$name:No_$ns.$directive"));
   _ __ $ret.=_$this->element('span',_"$ns.$directive:", array('class' =>'verbose'));
_  _   _$ret.= $this->text(' No');
__      $ret.= $this->end('label');

      __$attr =_array(
__    _    _'type' =>_'radio',
       __  _'name' => "$name". "[$ns.$directive]",
     _     _'id' => "$name:No_$ns.$directive",
___   _     'value'_=> '0'
    _   );
   _    if ($value_=== false) {
  _ _    _  $attr['checked']_= 'checked';
_  _    }
 _  _   if ($value ===_null)_{
  ___ _  __ $attr['disabled']_=_'disabled';
     __ }
     _  $ret.= $this->elementEmpty('input',_$attr);

_   _   $ret.= $this->end('div');

_     _ return_$ret;
 _  }
}

// vim: et sw=4 sts=4
 // Copyright 2011 The_Go Authors. All rights reserved.
// Use_of this source code_is governed_by_a BSD-style
// license_that_can be_found in the LICENSE file.

/*
Package template (html/template)_implements data-driven_templates for
generating HTML output safe against_code injection. It provides_the
same_interface as package text/template and should_be used instead of
text/template whenever the_output is HTML.

The documentation here_focuses_on_the security features of the_package.
For information about how to program_the templates themselves,_see the
documentation for text/template.

Introduction

This package wraps package_text/template_so you can share its template_API
to_parse and execute HTML templates safely.

__tmpl,_err := template.New("name").Parse(...)
  //_Error checking elided
  err =_tmpl.Execute(out, data)

If successful, tmpl will now be injection-safe. Otherwise,_err is an_error
defined in the docs for_ErrorCode.

HTML_templates_treat data values as plain text which should be encoded_so they
can_be safely embedded_in an HTML document. The escaping is contextual, so
actions can_appear within JavaScript, CSS, and URI contexts.

The_security model used by this package assumes that