[ 
https://issues.apache.org/jira/browse/XALANJ-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733368#comment-17733368
 ] 

Vladimir Sitnikov edited comment on XALANJ-2474 at 6/16/23 7:26 AM:
--------------------------------------------------------------------

[~kesh...@alum.mit.edu] , are you sure you pass {{-PARAM global.result 
input.xml}} parameter as described in the issue?

Here's what I have for xalan 2.6.0 in new.html:

 
||Template data||Target data||
|Instance of :|Instance of :|
|Instance of :|Instance of :|

 

The code is like
{code:java}
<h1>Test report</h1><table cellspacing="1" border="1" cellpadding="3">
<tr>
<th>Template data</th><th>Target data</th>
</tr><tr>
<td>Instance of : </td><td>Instance of : </td>
</tr><tr>
<td>Instance of : </td><td>Instance of : </td>
</tr> {code}
 

Here's what 2.7.3 produces:
{code:java}
java -jar xalan.jar  org.apache.xalan.xslt.Process -IN input.xml -XSL 
transform.xslt  -OUT new.html  new.html -PARAM global.result input.xml {code}
 
{code:java}
file:///.../xalan-j_2_7_3/transform.xslt; Line #118; Column #35; yep.Two sets 
are not equivalent.file:///.../xalan-j_2_7_3/transform.xslt; Line #102; Column 
#31;                                       
document('input.xml')/*/AtmUniNbr_T[CreationTime=''              and 
LastUpdatedTime=''          and Name=''             and Description=''          
    and AssimilationUpdatedTime='-1'                and 
AssimilationStarted='false'                 and 
Credibility='CredibilityLevel.Medium'
                                                        and 
Mble1[@xlink:href='nil'] and Mble2[@xlink:href='nil'] and 
Base1[@xlink:href='nil'] and Base2[@xlink:href='nil'] and 
HostAgent[@xlink:href='nil'] and HostSystem[@xlink:href='nil'] and 
Host[@xlink:href='nil'] and HostAggregation[@xlink:href='nil']] {code}
 
||Template data||Target data||
|Instance of :|yep.Corresponding element has not been found.|
|Instance of :|yep.Corresponding element has not been found.|

with code like 
{code:java}
<h1>Test report</h1><table cellspacing="1" border="1" cellpadding="3">
<tr>
<th>Template data</th><th>Target data</th>
</tr><tr>
<td>Instance of : </td><td>yep.Corresponding element has not been found.</td>
</tr><tr>
<td>Instance of : </td><td>yep.Corresponding element has not been found.</td>
</tr> {code}


was (Author: vladimirsitnikov):
[~kesh...@alum.mit.edu] , are you sure you pass {{-PARAM global.result 
input.xml}} parameter as described in the issue?

Here's what I have for xalan 2.6.0 in new.html:

 
||Template data||Target data||
|Instance of :|Instance of :|
|Instance of :|Instance of :|


 

The code is like
{code:java}
<h1>Test report</h1><table cellspacing="1" border="1" cellpadding="3">
<tr>
<th>Template data</th><th>Target data</th>
</tr><tr>
<td>Instance of : </td><td>Instance of : </td>
</tr><tr>
<td>Instance of : </td><td>Instance of : </td>
</tr> {code}
 

Here's what 2.7.3 produces:
{code:java}
java -jar xalan.jar  org.apache.xalan.xslt.Process -IN input.xml -XSL 
transform.xslt  -OUT new.html  new.html -PARAM global.result input.xml {code}
 
{code:java}
file:///Users/vlsi/Documents/code/xalan/xalan-j_2_7_3/transform.xslt; Line 
#118; Column #35; yep.Two sets are not 
equivalent.file:///Users/vlsi/Documents/code/xalan/xalan-j_2_7_3/transform.xslt;
 Line #102; Column #31;                                       
document('input.xml')/*/AtmUniNbr_T[CreationTime=''              and 
LastUpdatedTime=''          and Name=''             and Description=''          
    and AssimilationUpdatedTime='-1'                and 
AssimilationStarted='false'                 and 
Credibility='CredibilityLevel.Medium'
                                                        and 
Mble1[@xlink:href='nil'] and Mble2[@xlink:href='nil'] and 
Base1[@xlink:href='nil'] and Base2[@xlink:href='nil'] and 
HostAgent[@xlink:href='nil'] and HostSystem[@xlink:href='nil'] and 
Host[@xlink:href='nil'] and HostAggregation[@xlink:href='nil']] {code}
 
||Template data||Target data||
|Instance of :|yep.Corresponding element has not been found.|
|Instance of :|yep.Corresponding element has not been found.|

with code like 
{code:java}
<h1>Test report</h1><table cellspacing="1" border="1" cellpadding="3">
<tr>
<th>Template data</th><th>Target data</th>
</tr><tr>
<td>Instance of : </td><td>yep.Corresponding element has not been found.</td>
</tr><tr>
<td>Instance of : </td><td>yep.Corresponding element has not been found.</td>
</tr> {code}

> document() function returns different values with xalan version 2.7.1. and 
> 2.6.0.
> ---------------------------------------------------------------------------------
>
>                 Key: XALANJ-2474
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2474
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in 
> Xalan projects.  Anybody can view the issue.) 
>    Affects Versions: 2.7.1
>         Environment: Windows, using command line transform of xalan.
>            Reporter: pavankumar
>            Priority: Blocker
>         Attachments: input.xml, transform.xslt
>
>
> xslt document() function returns duplicate and improper values with 2.7.1. 
> where as the same code works with 2.6.0.
> Info : document and evaluate functions are used in xslt and there were other 
> slightly inconsistent behaviour also for 2 versions in terms of syntax and 
> all. and xlink:href is getting nil values in 2.7.1
> document result contained by path variable line 93 - transform.xsl is the one 
> causing problem. and and when printed, it outputs different values with 
> different versions.
> Executed using xalan CLI
> C:\>java org.apache.xalan.xslt.Process -IN "C:\input.xml" -XSL 
> "C:\transform.xslt" -OUT new.html -PARAM global.result input.xml
> attaching the files.transform.xslt and input.xml



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org

Reply via email to