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-_=+!@#$%^&*();':"<>,./?',
>> 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>> 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.
-David
---------------------------------------------------------------------
To unsubscribe, e-mail:
docbook-apps-unsubscribe@...
For additional commands, e-mail:
docbook-apps-help@...