Subjects
Home
Xalan extension functions
Fomatting question serializing DOM with pretty print
xalan with pull parser
Cannot find the declaration
Apache Xalan drop support to run on JRE 1 1 x
Why does Doctype change processing of a document
Node set to XML string via Java extensions in Xalan J: possible?
Templates/Transformers + thread safety???
Problem evaluating xpath with muliple prefix with different namespace
remove an arbitrary attribute from xsl output
Xalan3 XSLT 2 0 XPath 2 0 support?
Problem using compiled translets with Xalan !!
Xalan and jstl 1 1 problem with transform tag
NullPointer in DOM2DTM getLocalName
URIResolvers base parameter with xsltc and cascaded imports
Performance problem for Xalan J on intel dual core
Standard libraries in JAXP?
Serializing a DOM tree to XML file, customize entities replacement
Library Conflict Involving BCEL Library
A question on how users are using <xsl:message >
Kevin Cormier as a new Apache Xalan J committer
Struggling to iterate over tokenized string
Xalan count() trouble
Problem with recursive xpath
Error when switching to java 1 5
document( ' ')
Problem with Xalan2 7 0 transformation
cr/lf options
entity encoded XML
can xalan transform 2 xml using one xslt?
Xalan J JIRA defect review Monday October 16, 2006 from 2:00 to 3:30 pm ED
xsl transform with cdata section elements
xslt parameters not expanded
Weird behavior of XPath evaluate()
How to avoid <xsl:message > instruction prints stylesheet file informations ?
Cannot find SimpleTransform subdirectory after installing Xalan J
recover from document not found exceptions
jdk1 5 and Xalan jar differences?
Performance Issue
Error/Bug adding floating point numbers
XPathAPI: eval exp using nodes with default namespace
modifying xalan to output invalid XML
NullPointerException
mege two separate xml nodes into one
Is this a XALAN document identification bug?
is StylesheetRoot really java io Serializable ?
transform() fails for DOMSource but succeeds for StreamSource
Thoughts on Transformer parameter passing
HELP, Xalan and jstl 1 1 problem with transformer
Problem with XPath namespace axis?
string utils:replace deleting search string if replacement string is an HTML
help with enumeration values pls
xalan 2 5 1 vs 2 7 performance question
How to insert/update in XML document
HTML Serialization and Handling of Ampersands in HREF Attributes
XHTML link tag stripping
SystemId Unknown; Line #24; Column #49; java lang NullPointerException
xpath text() help
Apostrophe problem with xalan 2 7 0
How to set variables in XML document?
Links
Home
Oracle database error code ...
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
The test conditional doesn 't seem to work

The test conditional doesn 't seem to work

2003-04-23       - By kroberts@(protected)
Reply:     1     2     3     4     5     6     7  


Ok, It looks like this could be an issue with the way Java is setting the
params.
Here is the xalan-1 approach to setting params:

                   DOMParser dp = new DOMParser();
                   dp.parse(parameterData);
                   XObject xObj = new XNodeSet(dp.getDocument
().getChildNodes());
        XSLTProcess xsltProcessor ....;
                  xsltProcessor.setStylesheetParam(paramName,xObj);

The new xalan-2 code sets params this way:

                   Document doc = XmlUtil.parseDocument(parameterData);
                   XObject xObj = new XNodeSetForDOM(doc.getChildNodes(),
                           new XPathContext());
         Transformer transformer ....;
         transformer.setParameter(paramName,xObj);

I wrote a test servlet to run a stylesheet that does a copy: here is the
stylesheet:

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version
="1.0">

 <xsl:output method="xml" version="1.0" encoding="ISO-8859-1"/>

 <xsl:param name="theParam"/>

 <xsl:template match="/">
     <xsl:copy-of select="$theParam"/>
 </xsl:template>

</xsl:stylesheet>

When I ran it; I got an out of bounds exception on the copy-of line of
code.
Java must be passing in bad data or something.

Transformation failed: javax.xml.transform.TransformerException:
java.lang.Array
IndexOutOfBoundsException
; SystemID: http://pc034144.code3.com:80//public_xsl/debugparam.xsl; Line#:
12;
Column#: 42
javax.xml.transform.TransformerException:
java.lang.ArrayIndexOutOfBoundsExcepti
on
       at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Tr
ansformerImpl.java:2323)
       at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResul
t.java:696)
       at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Tr
ansformerImpl.java:2318)
       at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResul
t.java:696)
       at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Tr
ansformerImpl.java:2318)
       at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Tran
sformerImpl.java:2185)
       at
org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1263)
       at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:671)
       at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1179)
       at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1157)
       at com.mmm.ciws.xsl.StylesheetRoot.process(StylesheetRoot.java:74)
       at com.mmm.ciws.xsl.XSLTProcessor.process(XSLTProcessor.java:186)
       at com.mmm.ciws.xsl.TransformXSL.transform(TransformXSL.java:196)
       at com.mmm.ciws.xsl.TransformXSL.transform(TransformXSL.java:157)
       at com.mmm.ciws.TestTransform.service(TestTransform.java:125)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
       at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
       at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
       at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
       at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5445)
       at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:780)
       at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3105)
       at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2588)
       at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
       at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

Any and all help would be greatly appreciated.

Thanks

Keith....