W3C home > Mailing lists > Public > www-voice@w3.org > October to December 2003

Re: Implementation Report using JSP pages

From: Dave Burke <david.burke@voxpilot.com>
Date: Mon, 29 Dec 2003 12:15:51 -0000
Message-ID: <002201c3ce05$809da800$0a01a8c0@db01.voxpilot.com>
To: "Christopher Passaretti" <cpassar@nortelnetworks.com>
Cc: <www-voice@w3.org>
MessageHi, Christopher.

I see what you mean now (I thought the problem you were reporting was that no XML declaration was present at all). It appears that there is indeed a small problem with the XSLT example packaged with the Implementation Report. The solution is straightforward - just remove the new lines from the "header" template i.e. edit the <xsl:template name="header"> content so that it spans a single line. Attached is the XSLT from the Implementation Report with the change made - please let me know if this works correctly for you (I have validated it on Xalan 2.3 / BEA WLS 6.1). I would not recommend adding an extra XML declaration as this will result in two XML declarations in the JSP runtime output. I will notify the Implementation Report Chief Editor of this issue.

Hope this helps,

  ----- Original Message ----- 
  From: Christopher Passaretti 
  To: 'Dave Burke' 
  Sent: Wednesday, December 24, 2003 6:47 PM
  Subject: RE: Implementation Report using JSP pages

  Interesting, If I drop the converted JSP into JBoss and try and validate the document using an XML parser it fails.
  Look at this link from IBM (which confirmed what I was seeing)...


  -----Original Message-----
  From: Dave Burke [mailto:david.burke@voxpilot.com] 
  Sent: Wednesday, December 24, 2003 12:46 PM
  To: Passaretti, Christopher [VMMH:RP12:EXCH]; www-voice@w3.org
  Subject: Re: Implementation Report using JSP pages

    Hi, Christopher.

    We have used the CGI to JSP XSLT to produce our implementation report with no problems.

    Usually the IRCGI document includes one or more <next> elements with an 'include' attribute. If this attribute is false, a VoiceXML document with a <goto> is returned including the XML declaration (see line 263). If the attribute is true, the contents of an external VoiceXML document are included into the JSP output at runtime. In both cases the XML declaration will be inserted (assuming the external file includes one in the latter case). Indeed the output of the XSLT is actually Java code and not XML per se (although the Java code will output XML at runtime).

    -- Dave
      ----- Original Message ----- 
      From: Christopher Passaretti 
      To: 'www-voice@w3.org' 
      Sent: Wednesday, December 24, 2003 3:56 PM
      Subject: Implementation Report using JSP pages

      I was curious if anyone has used the cgi to jsp XSL provided in the appendix.  The resulting JSP pages cannot be validated

      by an XML parser.  This is because the first line of the file must be the xml header.  I changed it slightly to insert the xml

      header with the template header and it appears to work fine: 

      <!--   Official contentType is 'application/voicexml+xml'. 
        Change contentType to 'text/xml' to view generated JSP in IE. 
      <xsl:template name="header" >&lt;?xml version="1.0" ?> 
      &lt;%@ page language="java" contentType="text/xml" %> 
      &lt;%@ page import="java.io.BufferedInputStream" %> 
      &lt;%@ page import="java.io.BufferedReader" %> 
      &lt;%@ page import="java.io.InputStreamReader" %> 
      &lt;%@ page import="java.net.URL" %> 
      &lt;%@ page import="java.net.URLConnection" %> 
      &lt;%@ page import="java.util.Date" %> 

      This appears to work fine.  Has anyone else run into this problem?  


      Christopher F. Passaretti 
      Nortel Networks 

      Tel 631 285-2529 (ESN 297-2529)
      Fax 631 285-2829
      Email: cpassar@nortelnetworks.com 

Received on Monday, 29 December 2003 07:16:02 UTC

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