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


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(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_=+!@#$%^&*();':"<>,./?', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')"/><!-- Add other chars, e.g. accented chars and other languages, as needed -->
	</xsl:template>

Then do the black-on-black trick in your customization layer/css to make it have the appearance you want.

You might also avoid using ids as filename for html output. The ids could reveal information about the content of the section. 

David

-----Original Message-----
From: Christopher R. Maden [mailto:crism@maden.org] 
Sent: Tuesday, June 23, 2009 9:28 PM
To: David E Nedrow
Cc: docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] OK, still can't get a working redaction

David E Nedrow wrote:
> I'm still trying to figure out a mechanism for redacting elements in
> DocBook markup.

That depends on your delivery mechanism.

You can render text in PDF or HTML in black-on-black, and it will *look*
right, but the text will still be there for people to copy and paste,
search for, etc.  If you are delivering dead trees printed with the PDF,
then the information should be relatively safe.  This would be
relatively easy to implement; a small change to the CSS for HTML, and a
fairly straightforward implementation of the redact attribute in the FO
stylesheets.

You could also try printing a series of non-breaking spaces or Xs in
black-on-black, equal in length to the characters in the elements in
question; the stylesheet customization would be a bit more complicated
for that solution.

(La plus ša change... I remember a certain government agency asking for
this feature in DynaText in 1995 or so...)

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
"All I ask of living is to have no chains on me,
 And all I ask of dying is to go naturally." - Laura Nyro
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

---------------------------------------------------------------------
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]