You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Tom Saffell <tc...@apama.com> on 2000/07/31 20:28:18 UTC

newbie to xalan servlet, help please ?

I am trying to get the XSLT servlet 'DefaultApplyXSL' to do XSL Transforms
on the Orion app. server. I have my filters correctly set up to send any xml
media-type to the servlet, that works fine. If I do
http://localhost/1.xml?xslURL=/html1.xsl then the transform works fine.
However if I do http://localhost/1.xml and try to get the servlet to pick
the xsl file to use from the xml file I get the following reply:

500 Internal Server Error
Exception occurred during Transformation:
Parsing XML-Document from request chain
calling getXSLURLfromDoc and getMedia explorer
Parsing XSL Stylesheet Document from XML Document tag:
http://localhost/html1.xsl
Parsing XML-Document from request chain
The root element is required in a well-formed document.

It looks to me like it is correctly picking up the html1.xsl file from the
reference in the 1.xml file, but the transformation isn't working. This I
dont understand. The transformation works, the servlet mapping works, the
picking the xsl file reference out of the xml file works, they just wont all
work together.

I have included below my xml and xsl files.
I am very new to the xml and xsl game, and realise that I may be missing
something very basic, sorry to waste people's time if I am.

I would very much appreciate any hints on how to get this working.

Thanks

Tom Saffell
APAMA

** - 1.xml - **

<?xml version="1.0"?>
<?xml-stylesheet media="explorer" href="http://localhost/html1.xsl"
type="text/xsl"?>
<doc>
this is test text from the xml file
</doc>

** - end of file - **

** - html1.xsl - **

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html" media-type="text/html"/>
<xsl:template match="/">

<html>
<head>
<title>xml test</title>
</head>
<body>
This is Test Text from the xml -> html .xsl file,  <xsl:value-of
select="."/>
</body>
</html>

</xsl:template>

</xsl:stylesheet>

** - end of file - **

thanks again