This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 100219

Summary: Wrong context of the current node for xpath expressions within 'For Each' rule
Product: soa Reporter: Andrei Chistiakov <ca-nb>
Component: XSLTAssignee: Alexey Yarmolenko <alexeyyarmolenko>
Status: CLOSED DUPLICATE    
Severity: blocker CC: gbadescu, kozlov, mpottlapelli
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 113529    
Bug Blocks:    

Description Andrei Chistiakov 2007-04-06 14:25:20 UTC
Reproduced in build 070403_30.

To reproduce the bug:
- create transformation of one PO to another PO document using 'For Each' rule.

The transformation should look like

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ns="http://xml.netbeans.org/examples/PurchaseOrder2"
xmlns:ns1="http://xml.netbeans.org/examples/PurchaseOrder1">
 <xsl:template match="/">
  <xsl:element name="ns:purchaseOrder">
    <xsl:element name="ns:items">
     <xsl:for-each select="/ns1:purchaseOrder/ns1:items/ns1:item">
      <xsl:element name="ns:item">
       <xsl:element name="ns:productName">
        <xsl:value-of select="ns1:productName"/>
       </xsl:element>
      </xsl:element>
     </xsl:for-each>
    </xsl:element>
   </xsl:element>
  </xsl:template>
</xsl:stylesheet>

instead of

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ns="http://xml.netbeans.org/examples/PurchaseOrder2"
xmlns:ns1="http://xml.netbeans.org/examples/PurchaseOrder1">
 <xsl:template match="/">
  <xsl:element name="ns:purchaseOrder">
    <xsl:element name="ns:items">
     <xsl:for-each select="/ns1:purchaseOrder/ns1:items/ns1:item">
      <xsl:element name="ns:item">
       <xsl:element name="ns:productName">
        <xsl:value-of
select="/ns1:purchaseOrder/ns1:items/ns1:item/ns1:productName"/>
       </xsl:element>
      </xsl:element>
     </xsl:for-each>
    </xsl:element>
   </xsl:element>
  </xsl:template>
</xsl:stylesheet>
Comment 1 Alexey Yarmolenko 2007-08-03 14:41:34 UTC
Working with relative links is out of scope for nb6 version.
Comment 2 Alexey Yarmolenko 2007-08-03 14:43:14 UTC
fixing the bug status set by mistake
Comment 3 Alexey Yarmolenko 2007-08-03 14:45:37 UTC
now setting status to "Later"
Comment 4 pvarghese 2007-08-22 16:25:49 UTC
reopening and marking this bug as duplicate of issue 113529 for the sierra release.
Comment 5 pvarghese 2007-08-22 16:26:35 UTC

*** This issue has been marked as a duplicate of 113529 ***
Comment 6 Andrei Chistiakov 2007-10-23 15:28:12 UTC
I'm closing this as a duplicate.