W3C home > Mailing lists > Public > www-voice@w3.org > April to June 2003

RE: Minor problem with ircgi in VXML test suite

From: MattO <matto@tellme.com>
Date: Mon, 28 Apr 2003 09:36:31 -0700
To: "'Andras Micsik'" <micsik@dsd.sztaki.hu>
Cc: <www-voice@w3.org>
Message-ID: <007101c30da4$536a2a10$6401a8c0@mattoxp>

Thanks for your feedback and for supplying a fix, Andras.

In spite of the fact that GNOME's (xsltproc) implementation is the only
one of the four XSLT processors that I've tested that treats a missing
attribute and an attribute with a empty value as this same, section 11.2
of the XSLT 1.0 spec corroborates GNOME's implementation:

  If the variable-binding element has empty content and does not have a
select attribute, then the value of the variable is an empty string.

<xsl:variable name="x"/>
is equivalent to

<xsl:variable name="x" select="''"/>


Other processors tested: 
  Microsoft (MSXML 4.0) 
  GingerAll (Sablotron 0.96)
  javax.xml.transform (Sun ??)
I'll plug the fix into ircgi2pl.xslt. I don't anticipate, however, that
it will get published to the W3C site for a while though.

-----Original Message-----
From: www-voice-request@w3.org [mailto:www-voice-request@w3.org] On
Behalf Of Andras Micsik
Sent: Monday, April 28, 2003 5:10 AM
To: www-voice@w3.org
Subject: Minor problem with ircgi in VXML test suite


we found that assertion 1 always fails, and the cause is faulty Perl
code generated with ircgi2pl.xslt using xsltproc. Might be the case that
xsltproc is not 100% compliant to the XSL recommendation..., but anyway
there is a workaround:

The problematic excerpt:

  <if-header name="User-Agent">
    <if-header name="User-Agent" value="" >
        User-Agent header present, but empty.

The generated Perl code excerpt:


  if (defined($val) && ($val =~ /^\s*$/)) {

    $val = $ENV{HTTP_USER_AGENT};

    if (defined($val) && ($val =~ /^\s*$/)) {

      push @comments, qq {
        User-Agent header present, but empty.
.... and finally, it says that User-Agent was not supplied...

The first if-header tag is processed the same way as the second. This is
because <xsl:when test="$value=''"> is true when value parameter is

So here is the modified part of ircgi2pl.xslt, which works well even

<xsl:when test="$value">
   <xsl:when test="$value=''">
    if (defined($val) &amp;&amp; ($val =~ /^\s*$/)) {
      my $match = '<xsl:value-of select="$value"/>';
      if (defined($val) &amp;&amp; ($val =~ /^$match$/<xsl:if
test="$ignore-case='true'">i</xsl:if>)) {
  if (defined($val)) {

 András Micsik          MTA SZTAKI Hungary
Received on Monday, 28 April 2003 12:36:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:36 UTC