[ http://nagoya.apache.org/jira/browse/XALANJ-1263?page=history ]
Henry Zongaro updated XALANJ-1263:
----------------------------------
type: Improvement (was: Bug)
Description:
If you run
java org.apache.xalan.xslt.Process -in http://xml.house.gov/Members/mbr107.xml
-xsl
congress6.xsl
you die with this error:
file:///Users/rnewman/xml/2/congress6.xsl; Line #22; Column #43; XSLT Error
(javax.xml.transform.TransformerException): java.lang.ClassCastException:
org.apache.xpath.objects.XRTreeFrag
Here are the contents of congress6.xsl:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
version="1.1">
<xsl:output method="html"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd"
indent="yes"/>
<xsl:template name="title">
<xsl:value-of select="metadata/congress"/>, <xsl:value-of
select="metadata/date"/>
</xsl:template>
<xsl:template name="state-list">
<xsl:variable name="list">
<xsl:for-each select="member">
<xsl:sort select="state"/>
<xsl:copy-of select="state"/>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="($list)/state">
<xsl:if test="not(.=preceding-sibling::state[1])">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="/ushousemembers">
<html>
<head>
<title><xsl:call-template name="title"/></title>
<link href="http://cscie153.dce.harvard.edu/css/congress.css"
type="text/css" rel="stylesheet"/>
</head>
<body>
<h1><xsl:call-template name="title"/></h1>
<xsl:call-template name="state-list"/>
<hr/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
was:
If you run
java org.apache.xalan.xslt.Process -in http://xml.house.gov/Members/mbr107.xml
-xsl
congress6.xsl
you die with this error:
file:///Users/rnewman/xml/2/congress6.xsl; Line #22; Column #43; XSLT Error
(javax.xml.transform.TransformerException): java.lang.ClassCastException:
org.apache.xpath.objects.XRTreeFrag
Here are the contents of congress6.xsl:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
version="1.1">
<xsl:output method="html"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd"
indent="yes"/>
<xsl:template name="title">
<xsl:value-of select="metadata/congress"/>, <xsl:value-of
select="metadata/date"/>
</xsl:template>
<xsl:template name="state-list">
<xsl:variable name="list">
<xsl:for-each select="member">
<xsl:sort select="state"/>
<xsl:copy-of select="state"/>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="($list)/state">
<xsl:if test="not(.=preceding-sibling::state[1])">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="/ushousemembers">
<html>
<head>
<title><xsl:call-template name="title"/></title>
<link href="http://cscie153.dce.harvard.edu/css/congress.css"
type="text/css" rel="stylesheet"/>
</head>
<body>
<h1><xsl:call-template name="title"/></h1>
<xsl:call-template name="state-list"/>
<hr/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Environment:
Operating System: MacOS X
Platform: Macintosh
was:
Operating System: MacOS X
Platform: Macintosh
Priority: Minor
Bugzilla Id: (was: 14125)
> RTF where nodeset expected: better message desired
> --------------------------------------------------
>
> Key: XALANJ-1263
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1263
> Project: XalanJ2
> Type: Improvement
> Components: Xalan
> Versions: 2.4
> Environment: Operating System: MacOS X
> Platform: Macintosh
> Reporter: Ron Newman
> Assignee: Morris Kwan
> Priority: Minor
> Attachments: congress6.xsl
>
> If you run
> java org.apache.xalan.xslt.Process -in
> http://xml.house.gov/Members/mbr107.xml -xsl
> congress6.xsl
> you die with this error:
> file:///Users/rnewman/xml/2/congress6.xsl; Line #22; Column #43; XSLT Error
> (javax.xml.transform.TransformerException): java.lang.ClassCastException:
> org.apache.xpath.objects.XRTreeFrag
> Here are the contents of congress6.xsl:
> <?xml version="1.0" encoding="utf-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xalan="http://xml.apache.org/xalan"
> version="1.1">
> <xsl:output method="html"
> doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
> doctype-system="http://www.w3.org/TR/html4/strict.dtd"
> indent="yes"/>
>
> <xsl:template name="title">
> <xsl:value-of select="metadata/congress"/>, <xsl:value-of
> select="metadata/date"/>
> </xsl:template>
>
> <xsl:template name="state-list">
> <xsl:variable name="list">
> <xsl:for-each select="member">
> <xsl:sort select="state"/>
> <xsl:copy-of select="state"/>
> </xsl:for-each>
> </xsl:variable>
> <xsl:for-each select="($list)/state">
> <xsl:if test="not(.=preceding-sibling::state[1])">
> <xsl:copy-of select="."/>
> </xsl:if>
> </xsl:for-each>
> </xsl:template>
>
>
> <xsl:template match="/ushousemembers">
> <html>
> <head>
> <title><xsl:call-template name="title"/></title>
> <link href="http://cscie153.dce.harvard.edu/css/congress.css"
> type="text/css" rel="stylesheet"/>
> </head>
> <body>
> <h1><xsl:call-template name="title"/></h1>
> <xsl:call-template name="state-list"/>
> <hr/>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]