xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Minchau (JIRA)" <xalan-...@xml.apache.org>
Subject [jira] Assigned: (XALANJ-2039) XPath in extensions gives runtime error
Date Tue, 01 Feb 2005 20:19:19 GMT
     [ http://issues.apache.org/jira/browse/XALANJ-2039?page=history ]

Brian Minchau reassigned XALANJ-2039:
-------------------------------------

    Assign To: Yash Talwar

> XPath in extensions gives runtime error
> ---------------------------------------
>
>          Key: XALANJ-2039
>          URL: http://issues.apache.org/jira/browse/XALANJ-2039
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan-extensions
>  Environment: Fedora 2 
>     Reporter: Marco Laponder
>     Assignee: Yash Talwar

>
> I am trying to do the following, i define a variable in my xsl file as the following:

> <xsl:variable name="var1> 
>         <info1 value="test" /> 
>         <info2 value="test" /> 
> </xsl:variable> 
> and I pass thi vaiable to an extension function : 
> <xsl:copy-of select="myext:getdata2($var1)" /> 
> I defined my function as follows: 
> public Document getdata2(Object input){ 
>                 DTMNodeIterator it = (DTMNodeIterator) input; 
>                Document inputDoc = (Document) it.getRoot();    
>         .... 
> } 
> When I dump the inputdoc to file, it contains the data from var1 as I expect. 
> Now I try to get specific data from the input doc with the XPathAPI object, e..g. 
>         XPathAPI.selectNodeList(inputDoc,"/") 
> but this gives met the following error 
> java.lang.ArrayIndexOutOfBoundsException: -1 
>         at org.apache.xml.utils.SuballocatedIntVector.elementAt(SuballocatedIntV 
> ector.java:454) 
>         at org.apache.xml.dtm.ref.DTMDefaultBase._firstch(DTMDefaultBase.java:52 
> 0) 
>         at org.apache.xml.dtm.ref.DTMDefaultBase.getFirstChild(DTMDefaultBase.ja 
> va:965) 
>         at org.apache.xml.dtm.ref.DTMNodeProxy.getDocumentElement(DTMNodeProxy.j 
> ava:605) 
>         at org.apache.xpath.XPathAPI.eval(XPathAPI.java:274) 
>         at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:211) 
>         at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:191) 
>         at interchain.ext.XmlProvider.getdata2(XmlProvider.java:203)       

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Mime
View raw message