I think the problem is just that you need to specify "${xsl}" instead of "$xsl" as the attribute value for xsltText. The latter is now interpreted as a string literal.
I've slowly been coming to the realization that allowing $foo as a string literal leads to errors that are hard to track down; I'm just not sure what to do about it. -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming this summer from Manning Publications) On Thu, 14 Mar 2002, Matt Raible wrote: > The following code was working before I updated to last night's build: > > <c:import url="/styles/assets.xsl" var="xsl"/> > <x:transform xsltText="$xsl"> > <asset> > <type>image/pjpeg</type> > <path>file://D:/Source/onpoint/prototype/media/</path> > <file height="240" width="320"> > transmission_removal.jpg > </file> > </asset> > </x:transform> > > Now I get the following error: > > [ServletException in:/pages/assetPreview.jsp] > javax.xml.transform.TransformerConfigurationException: > javax.xml.transform.TransformerConfigurationException: > javax.xml.transform.TransformerException: org.xml.sax.SAXException: > Content is not allowed in prolog.' > > Any ideas? > > Matt > > My stylesheet - asset.xsl - is as follows: > > <?xml version="1.0" encoding="UTF-8"?> > <!-- XSL Stylesheet for rendering assets within an HTML page --> > <xsl:stylesheet > version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <!-- Output method --> > <xsl:output method="html" indent="yes"/> > > <xsl:variable name="newline"> > <xsl:text> > </xsl:text> > </xsl:variable> > > <!-- Process assets into HTML tags to view them --> > <xsl:template match="asset"> > <xsl:variable name="path" select="path"/> > <xsl:variable name="file" select="normalize-space(file)"/> > <xsl:variable name="type" select="type"/> > <xsl:variable name="height" select="file/@height"/> > <xsl:variable name="width" select="file/@width"/> > <xsl:variable name="src"> > <xsl:value-of select="concat($path, $file)"/> > </xsl:variable> > <xsl:choose> > <!-- Render HTML for videos --> > <xsl:when test="$type='video/quicktime'"> > <embed src="{$src}" > id="mediaFile" name="mediaFile" > height="{$height}" width="{$width}" autostart="true" > > pluginspage="http://quicktime.apple.com" > type="{$type}"/> > </xsl:when> > <!-- Render HTML for audio --> > <xsl:when test="$type='audio/wav'"> > <embed src="{$src}" > id="mediaFile" name="mediaFile" > height="{$height}" width="{$width}" autostart="true" > > pluginspage="http://quicktime.apple.com" > type="{$type}"/> > </xsl:when> > <!-- Render HTML for HTML documents and text documents. --> > <xsl:when test="$type='text/html' or $type='text/plain'"> > <iframe id="mediaFile" name="mediaFile" src="{$src}" > height="{$height}" width="{$width}"></iframe> > </xsl:when> > <!-- Render HTML for images --> > <xsl:when test="$type='image/pjpeg' or $type='image/gif' or > $type='image/jpeg'"> > <img id="mediaFile" name="mediaFile" src="{$src}" > height="{$height}" width="{$width}"/> > </xsl:when> > </xsl:choose> > </xsl:template> > > </xsl:stylesheet> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>