Re: [xsl] Running xsltproc does not produce any output

Subject: Re: [xsl] Running xsltproc does not produce any output
From: "ohaya ohaya@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Jul 2024 11:29:16 -0000
 Hi Liam,
To clarify what I posted, when I had "[Tab]" that is LITERALLY 5 characters
string, "[" followed by "Tab" and then followed by "]".
Thanks,
Jim


    On Monday, July 22, 2024 at 11:58:49 PM EDT, Liam R. E. Quin
<liam@xxxxxxxxxxxxxxxx> wrote:

 On Tue, 2024-07-23 at 03:01 +0000, ohaya ohaya@xxxxxxxxx wrote:
> B 
> I am starting to look into what needs to be done (Note this might be
> a little off-topic)...
>
> First, reminder, the <ExtraDatails> has like:
>
> Command=Password$[Tab]Password$;ConnectionComponentId=Users;DstHost=m
> y.solutions;Protocol=NC;ID=Server_W01;SessionID=0c97ce2e-c0a2-467d-
> 952e-
> e1b81a9a5149;SrcHost=xx.zz.0.24;TXTOffset=1593B;User=xxxxx;VIDOffset=
> 39T;
>
> and I want to detect where the 2 password strings are the same
> length, and if they are, then I will want to check if the 2 strings
> are identical...
>
> So I first need to check if the length of string in front of the
> [Tab] is the same the length of the string after the [Tab], before
> the semi-colon

So,
<xsl:variable name="before-tab"
B  select="
B  B  substring-before(
B  B  B  substring-after($input, '='),
B  B  B  '[Tab]'
B  B  )
B  " />

<xsl:variable name="after-tab"
B  select="
B  B  substring-before(
B  B  B  substring-after($input, '[Tab]'),
B  B  B  ';'
B  B  )
B  " />

<xsl:if test="string-length($before-tab) = string-length($after-tab)">
B  B  <xsl:message>The robots are coming</xsl:message>
</xsl:if>

You can also do,
B  B  <xsl:message>
B  B  B  before: <xsl:value-of select="$before-tab" />,
B  B  B  after: <xsl:value=of select="$after-tab" />.
B  B  </xsl:message>

If by [Tab] you mean a tab charcter, use in your XSLT, not a
literal tab character (and not \t as that does not work in XSLT).

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