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

On Jun 24, 2009, at 10:23, David Cramer wrote:

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

Oh, the other thing it doesn't handle are elements like <imagedata/>  
that may also need redacted. I suppose for items like that, I could  
simply render "Image Redacted" in place of a black box.


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