|
Subject: Re: [xsl] Running xsltproc does not produce any output From: "ohaya ohaya@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 24 Jul 2024 04:13:19 -0000 |
Hi Liam,
I was going to post earlier, but I'm still tied up working this, but I think
I've made some progress...
I was able to set a variable as follows:
<xsl:template match="/syslog/audit_record/ExtraDetails">
B B B B B B B B B B B B B B B <ExtraDetails>
<xsl:variable name="incomingExtraDetails" select="." />
<xsl:message> VARIABLE incomingExtraDetails=[<xsl:value-of
select="$incomingExtraDetails"/>] </xsl:message>
<xsl:variable name="before-tab" select=" substring-before(
substring-after($incomingExtraDetails, '='), '[Tab]' ) " />
<xsl:variable name="after-tab" select=" substring-before(
substring-after($incomingExtraDetails, '[Tab]'), ';') " />
B B B B B B B <xsl:message>The password strings from incoming
XML...</xsl:message>
B B B B B B B <xsl:message>
B B B B B B B B B B B B B B B before: <xsl:value-of select="$before-tab" />
B B B B B B B B B B B B B B B after: <xsl:value-of select="$after-tab" />
B B B B B B B </xsl:message>
.
.
.
Next/now, I am trying to figure out how to modify the <ExtraDetails> value to
overwrite the "Command=abcdef$[Tab]abcdef$'.... to redact the "abcdef$"
strings....
If/when I can get that working I will post more info...
Thanks for your help!!
Jim
On Tuesday, July 23, 2024 at 10:55:54 PM EDT, Liam R. E. Quin
<liam@xxxxxxxxxxxxxxxx> wrote:
On Tue, 2024-07-23 at 21:47 +0000, ohaya ohaya@xxxxxxxxx wrote:
> B
> Hi,
>
> I think I spoke too soon.
>
> I've been trying to modify the original example below, which uses the
> $input variable that gets set from the stringparam on the xsltproc
> command line, to populate the before-tab and after-tab vars, to work
> with the incoming XML, auditrecord.xml, but I don't quite know how to
> populate the vars from just the incoming request?B
>
> I think that structurally, I need something like:
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
You could add,
<xsl:param name="input" />
here.
Then call xsltproc (for example) with input="...."
>
> B B B B B B B <xsl:copy>B B B B B
B B B B B B B B B B B B B B B B B B B B B B <<<<<<<<<<<<<<<< This
> is not correct... will need to modify the original <ExtraDetails>
Then use instead of xsl:copy, use apply-templates with a mode, but i
can't say much more without knowing the modification you need.
liam
--
Liam Quin,B https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Running xsltproc does not, Liam R. E. Quin liam | Thread | [xsl] [ANN] BALISAGE OPEN MIC - In, B Tommie Usdin btusd |
| Re: [xsl] Running xsltproc does not, Liam R. E. Quin liam | Date | [xsl] Does it make sense to collect, Roger L Costello cos |
| Month |