Re: VOTE CONCLUSION - was: 2 resolutions, please vote

My quick 'n' dirty jQuery modulus string replace function:

$(document).ready(function() {
// replace me with RDFa selector when available
 $('*[property="modulus"].*[datatype="xsd:hexBinary"]').each(function(index, element) {
  var digitsPerLine = 16;
  var separator = ":";
  var textIn = $(element).text();
  var textOut = new String();

  for(var i=0; i<textIn.length; i+=2) {
   textOut = ((i%digitsPerLine)==0 && i!=0) ? textOut=textOut+"\n" :
textOut;
   textOut = ((i%digitsPerLine)==0) ? textOut+textIn.substr(i, 2) :
textOut+separator+textIn.substr(i,2);
  }

  $(element).text(textOut);
  });
}

Am 22.11.2011 22:06, schrieb Stéphane Corlosquet:
> 
> 
> On Tue, Nov 22, 2011 at 3:34 PM, Dominik Tomaszuk <ddooss@wp.pl
> <mailto:ddooss@wp.pl>> wrote:
> 
>     On 22.11.2011 17:51, Stéphane Corlosquet wrote:
> 
>         <dd property="modulus" datatype="xsd:hexBinary">
>                 00cb24ed85d64d79...
>         </dd>
> 
>     Or overwrite in @content and display more readable modulas.
> 
> 
> Yes. I've suggested this approach during the call on Monday as well, but
> we thought that this would overload the markup and would not reuse the
> DRY approach of RDFa. Henry/Bergi suggested javascript could be used to
> make the raw modula look better for humans. Matter of preference I guess.
> 
> Steph.
>  
> 
> 
>     <dd property="modulus" datatype="xsd:hexBinary"
>      content="00cb24ed85d64d79...">
>      00-cb-24-ed-85-d6-4d-79...
>     </dd>
> 
>     Domel
> 
> 

Received on Tuesday, 22 November 2011 23:51:32 UTC