|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] White space required b/w public and sysem identifier
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 _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








