You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Tridev Kodamasingh <Tr...@cramer.com> on 2003/12/09 16:48:24 UTC
xtags, xsl, xml, jsp
Hi,
I am trying to apply "xslt" to a xml document through xtags inside a jsp
page.
I am using the foolwing tag for the purpose.
<xtags:style xml="/xml/workorder.xml" xsl="/xml/workorder.xsl" />
For this to work, as per the documentation in
http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html,
I have downloaded xalan.jar, crimson.jar and jaxp-api.jar ( which comes
with java web services pack 1.3).
But all the time, get the following error.
"org.apache.jasper.JasperException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: stylesheet requires attribute:
version "
If I add a semicolon at the end of
xmlns:xsl='http://www.w3.org/TR/WD-xsl'
then it gives other error tellin that whitespace is required before
attribute.
1. Is there any dependencies between particular versions of xtag, xalan ,
crimpson and jaxp ??
2. Am I doing something wrong here ?? (hopefully not.. :))
Would appreciate a lot , if any clue can be given to me on this ..
my style sheet starts with this . note that xsl is not complete by anymeans.
workorder.xsl
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/TR/WD-xsl' version='2.0'>
<xsl:script LANGUAGE="JavaScript"><![CDATA[
var oldtimeslotid = 0;
function IsUniqueTimeslot(node) {
var newtimeslotid;
newtimeslotid = node.getAttribute("ID");
if (newtimeslotid != oldtimeslotid){
oldtimeslotid = newtimeslotid;
return true;
}
else{
return false;
}
}
]]></xsl:script>
<xsl:template match="/">
<HTML>
<SCRIPT LANGUAGE="JavaScript">
<xsl:comment>
<![CDATA[
var g_flag = 0;
function Down() {
}
]]>
</xsl:comment>
</SCRIPT>
<STYLE>
TD {font-size:10pt}
</STYLE>
<TITLE>Workorder Information</TITLE>
<BODY BACKGROUND="/dimension/images/backgrnd.gif"
onMouseDown="clearrightclick()" onMouseOut="window.status='NOTHING';">
<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0">
<TH bgcolor="#77AADD" color="#FFFFFF"><FONT
SIZE="4" COLOR="WHITE" FACE="arial">Details</FONT></TH>
</TABLE>
<BR />
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
Thanks
Tridev
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: xtags, xsl, xml, jsp
Posted by Martin van Dijken <su...@windgazer.nl>.
Hey Tridev,
Try using the standard taglib instead of the xtags taglib. Standard is
just that, the JSTL standard and I'm not 100% certain xtags is still
being maintained.
Grtz,
Martin
Tridev Kodamasingh wrote:
> Hi,
>
> I am trying to apply "xslt" to a xml document through xtags inside a jsp
> page.
> I am using the foolwing tag for the purpose.
> <xtags:style xml="/xml/workorder.xml" xsl="/xml/workorder.xsl" />
>
> For this to work, as per the documentation in
> http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html,
> I have downloaded xalan.jar, crimson.jar and jaxp-api.jar ( which comes
> with java web services pack 1.3).
>
> But all the time, get the following error.
> "org.apache.jasper.JasperException:
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.TransformerException:
> javax.xml.transform.TransformerException: stylesheet requires attribute:
> version "
> If I add a semicolon at the end of
> xmlns:xsl='http://www.w3.org/TR/WD-xsl'
> then it gives other error tellin that whitespace is required before
> attribute.
>
> 1. Is there any dependencies between particular versions of xtag, xalan ,
> crimpson and jaxp ??
> 2. Am I doing something wrong here ?? (hopefully not.. :))
> Would appreciate a lot , if any clue can be given to me on this ..
>
> my style sheet starts with this . note that xsl is not complete by anymeans.
> workorder.xsl
> <?xml version='1.0'?>
> <xsl:stylesheet xmlns:xsl='http://www.w3.org/TR/WD-xsl' version='2.0'>
> <xsl:script LANGUAGE="JavaScript"><![CDATA[
> var oldtimeslotid = 0;
> function IsUniqueTimeslot(node) {
> var newtimeslotid;
> newtimeslotid = node.getAttribute("ID");
>
> if (newtimeslotid != oldtimeslotid){
> oldtimeslotid = newtimeslotid;
> return true;
> }
> else{
> return false;
> }
> }
>
> ]]></xsl:script>
>
> <xsl:template match="/">
>
> <HTML>
>
> <SCRIPT LANGUAGE="JavaScript">
> <xsl:comment>
> <![CDATA[
> var g_flag = 0;
> function Down() {
> }
>
> ]]>
> </xsl:comment>
> </SCRIPT>
>
> <STYLE>
> TD {font-size:10pt}
> </STYLE>
>
> <TITLE>Workorder Information</TITLE>
>
> <BODY BACKGROUND="/dimension/images/backgrnd.gif"
> onMouseDown="clearrightclick()" onMouseOut="window.status='NOTHING';">
> <TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0">
> <TH bgcolor="#77AADD" color="#FFFFFF"><FONT
> SIZE="4" COLOR="WHITE" FACE="arial">Details</FONT></TH>
> </TABLE>
> <BR />
>
> <xsl:apply-templates/>
> </BODY>
> </HTML>
>
> </xsl:template>
>
>
> Thanks
> Tridev
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org