xsl-list
[Top] [All Lists]

"White Space" error message

2002-12-17 14:24:44
Hi,
Does anyone have any idea why I'm getting this error message with my XSL/JSP code:

"White space is required between the public identifier and the system identifier."

Here's the concatenated string I'm trying to transfer via a javabean (the use of the ampersand ("&") has worked in the past):

------------------------------------------------------
"<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" & Chr(34) & "ISO-8859-1" & Chr(34) & "?><contacts>" & InfoBody & "</contacts>"
------------------------------------------------------

Here's my XSL code which can be viewed by the browser:

------------------------------------------------------
<%

response.setContentType("text/xml");
%><?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<xsl:template match="contacts">
 <table width="70%">
   <xsl:apply-templates select="contact"/>
 </table>
</xsl:template>

<xsl:template match="contact">
 <tr>
   <td>
     <xsl:apply-templates select="Name"/>
   </td>
   <td>
     <xsl:apply-templates select="State"/>
   </td>
<td>
<xsl:apply-templates select="Address"/>
 </td>
</tr>
</xsl:template>

</xsl:stylesheet>
------------------------------------------------------

Above XSL is called by following JSP in the HTTP command
and should output the string to the browser:

------------------------------------------------------
  // Parse and display XML Document
     TransformerFactory tFactory = TransformerFactory.newInstance();

  // Get the XML Source from the string
     StringReader myReader = new StringReader(VLDContacts);
     Source xmlSource = new StreamSource(myReader);

   // Get the XSL Source from a JSP template
Source xslSource = new StreamSource(new java.net.URL("http://localhost:9090/{Path to XSL File above}/").openStream());

   // Generate the transformer.
      Transformer transformer = tFactory.newTransformer(xslSource);

   // Perform the transformation, sending the output to the response.
      transformer.transform(xmlSource, new StreamResult(out));

--------------------------------------------------------------

Many Thanks
Denis



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>
  • "White Space" error message, Denis Nwanshi <=