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

This is what Chris had recommended as well, so it may be the way to  
handle it initially. My only problem is that replacing the text with  
X's would slightly change the line layouts when compared to the non- 
redacted version. Not a big deal for the project at hand, but it could  
be an issue in other contexts.

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

Oh, yeah. Good point. I wouldn't normally be outputting HTML for these  
docs, but it's something to keep in mind.


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