OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] OK, still can't get a working redaction


> Wouldn't that break syllabification/hyphenation?
> But I guess it's a good solution anyway.

Well, it doesn't replace the space char with an X so the lines will still wrap fine. You could object that it doesn't hide enough since it reveals the word lengths and location of spaces so that if someone knew enough context perhaps they could deduce something about the contents. To address that you could translate some of the characters to spaces instead of Xs. Is there a specification regarding what counts as a good redaction? 

Oh, also I see I put " and ' in my list of characters to translate. You'll need to leave those out (or would replacing them with numeric entities work?).

David

> -----Original Message-----
> From: Philipp Kempgen [mailto:philipp.kempgen@amooma.de] 
> Sent: Wednesday, June 24, 2009 8:19 AM
> To: docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] OK, still can't get a working redaction
> 
> David Cramer schrieb:
> > Use translate() on all text() nodes that are children of 
> *[@redact = 'yes'] to replace the text with Xs: 
> > 
> > 	<xsl:template match="text()[ancestor::*[@redact='yes']]">
> > 	  <xsl:value-of 
> select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno
> pqrstuvwxyz1234567890-_=+!@#$%^&*();':"<>,./?', 
> 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXX')"/><!-- Add other chars, e.g. 
> accented chars and other languages, as needed -->
> > 	</xsl:template>
> 
> Wouldn't that break syllabification/hyphenation?
> But I guess it's a good solution anyway.
> 
> > Then do the black-on-black trick in your customization 
> layer/css to make it have the appearance you want.
> 
> 
>     Philipp Kempgen
> --
> AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
> Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
> Asterisk: http://the-asterisk-book.com - 
> http://das-asterisk-buch.de Videos of the AMOOCON VoIP 
> conference 2009 ->  http://www.amoocon.de
> -- 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: 
> docbook-apps-help@lists.oasis-open.org
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]