Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Content is not allowed in prolog error

843836Aug 11 2004 — edited Aug 11 2004
If anyone can tell me why I might be getting this error I'd appreciate it.

I am trying to display an XML file using an XSL file in my jsp file.

I keep getting an error saying "[Fatal Error] jstl::1:1: Content is not allowed in prolog."

I can't figure out what is wrong.

NOTE: I replace the "<" with "#" and ">" with "$" so it will display in this message.

In my jsp I have imported the taglib for JSTL and then my line of code is:

#%@ taglib prefix="x" uri="/WEB-INF/x.tld" %$
....

#x:transform xml="nav/xml_enterprise/xml/popularentity.xml" xslt="nav/xsl/navigation.xsl" /$

I can display the XML file in Windows explorer (IE) just fine but not from within portal.

My XML file looks like:

#pre$

#NAVIGATION$
#LEVEL1$
#ID$colorado#/ID$
#VALUE$Colorado Popular Stuff#/VALUE$
#MARKSRC$/fnnet/images/common/nav/localmark_none.gif#/MARKSRC$
#HREF$/fnnet/colorado/popular/#/HREF$
#MOUSEOVER$window.status='Popular Links Within the Colorado Employee Site'; return true#/MOUSEOVER$
#MOUSEOUT$window.status=''; return true#/MOUSEOUT$
#SECURED$#/SECURED$#/LEVEL1$
#LEVEL1$
#ID$omaha#/ID$
#VALUE$Omaha Popular Stuff#/VALUE$
#MARKSRC$/fnnet/images/common/nav/localmark_none.gif#/MARKSRC$
#HREF$/fnnet/omaha/popular/default.asp#/HREF$
#MOUSEOVER$window.status='Popular Links Within the Omaha Employee Site'; return true#/MOUSEOVER$
#MOUSEOUT$window.status=''; return true#/MOUSEOUT$
#SECURED$#/SECURED$#/LEVEL1$
#/NAVIGATION$

my xsl looks like:

#?xml version="1.0"?$
#xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"$
#xsl:output method="html" omit-xml-declaration="yes"/$

...

#xsl:template match="NAVIGATION"$
#xsl:choose$
#xsl:when test=".[Level1Tag $ '']"$
#xsl:for-each select="LEVEL1"$
#xsl:if test=".[ID=/NAVIGATION/Level1Tag]"$
#xsl:choose$
#xsl:when test=".[NAVIGATION/Level2Tag $ '']"$
#xsl:for-each select="LEVEL2"$
#xsl:if test=".[ID=/NAVIGATION/Level2Tag]"$
#xsl:choose$
#xsl:when test=".[NAVIGATION/Level3Tag $ '']"$
#xsl:for-each select="LEVEL3"$
#xsl:if test=".[ID=/NAVIGATION/Level3Tag]"$
#xsl:choose$
#xsl:when test=".[NAVIGATION/Level4Tag $ '']"$
#xsl:for-each select="LEVEL4"$
#xsl:if test=".[ID=/NAVIGATION/Level4Tag]"$
#!-- Level4 CrossSell --$
#xsl:apply-templates select="XSELL"/$
#/xsl:if$
#/xsl:for-each$
#/xsl:when$
#xsl:otherwise$
#!-- Level3 CrossSell --$
#xsl:apply-templates select="XSELL"/$
#/xsl:otherwise$
#/xsl:choose$
#/xsl:if$
#/xsl:for-each$
#/xsl:when$
#xsl:otherwise$
#!-- Level2 CrossSell --$
#xsl:apply-templates select="XSELL"/$
#/xsl:otherwise$
#/xsl:choose$
#/xsl:if$
#/xsl:for-each$
#/xsl:when$
#xsl:otherwise$
#!-- Level1 CrossSell --$
#xsl:apply-templates select="XSELL"/$
#/xsl:otherwise$
#/xsl:choose$
#/xsl:if$
#/xsl:for-each$
#/xsl:when$
#xsl:otherwise$
#!-- SubCat CrossSell --$
#xsl:if test=".[NAVIGATION/SUBCAT/XSELL/SRC $ '']"$
#div$#xsl:attribute name="class"$#xsl:value-of select="/NAVIGATION/SUBCAT/XSELL/CLASS"/$#/xsl:attribute$
#a$#xsl:attribute name="onmouseover"$#xsl:value-of select="MOUSEOVER"/$#/xsl:attribute$#xsl:attribute name="onmouseout"$#xsl:value-of select="MOUSEOUT"/$#/xsl:attribute$#xsl:attribute name="href"$#xsl:value-of select="/NAVIGATION/SUBCAT/XSELL/HREF"/$#/xsl:attribute$#img border="0"$#xsl:attribute name="src"$#xsl:value-of select="/NAVIGATION/SUBCAT/XSELL/SRC"/$#/xsl:attribute$#/img$#/a$
#/div$
#/xsl:if$
#/xsl:otherwise$
#/xsl:choose$
#/xsl:template$

#/pre$

I am using WSAD 5.1.2

Anyone help me out there????

Thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2004
Added on Aug 11 2004
9 comments
231 views