[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

"White Space" error message

Subject: "White Space" error message
From: "Denis Nwanshi" <dn555_@xxxxxxxxxxx>
Date: Tue, 17 Dec 2002 21:24:44 +0000
mcafee transform xml error
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.