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 - Wrong context of the current node for xpath expressions within 'For Each' rule
Summary: Wrong context of the current node for xpath expressions within 'For Each' rule
Status: CLOSED DUPLICATE of bug 113529
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 6.x
Hardware: PC All
: P1 blocker (vote)
Assignee: Alexey Yarmolenko
URL:
Keywords:
Depends on: 113529
Blocks:
  Show dependency tree
 
Reported: 2007-04-06 14:25 UTC by Andrei Chistiakov
Modified: 2007-10-23 15:28 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.